public class FileSystemFileAclDao extends Object implements IRepositoryFileAclDao
Constructor and Description |
---|
FileSystemFileAclDao() |
Modifier and Type | Method and Description |
---|---|
void |
addAce(Serializable fileId,
RepositoryFileSid recipient,
EnumSet<RepositoryFilePermission> permission)
Adds ACE to end of ACL.
|
RepositoryFileAcl |
createAcl(Serializable fileId,
RepositoryFileAcl acl)
Creates an ACL.
|
RepositoryFileAcl |
getAcl(Serializable fileId)
Returns ACL for file.
|
List<RepositoryFileAce> |
getEffectiveAces(Serializable fileId,
boolean forceEntriesInheriting)
Returns the list of access control entries that will be used to make an access control decision.
|
boolean |
hasAccess(String relPath,
EnumSet<RepositoryFilePermission> permissions)
Returns
true if the user has all of the permissions. |
void |
setFullControl(Serializable fileId,
RepositoryFileSid sid,
RepositoryFilePermission permission)
Gives full control (all permissions) to given sid.
|
RepositoryFileAcl |
updateAcl(RepositoryFileAcl acl)
Updates an ACL.
|
public void addAce(Serializable fileId, RepositoryFileSid recipient, EnumSet<RepositoryFilePermission> permission)
IRepositoryFileAclDao
IRepositoryFileAclDao.updateAcl(RepositoryFileAcl)
should not
need to be called after this method returns.addAce
in interface IRepositoryFileAclDao
fileId
- file idrecipient
- recipient of permissionpermission
- permission to setpublic RepositoryFileAcl createAcl(Serializable fileId, RepositoryFileAcl acl)
IRepositoryFileAclDao
createAcl
in interface IRepositoryFileAclDao
fileId
- file idacl
- file aclpublic RepositoryFileAcl getAcl(Serializable fileId)
IRepositoryFileAclDao
getAcl
in interface IRepositoryFileAclDao
fileId
- file idpublic List<RepositoryFileAce> getEffectiveAces(Serializable fileId, boolean forceEntriesInheriting)
IRepositoryFileAclDao
getEffectiveAces
in interface IRepositoryFileAclDao
fileId
- file idforceEntriesInheriting
- true
to treat ACL as if isEntriesInheriting
was true; this avoids having the caller
fetch the parent of ACL belonging to file with fileId
; no change is persisted to the ACLpublic boolean hasAccess(String relPath, EnumSet<RepositoryFilePermission> permissions)
IRepositoryFileAclDao
true
if the user has all of the permissions. The implementation should return false
if
either the user does not have access or the file does not exist.hasAccess
in interface IRepositoryFileAclDao
relPath
- path to filepermissions
- permissions to checktrue
if user has accesspublic void setFullControl(Serializable fileId, RepositoryFileSid sid, RepositoryFilePermission permission)
IRepositoryFileAclDao
IRepositoryFileAclDao.updateAcl(RepositoryFileAcl)
should not need to be
called after this method returns.setFullControl
in interface IRepositoryFileAclDao
fileId
- file idsid
- sid that should own the domain object associated with this ACLpublic RepositoryFileAcl updateAcl(RepositoryFileAcl acl)
IRepositoryFileAclDao
updateAcl
in interface IRepositoryFileAclDao
acl
- ACL to set; must have non-null idCopyright © 2017 Hitachi Vantara. All rights reserved.