public class AccessControlListResolver extends Object implements LooselyBoundedCacheable
Modifier and Type | Class and Description |
---|---|
protected class |
AccessControlListResolver.AccessControlEntryData
Struct class that holds relevant ACE data.
|
protected class |
AccessControlListResolver.AccessEntry
Inner class for managing Access entries per user for non-conforming ACLs.
|
protected class |
AccessControlListResolver.NonconformingResolution
Models a non-conforming resolution.
|
protected class |
AccessControlListResolver.Resolution |
protected class |
AccessControlListResolver.ResolutionAccessKey
Models the resolution of an Access key.
|
protected class |
AccessControlListResolver.ResolutionGranteeEntry
Model the resolution of a grantee.
|
Modifier and Type | Field and Description |
---|---|
protected AccessControlListResolver.AccessControlEntryData[] |
m_AceDatas
The set of ACE info objects representing the
AccessControlEntry objects for this ACL.
|
protected Long |
m_AclId
The ACL Id.
|
protected boolean |
m_IsResolved
Is the instance fully resolved?
|
protected AccessControlListResolver.Resolution |
m_Resolution
The resolution data struction for this instance.
|
protected S_LibraryService |
m_Service
The Service.
|
static long |
MAX_ACCESS_COMBINATION_COUNT
Max count for each recursion will be used to determine conformance.
|
Constructor and Description |
---|
AccessControlListResolver(S_LibraryService service,
Long id)
Constructs a AccessControlListResolver
|
Modifier and Type | Method and Description |
---|---|
void |
added(Object id)
Called when an instance is added to the cache.
|
protected static AccessLevel |
addLevels(AccessLevel level,
AccessLevel grantedLevel,
S_LibrarySession sess)
Adds two access levels.
|
boolean |
canPurge()
Gets whether the item can be purged from the
the BoundedCache.
|
protected static AccessLevel |
checkForNullAccessLevel(AccessLevel level)
Checks to see if the specified AccessLevel is equivalent
to a null AccessLevel (i.e. has no permissions); if so, return
null.
|
protected void |
ensureAces(S_LibrarySession sess)
Make sure we have the ACE data resolved.
|
void |
forceResolution(S_LibrarySession session)
Force resolution of this instance.
|
protected Long[] |
getAccessControlEntryIds(S_LibrarySession session)
Gets the S_LibraryObjectData vector that contains the
AccessControlEntrys.
|
protected S_AccessControlEntry[] |
getAccessControlEntrys(S_LibrarySession session)
Gets the ACE objects.
|
protected AccessLevel |
getAccessLevel(S_LibrarySession session,
Long userid)
Checks access that a specified user has.
|
protected AccessLevel |
getAccessLevel(S_LibrarySession session,
Long userid,
boolean clone,
boolean useAccessCheckMode)
Checks access that a specified user has.
|
protected static AccessLevel |
getAccessLevelFromAceSet(S_LibrarySession sess,
AccessControlListResolver.AccessControlEntryData[] aceDatas,
boolean[] aceIncluded)
Compute the AccessLevel from a set of ACEs that are "included"
in consideration.
|
protected S_AccessControlList |
getAcl(S_LibrarySession sess)
Gets the ACL.
|
protected Long[] |
getComponentAclIds(S_LibrarySession sess)
Gets the component ACL IDs.
|
protected S_AccessControlList[] |
getComponentAcls(S_LibrarySession sess)
Gets the component ACLs.
|
protected S_DirectoryObject |
getGrantee(S_LibraryObjectData aceData,
S_LibrarySession sess)
Gets the DirectoryObject which is the grantee of the specified
ACE data object.
|
protected Long |
getId()
Gets the ACL Id.
|
protected boolean |
getIsGrant(S_LibraryObjectData aceData,
S_LibrarySession sess)
Checks whether the specified ACE represents a grant or a revoke
|
protected Object[] |
getLevelInfoFromData(S_LibraryObjectData aceData,
S_LibrarySession sess)
Gets the information that represents the access associated with with
the acedata.
|
protected AccessControlListResolver.NonconformingResolution |
getNonconformingResolution(S_LibrarySession sess)
Resolves this nonconforming instance for the purpose
of being able to update the ACLD tables
|
protected boolean |
hasDiscoverAccess(S_LibrarySession session,
Long userid)
Checks if a user has discover access
for this ACL.
|
protected boolean |
isDependentOnPermissionBundle(Long id)
Returns indication as to whether the current resolution is dependent on
the specified PermissionBundle ID.
|
protected void |
processResolutionGranteeEntry(S_LibrarySession sess,
AccessControlListResolver.AccessControlEntryData[] aceDatas,
boolean[] aceIncluded,
AccessControlListResolver.ResolutionGranteeEntry[] rges,
boolean[] rgeIncluded,
int rgeIndex,
boolean userIncluded,
String keyPrefix,
ConcurrentHashMap ht)
Recursively build up the set of ResolutionGranteeEntries
and the associated access ConcurrentHashMap.
|
void |
removed(Object id)
Called when an instance is removed to the cache.
|
protected void |
resolve(S_LibrarySession sess)
Resolve this instance.
|
protected static AccessLevel |
subtractLevels(AccessLevel level,
AccessLevel grantedLevel,
S_LibrarySession sess)
Subtracts two access levels (standard permissions only).
|
protected void |
updateAclDiscovererTable(S_LibrarySession sess)
Update, insert, or delete rows
from ACL DiscovererTable to reflect the list of discoverers.
|
protected void |
updateAclDiscovererTableForComponentAcls(S_LibrarySession sess)
Update, insert, or delete rows from ACL DiscovererTable to reflect
the list of discoverers for this ACL's set of component ACLs
(i.e. if this ACL is a composite ACL).
|
protected void |
updateAclDiscovererTableForConformingAcl(S_LibrarySession sess)
Update, insert, or delete rows from ACL DiscovererTable to reflect
the list of discoverers for a conforming ACL.
|
protected void |
updateAclDiscovererTableForNonconformingAcl(S_LibrarySession sess)
Update, insert, or delete rows from ACL DiscovererTable to reflect
the list of discoverers for a non-conforming ACL
|
public static long MAX_ACCESS_COMBINATION_COUNT
protected Long m_AclId
protected S_LibraryService m_Service
protected boolean m_IsResolved
protected AccessControlListResolver.AccessControlEntryData[] m_AceDatas
protected AccessControlListResolver.Resolution m_Resolution
public AccessControlListResolver(S_LibraryService service, Long id) throws IfsException
service
- the serviceid
- the ACL IdIfsException
- if the operation failspublic boolean canPurge() throws IfsException
The caller of this method indicates a desire to purge the object. The implementation should treat this as a purge request, but can return false if the item should not be purged.
canPurge
in interface LooselyBoundedCacheable
IfsException
- if operation fails.public void added(Object id)
added
in interface LooselyBoundedCacheable
id
- the id used for this entry in the cachepublic void removed(Object id)
removed
in interface LooselyBoundedCacheable
id
- the id used for this entry in the cacheprotected Long getId() throws IfsException
IfsException
- if the operation failsprotected Long[] getAccessControlEntryIds(S_LibrarySession session) throws IfsException
session
- the sessionIfsException
- if the operation failsprotected S_AccessControlEntry[] getAccessControlEntrys(S_LibrarySession session) throws IfsException
session
- the sessionIfsException
- if the operation failsprotected boolean isDependentOnPermissionBundle(Long id) throws IfsException
Returns false if not already resolved.
id
- the PermissionBundle IDIfsException
- if the operation failspublic void forceResolution(S_LibrarySession session) throws IfsException
session
- the sessionIfsException
- if the operation failsprotected void ensureAces(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected void resolve(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected void processResolutionGranteeEntry(S_LibrarySession sess, AccessControlListResolver.AccessControlEntryData[] aceDatas, boolean[] aceIncluded, AccessControlListResolver.ResolutionGranteeEntry[] rges, boolean[] rgeIncluded, int rgeIndex, boolean userIncluded, String keyPrefix, ConcurrentHashMap ht) throws IfsException
sess
- the sessionaceDatas
- the set of ACEdatasaceIncluded
- a boolean array indicating which ace's are
being included at this spot in the recursionrges
- the set of ResolutionGranteeEntry objectsrgeIndex
- the index into the set of RGEs at this spot
in the recursionuserIncluded
- is a user incluided at this spot in the recursion?keyPrefix
- prefix for the key into the access tableht
- the access tableIfsException
- if the operation failsprotected static AccessLevel getAccessLevelFromAceSet(S_LibrarySession sess, AccessControlListResolver.AccessControlEntryData[] aceDatas, boolean[] aceIncluded) throws IfsException
sess
- the sessionaceDatas
- the set of ACEdatasaceIncluded
- a boolean array indicating which ace's are
being included at this spot in the recursionIfsException
- if the operation failsprotected boolean hasDiscoverAccess(S_LibrarySession session, Long userid) throws IfsException
session
- the requesting sessionuserid
- the userIfsException
- if the operation failsprotected AccessLevel getAccessLevel(S_LibrarySession session, Long userid) throws IfsException
session
- the requesting sessionuserid
- the userIfsException
- if the operation failsprotected AccessLevel getAccessLevel(S_LibrarySession session, Long userid, boolean clone, boolean useAccessCheckMode) throws IfsException
session
- the requesting sessionuserid
- the userclone
- should the result be cloned?useAccessCheckMode
- should access check mode be used?IfsException
- if the operation failsprotected void updateAclDiscovererTable(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected void updateAclDiscovererTableForConformingAcl(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected void updateAclDiscovererTableForComponentAcls(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected void updateAclDiscovererTableForNonconformingAcl(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected static AccessLevel addLevels(AccessLevel level, AccessLevel grantedLevel, S_LibrarySession sess) throws IfsException
level
- the first levelgrantedLevel
- the second levelIfsException
- if the operation failsprotected static AccessLevel subtractLevels(AccessLevel level, AccessLevel grantedLevel, S_LibrarySession sess) throws IfsException
level
- the first levelgrantedLevel
- the second levelIfsException
- if the operation failsprotected static AccessLevel checkForNullAccessLevel(AccessLevel level) throws IfsException
level
- the level to checkIfsException
- if the operation failsprotected S_DirectoryObject getGrantee(S_LibraryObjectData aceData, S_LibrarySession sess) throws IfsException
aceData
- the ACEsess
- the sessionIfsException
- if the operation failsprotected Object[] getLevelInfoFromData(S_LibraryObjectData aceData, S_LibrarySession sess) throws IfsException
This is a combination of the distinct access level and the access level of the permission bundles. The PermissionBundles the ACE depends upon is returned as the second object.
aceData
- the S_LibraryObjectData that represents the acesess
- the S_LibrarySession to use when obtaining the
access levelIfsException
- if the operation failsprotected boolean getIsGrant(S_LibraryObjectData aceData, S_LibrarySession sess) throws IfsException
aceData
- the ACEsess
- the sessionIfsException
- if the operation failsprotected AccessControlListResolver.NonconformingResolution getNonconformingResolution(S_LibrarySession sess) throws IfsException
sess
- the sessionIfsException
- if the operation failsprotected Long[] getComponentAclIds(S_LibrarySession sess)
sess
- the sessionprotected S_AccessControlList[] getComponentAcls(S_LibrarySession sess)
sess
- the sessionprotected S_AccessControlList getAcl(S_LibrarySession sess)
sess
- the sessionCopyright © 2023. All rights reserved.