@Override final void setGroup(String group) { referred.setGroup(group); }
/** Set group */ final INode setGroup(String group, int latestSnapshotId) { recordModification(latestSnapshotId); setGroup(group); return this; }
/** * Add the node to the children list at the given insertion point. * The basic add method which actually calls children.add(..). */ private void addChild(final INode node, final int insertionPoint) { if (children == null) { children = new ArrayList<>(DEFAULT_FILES_PER_DIRECTORY); } node.setParent(this); children.add(-insertionPoint - 1, node); if (node.getGroupName() == null) { node.setGroup(getGroupName()); } }
static void unprotectedSetOwner( FSDirectory fsd, INodesInPath iip, String username, String groupname) throws FileNotFoundException, UnresolvedLinkException, QuotaExceededException, SnapshotAccessControlException { assert fsd.hasWriteLock(); final INode inode = FSDirectory.resolveLastINode(iip); if (username != null) { inode.setUser(username, iip.getLatestSnapshotId()); } if (groupname != null) { inode.setGroup(groupname, iip.getLatestSnapshotId()); } }
@Override final void setGroup(String group) { referred.setGroup(group); }
@Override final void setGroup(String group) { referred.setGroup(group); }
/** Set group */ final INode setGroup(String group, int latestSnapshotId) { recordModification(latestSnapshotId); setGroup(group); return this; }
/** Set group */ final INode setGroup(String group, int latestSnapshotId) { recordModification(latestSnapshotId); setGroup(group); return this; }
void unprotectedSetOwner(String src, String username, String groupname) throws FileNotFoundException { synchronized(rootDir) { INode inode = rootDir.getNode(src); if(inode == null) throw new FileNotFoundException("File does not exist: " + src); if (username != null) { inode.setUser(username); } if (groupname != null) { inode.setGroup(groupname); } } }
/** * Add the node to the children list at the given insertion point. * The basic add method which actually calls children.add(..). */ private void addChild(final INode node, final int insertionPoint) { if (children == null) { children = new ArrayList<INode>(DEFAULT_FILES_PER_DIRECTORY); } node.setParent(this); children.add(-insertionPoint - 1, node); if (node.getGroupName() == null) { node.setGroup(getGroupName()); } }
/** * Add the node to the children list at the given insertion point. * The basic add method which actually calls children.add(..). */ private void addChild(final INode node, final int insertionPoint) { if (children == null) { children = new ArrayList<INode>(DEFAULT_FILES_PER_DIRECTORY); } node.setParent(this); children.add(-insertionPoint - 1, node); if (node.getGroupName() == null) { node.setGroup(getGroupName()); } }
void unprotectedSetOwner(String src, String username, String groupname) throws FileNotFoundException { writeLock(); try { INode inode = rootDir.getNode(src); if(inode == null) throw new FileNotFoundException("File does not exist: " + src); if (username != null) { inode.setUser(username); } if (groupname != null) { inode.setGroup(groupname); } } finally { writeUnlock(); } }
/** Set the {@link PermissionStatus} */ protected void setPermissionStatus(PermissionStatus ps) { setUser(ps.getUserName()); setGroup(ps.getGroupName()); setPermission(ps.getPermission()); } /** Get the {@link PermissionStatus} */
/** Set the {@link PermissionStatus} */ protected void setPermissionStatus(PermissionStatus ps) { setUser(ps.getUserName()); setGroup(ps.getGroupName()); setPermission(ps.getPermission()); } /** Get the {@link PermissionStatus} */
static void unprotectedSetOwner( FSDirectory fsd, String src, String username, String groupname) throws FileNotFoundException, UnresolvedLinkException, QuotaExceededException, SnapshotAccessControlException { assert fsd.hasWriteLock(); final INodesInPath inodesInPath = fsd.getINodesInPath4Write(src, true); INode inode = inodesInPath.getLastINode(); if (inode == null) { throw new FileNotFoundException("File does not exist: " + src); } if (username != null) { inode = inode.setUser(username, inodesInPath.getLatestSnapshotId()); } if (groupname != null) { inode.setGroup(groupname, inodesInPath.getLatestSnapshotId()); } }
static void unprotectedSetOwner( FSDirectory fsd, String src, String username, String groupname) throws FileNotFoundException, UnresolvedLinkException, QuotaExceededException, SnapshotAccessControlException { assert fsd.hasWriteLock(); final INodesInPath inodesInPath = fsd.getINodesInPath4Write(src, true); INode inode = inodesInPath.getLastINode(); if (inode == null) { throw new FileNotFoundException("File does not exist: " + src); } if (username != null) { inode = inode.setUser(username, inodesInPath.getLatestSnapshotId()); } if (groupname != null) { inode.setGroup(groupname, inodesInPath.getLatestSnapshotId()); } }
node.setGroup(getGroupName());
node.setGroup(getGroupName());