|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.security.acegi.acls.HibernateAclImpl
public class HibernateAclImpl
Constructor Summary | |
---|---|
HibernateAclImpl()
No-argument constructor for use by reflection-based persistence tools along with field-level access. |
|
HibernateAclImpl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
org.acegisecurity.acls.Acl parentAcl,
boolean entriesInheriting,
org.acegisecurity.acls.sid.Sid owner)
Instantiation of type properties - to be used when creating via MutableAclService.createAcl(ObjectIdentity) |
|
HibernateAclImpl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
java.io.Serializable id,
org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy,
org.acegisecurity.acls.domain.AuditLogger auditLogger)
Minimal constructor, which should be used MutableAclService.createAcl(ObjectIdentity) . |
|
HibernateAclImpl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
java.io.Serializable id,
org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy,
org.acegisecurity.acls.domain.AuditLogger auditLogger,
org.acegisecurity.acls.Acl parentAcl,
org.acegisecurity.acls.sid.Sid[] loadedSids,
boolean entriesInheriting,
org.acegisecurity.acls.sid.Sid owner)
Full constructor, which should be used by persistence tools that do not provide field-level access features. |
Method Summary | |
---|---|
void |
deleteAce(java.io.Serializable aceId)
|
boolean |
equals(java.lang.Object o)
|
java.util.List |
getAces()
|
org.acegisecurity.acls.AccessControlEntry[] |
getEntries()
|
java.io.Serializable |
getId()
|
org.acegisecurity.acls.objectidentity.ObjectIdentity |
getObjectIdentity()
|
org.acegisecurity.acls.sid.Sid |
getOwner()
|
org.acegisecurity.acls.Acl |
getParentAcl()
|
int |
hashCode()
|
void |
insertAce(java.io.Serializable afterAceId,
org.acegisecurity.acls.Permission permission,
org.acegisecurity.acls.sid.Sid sid,
boolean granting)
|
boolean |
isEntriesInheriting()
|
boolean |
isGranted(org.acegisecurity.acls.Permission[] permission,
org.acegisecurity.acls.sid.Sid[] sids,
boolean administrativeMode)
Determines authorization. |
boolean |
isSidLoaded(org.acegisecurity.acls.sid.Sid[] sids)
|
void |
setAces(java.util.List aces)
|
void |
setAclAuthorizationStrategy(org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy)
|
void |
setEntriesInheriting(boolean entriesInheriting)
|
void |
setId(java.io.Serializable id)
|
void |
setObjectIdentity(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity)
|
void |
setOwner(org.acegisecurity.acls.sid.Sid newOwner)
|
void |
setParent(org.acegisecurity.acls.Acl newParent)
|
void |
setParent(org.acegisecurity.acls.MutableAcl newParent)
|
void |
setParentAcl(org.acegisecurity.acls.Acl parentAcl)
|
java.lang.String |
toString()
|
void |
updateAce(java.io.Serializable aceId,
org.acegisecurity.acls.Permission permission)
|
void |
updateAuditing(java.io.Serializable aceId,
boolean auditSuccess,
boolean auditFailure)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HibernateAclImpl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity, java.io.Serializable id, org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy, org.acegisecurity.acls.domain.AuditLogger auditLogger)
MutableAclService.createAcl(ObjectIdentity)
.
objectIdentity
- the object identity this ACL relates to (required)id
- the primary key assigned to this ACL (required)aclAuthorizationStrategy
- authorization strategy (required)auditLogger
- audit logger (required)public HibernateAclImpl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity, java.io.Serializable id, org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy, org.acegisecurity.acls.domain.AuditLogger auditLogger, org.acegisecurity.acls.Acl parentAcl, org.acegisecurity.acls.sid.Sid[] loadedSids, boolean entriesInheriting, org.acegisecurity.acls.sid.Sid owner)
objectIdentity
- the object identity this ACL relates to (required)id
- the primary key assigned to this ACL (required)aclAuthorizationStrategy
- authorization strategy (required)auditLogger
- audit logger (required)parentAcl
- the parent (may be null
)loadedSids
- the loaded SIDs if only a subset were loaded (may be null
)entriesInheriting
- if ACEs from the parent should inherit into this ACLowner
- the owner (required)public HibernateAclImpl()
public HibernateAclImpl(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity, org.acegisecurity.acls.Acl parentAcl, boolean entriesInheriting, org.acegisecurity.acls.sid.Sid owner)
MutableAclService.createAcl(ObjectIdentity)
parentAcl
- objectIdentity
- owner
- entriesInheriting
- Method Detail |
---|
public void deleteAce(java.io.Serializable aceId) throws org.acegisecurity.acls.NotFoundException
deleteAce
in interface org.acegisecurity.acls.MutableAcl
org.acegisecurity.acls.NotFoundException
public org.acegisecurity.acls.AccessControlEntry[] getEntries()
getEntries
in interface org.acegisecurity.acls.Acl
getEntries
in interface org.acegisecurity.acls.MutableAcl
public java.io.Serializable getId()
getId
in interface org.acegisecurity.acls.MutableAcl
public org.acegisecurity.acls.objectidentity.ObjectIdentity getObjectIdentity()
getObjectIdentity
in interface org.acegisecurity.acls.Acl
public org.acegisecurity.acls.sid.Sid getOwner()
getOwner
in interface org.acegisecurity.acls.Acl
public org.acegisecurity.acls.Acl getParentAcl()
getParentAcl
in interface org.acegisecurity.acls.Acl
public void insertAce(java.io.Serializable afterAceId, org.acegisecurity.acls.Permission permission, org.acegisecurity.acls.sid.Sid sid, boolean granting) throws org.acegisecurity.acls.NotFoundException
insertAce
in interface org.acegisecurity.acls.MutableAcl
org.acegisecurity.acls.NotFoundException
public boolean isEntriesInheriting()
isEntriesInheriting
in interface org.acegisecurity.acls.Acl
public boolean isGranted(org.acegisecurity.acls.Permission[] permission, org.acegisecurity.acls.sid.Sid[] sids, boolean administrativeMode) throws org.acegisecurity.acls.NotFoundException, org.acegisecurity.acls.UnloadedSidException
permission
and sid
arguments is
extremely important! The method will iterate through each of the permission
s in the order
specified. For each iteration, all of the sid
s will be considered, again in the order they are
presented. A search will then be performed for the first AccessControlEntry
object that directly matches
that permission:sid
combination. When the first full match is found (ie an ACE that has the
SID currently being searched for and the exact permission bit mask being search for), the grant or deny flag for
that ACE will prevail. If the ACE specifies to grant access, the method will return true
. If the ACE
specifies to deny access, the loop will stop and the next permission
iteration will be performed. If
each permission indicates to deny access, the first deny ACE found will be considered the reason for the failure
(as it was the first match found, and is therefore the one most logically requiring changes - although not
always). If absolutely no matching ACE was found at all for any permission, the parent ACL will be tried
(provided that there is a parent and isEntriesInheriting()
is true
. The parent ACL will
also scan its parent and so on. If ultimately no matching ACE is found, a NotFoundException
will be
thrown and the caller will need to decide how to handle the permission check. Similarly, if any of the SID
arguments presented to the method were not loaded by the ACL, UnloadedSidException
will be thrown.
isGranted
in interface org.acegisecurity.acls.Acl
permission
- the exact permissions to scan for (order is important)sids
- the exact SIDs to scan for (order is important)administrativeMode
- if true
denotes the query is for administrative purposes and no auditing
will be undertaken
true
if one of the permissions has been granted, false
if one of the
permissions has been specifically revoked
org.acegisecurity.acls.NotFoundException
- if an exact ACE for one of the permission bit masks and SID combination could not be
found
org.acegisecurity.acls.UnloadedSidException
- if the passed SIDs are unknown to this ACL because the ACL was only loaded for a
subset of SIDspublic boolean isSidLoaded(org.acegisecurity.acls.sid.Sid[] sids)
isSidLoaded
in interface org.acegisecurity.acls.Acl
public void setEntriesInheriting(boolean entriesInheriting)
setEntriesInheriting
in interface org.acegisecurity.acls.MutableAcl
public void setOwner(org.acegisecurity.acls.sid.Sid newOwner)
setOwner
in interface org.acegisecurity.acls.OwnershipAcl
public void setParent(org.acegisecurity.acls.MutableAcl newParent)
public java.lang.String toString()
toString
in class java.lang.Object
public void updateAce(java.io.Serializable aceId, org.acegisecurity.acls.Permission permission) throws org.acegisecurity.acls.NotFoundException
updateAce
in interface org.acegisecurity.acls.MutableAcl
org.acegisecurity.acls.NotFoundException
public void updateAuditing(java.io.Serializable aceId, boolean auditSuccess, boolean auditFailure)
updateAuditing
in interface org.acegisecurity.acls.AuditableAcl
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void setParentAcl(org.acegisecurity.acls.Acl parentAcl)
public void setParent(org.acegisecurity.acls.Acl newParent)
setParent
in interface org.acegisecurity.acls.MutableAcl
public void setAclAuthorizationStrategy(org.acegisecurity.acls.domain.AclAuthorizationStrategy aclAuthorizationStrategy)
public void setAces(java.util.List aces)
public java.util.List getAces()
public void setObjectIdentity(org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity)
setObjectIdentity
in interface HibernateAcl
public void setId(java.io.Serializable id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |