public class ProfileAssignmentStorageExtensionPoint extends AbstractThreadSafeComponentExtensionPoint<ProfileAssignmentStorage>
ExtensionPoint handling ProfileAssignmentStorages.| Modifier and Type | Field and Description |
|---|---|
static String |
ROLE
Avalon Role
|
_cocoonManager, _context, _manager| Constructor and Description |
|---|
ProfileAssignmentStorageExtensionPoint() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_fillAllowedProfilesAnyConnectedUser(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillAllowedProfilesForAnonymous(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillAllowedProfilesForGroups(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillAllowedProfilesForUser(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillDeniedProfilesAnyConnectedUser(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillDeniedProfilesForAnonymous(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillDeniedProfilesForGroups(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private void |
_fillDeniedProfilesForUser(Map<String,AccessController.AccessResult> results,
UserIdentity user,
Set<GroupIdentity> userGroups,
Collection<String> profileIds,
Object object) |
private Optional<ModifiableProfileAssignmentStorage> |
_getFirstModifiableProfileAssignmentStorage(Object object) |
private Optional<ProfileAssignmentStorage> |
_getFirstProfileAssignmentStorage(Object object) |
private boolean |
_hasAnonymousAnyPermission(ProfileAssignmentStorage profileAssignmentStorage,
Set<? extends Object> rootContexts,
Set<String> profileIds) |
private boolean |
_hasAnyConnectedUserAnyPermission(ProfileAssignmentStorage profileAssignmentStorage,
Set<? extends Object> rootContexts,
Set<String> profileIds) |
private boolean |
_hasUserAnyPermission(ProfileAssignmentStorage profileAssignmentStorage,
Set<? extends Object> rootContexts,
UserIdentity user,
Set<GroupIdentity> userGroups,
Set<String> profileIds) |
private void |
_logResult(UserIdentity user,
Set<GroupIdentity> userGroups,
String profileId,
Object object,
AccessController.AccessResult result) |
private void |
_updatePermissionsMap(Map<String,AccessController.AccessResult> permissionsMap,
Set<String> keys,
AccessController.AccessResult value) |
void |
allowProfileToAnonymous(String profileId,
Object context)
Adds allowed profile an anonymous user has on the given object
|
void |
allowProfileToAnyConnectedUser(String profileId,
Object context)
Adds allowed profile any connected user has on the given object
|
void |
allowProfileToGroup(GroupIdentity group,
String profileId,
Object context)
Allows a group to a profile on a given object
|
void |
allowProfileToUser(UserIdentity user,
String profileId,
Object context)
Allows a user to a profile on a given object
|
void |
denyProfileToAnonymous(String profileId,
Object context)
Adds denied profile an anonymous user has on the given object
|
void |
denyProfileToAnyConnectedUser(String profileId,
Object context)
Adds denied profile any connected user has on the given object
|
void |
denyProfileToGroup(GroupIdentity group,
String profileId,
Object context)
Denies a group to a profile on a given object
|
void |
denyProfileToUser(UserIdentity user,
String profileId,
Object context)
Denies a user to a profile on a given object
|
Set<GroupIdentity> |
getAllowedGroups(Object object,
String profileId)
Gets the groups that have the given allowed profile on the given object
|
Set<String> |
getAllowedProfilesForAnonymous(Object context)
Gets the allowed profiles for Anonymous user on the given object
|
Set<String> |
getAllowedProfilesForAnyConnectedUser(Object context)
Gets the allowed profiles for any connected user on the given object
|
Set<String> |
getAllowedProfilesForGroup(Object object,
GroupIdentity group)
Gets the allowed profiles for the given group on the given object
|
Map<GroupIdentity,Set<String>> |
getAllowedProfilesForGroups(Object object)
Gets the allowed profiles by groups on the given object
|
Set<String> |
getAllowedProfilesForUser(Object object,
UserIdentity user)
Gets the allowed profiles for the given user on the given object
|
Map<UserIdentity,Set<String>> |
getAllowedProfilesForUsers(Object object)
Gets the allowed profiles by users on the given object
|
Set<UserIdentity> |
getAllowedUsers(Object object,
String profileId)
Gets the users that have the given allowed profile on the given object
|
Set<GroupIdentity> |
getDeniedGroups(Object object,
String profileId)
Gets the groups that have the given denied profile on the given object
|
Set<String> |
getDeniedProfilesForAnonymous(Object context)
Gets the denied profiles for Anonymous user on the given object
|
Set<String> |
getDeniedProfilesForAnyConnectedUser(Object context)
Gets the denied profiles for any connected user on the given object
|
Set<String> |
getDeniedProfilesForGroup(Object object,
GroupIdentity group)
Gets the denied profiles for the given group on the given object
|
Map<GroupIdentity,Set<String>> |
getDeniedProfilesForGroups(Object context)
Gets the denied profiles by groups on the given object
|
Set<String> |
getDeniedProfilesForUser(Object object,
UserIdentity user)
Gets the denied profiles for the given user on the given object
|
Map<UserIdentity,Set<String>> |
getDeniedProfilesForUsers(Object object)
Gets the denied profiles by users on the given object
|
Set<UserIdentity> |
getDeniedUsers(Object object,
String profileId)
Gets the users that have the given denied profile on the given object
|
AccessController.AccessResult |
getPermissionForAnonymous(Set<String> profileIds,
Object object)
Gets the permissions for Anonymous for the given profiles
|
AccessController.AccessResult |
getPermissionForAnyConnectedUser(Set<String> profileIds,
Object object)
Gets the permissions for Anonymous for the given profiles
|
Map<String,AccessController.AccessResult> |
getPermissions(UserIdentity user,
Set<GroupIdentity> userGroups,
Set<String> profileIds,
Object object)
Gets the permissions a user has, given some groups and profiles, on an object.
|
Map<GroupIdentity,AccessController.AccessResult> |
getPermissionsByGroup(Set<String> profileIds,
Object object)
Gets the permission by group only on an object, according to the given profiles.
|
Map<String,AccessController.AccessResult> |
getPermissionsByProfile(UserIdentity user,
Set<GroupIdentity> userGroups,
Object object)
Gets the permissions a user has on an object, for every profile in the application.
|
Map<UserIdentity,AccessController.AccessResult> |
getPermissionsByUser(Set<String> profileIds,
Object object)
Gets the permission by user only on an object, according to the given profiles.
|
boolean |
hasAnonymousAnyPermission(Set<? extends Object> rootContexts,
Set<String> profileIds)
Returns true if anybody has a permission on at least one object, given some profiles
|
boolean |
hasAnyConnectedUserAnyPermission(Set<? extends Object> rootContexts,
Set<String> profileIds)
Returns true if any connected user has a permission on at least one object, given some profiles
|
boolean |
hasUserAnyPermission(Set<? extends Object> rootContexts,
UserIdentity user,
Set<GroupIdentity> userGroups,
Set<String> profileIds)
Returns true if the user has a permission on at least one object, given some groups and profiles
|
void |
removeAllowedProfileFromAnonymous(String profileId,
Object context)
Removes allowed profile an anonymous user has on the given object
|
void |
removeAllowedProfileFromAnyConnectedUser(String profileId,
Object context)
Removes allowed profile any connected user has on the given object
|
void |
removeAllowedProfileFromGroup(GroupIdentity group,
String profileId,
Object context)
Removes the association between a group and an allowed profile on a given object
|
void |
removeAllowedProfileFromUser(UserIdentity user,
String profileId,
Object context)
Removes the association between a user and an allowed profile on a given object
|
void |
removeDeniedProfileFromAnonymous(String profileId,
Object context)
Removes denied profile an anonymous user has on the given object
|
void |
removeDeniedProfileFromAnyConnectedUser(String profileId,
Object context)
Removes denied profile any connected user has on the given object
|
void |
removeDeniedProfileFromGroup(GroupIdentity group,
String profileId,
Object context)
Removes the association between a group and a denied profile on a given object
|
void |
removeDeniedProfileFromUser(UserIdentity user,
String profileId,
Object context)
Removes the association between a user and a denied profile on a given object
|
addComponent, addExtension, contextualize, dispose, getExtension, getExtensionsIds, hasExtension, initialize, initializeExtensions, servicegetLogger, setLoggerpublic ProfileAssignmentStorageExtensionPoint()
public Map<String,AccessController.AccessResult> getPermissions(UserIdentity user, Set<GroupIdentity> userGroups, Set<String> profileIds, Object object)
user - The useruserGroups - The groupsprofileIds - The ids of the profilesobject - The objectprivate void _fillAllowedProfilesForAnonymous(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillDeniedProfilesForAnonymous(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillDeniedProfilesForUser(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillAllowedProfilesForUser(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillDeniedProfilesAnyConnectedUser(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillAllowedProfilesAnyConnectedUser(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillDeniedProfilesForGroups(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _fillAllowedProfilesForGroups(Map<String,AccessController.AccessResult> results, UserIdentity user, Set<GroupIdentity> userGroups, Collection<String> profileIds, Object object)
private void _logResult(UserIdentity user, Set<GroupIdentity> userGroups, String profileId, Object object, AccessController.AccessResult result)
public boolean hasUserAnyPermission(Set<? extends Object> rootContexts, UserIdentity user, Set<GroupIdentity> userGroups, Set<String> profileIds)
rootContexts - The root contexts object where to seekuser - The useruserGroups - The groupsprofileIds - The ids of the profilesprivate boolean _hasUserAnyPermission(ProfileAssignmentStorage profileAssignmentStorage, Set<? extends Object> rootContexts, UserIdentity user, Set<GroupIdentity> userGroups, Set<String> profileIds)
public boolean hasAnonymousAnyPermission(Set<? extends Object> rootContexts, Set<String> profileIds)
rootContexts - The root contexts object where to seekprofileIds - The ids of the profilesprivate boolean _hasAnonymousAnyPermission(ProfileAssignmentStorage profileAssignmentStorage, Set<? extends Object> rootContexts, Set<String> profileIds)
public boolean hasAnyConnectedUserAnyPermission(Set<? extends Object> rootContexts, Set<String> profileIds)
rootContexts - The root contexts object where to seekprofileIds - The ids of the profilesprivate boolean _hasAnyConnectedUserAnyPermission(ProfileAssignmentStorage profileAssignmentStorage, Set<? extends Object> rootContexts, Set<String> profileIds)
public Map<String,AccessController.AccessResult> getPermissionsByProfile(UserIdentity user, Set<GroupIdentity> userGroups, Object object)
user - The useruserGroups - The groupsobject - The objectprivate void _updatePermissionsMap(Map<String,AccessController.AccessResult> permissionsMap, Set<String> keys, AccessController.AccessResult value)
public AccessController.AccessResult getPermissionForAnonymous(Set<String> profileIds, Object object)
profileIds - The profiles to get permissions onobject - The objectpublic AccessController.AccessResult getPermissionForAnyConnectedUser(Set<String> profileIds, Object object)
profileIds - The profiles to get permissions onobject - The objectpublic Map<UserIdentity,AccessController.AccessResult> getPermissionsByUser(Set<String> profileIds, Object object)
profileIds - The ids of the profilesobject - The objectpublic Map<GroupIdentity,AccessController.AccessResult> getPermissionsByGroup(Set<String> profileIds, Object object)
profileIds - The ids of the profilesobject - The objectpublic Set<String> getAllowedProfilesForAnyConnectedUser(Object context)
context - The object contextpublic Set<String> getDeniedProfilesForAnyConnectedUser(Object context)
context - The object contextpublic void allowProfileToAnyConnectedUser(String profileId, Object context)
context - The object contextprofileId - The profile to addpublic void denyProfileToAnyConnectedUser(String profileId, Object context)
profileId - The profile to addcontext - The object contextpublic void removeAllowedProfileFromAnyConnectedUser(String profileId, Object context)
profileId - The profile to removecontext - The object contextpublic void removeDeniedProfileFromAnyConnectedUser(String profileId, Object context)
context - The object contextprofileId - The profile to removepublic Set<String> getAllowedProfilesForAnonymous(Object context)
context - The object contextpublic Set<String> getDeniedProfilesForAnonymous(Object context)
context - The object contextpublic void allowProfileToAnonymous(String profileId, Object context)
profileId - The profile to addcontext - The object contextpublic void denyProfileToAnonymous(String profileId, Object context)
profileId - The profile to addcontext - The object contextpublic void removeAllowedProfileFromAnonymous(String profileId, Object context)
profileId - The profile to removecontext - The object contextpublic void removeDeniedProfileFromAnonymous(String profileId, Object context)
context - The object contextprofileId - The profile to removepublic Set<UserIdentity> getAllowedUsers(Object object, String profileId)
object - The object to testprofileId - The id of the profilepublic Set<UserIdentity> getDeniedUsers(Object object, String profileId)
object - The object to testprofileId - The id of the profilepublic Set<String> getAllowedProfilesForUser(Object object, UserIdentity user)
object - The object to testuser - The userpublic Set<String> getDeniedProfilesForUser(Object object, UserIdentity user)
object - The object to testuser - The userpublic Map<UserIdentity,Set<String>> getAllowedProfilesForUsers(Object object)
object - The context objectpublic Map<UserIdentity,Set<String>> getDeniedProfilesForUsers(Object object)
object - The context objectpublic void allowProfileToUser(UserIdentity user, String profileId, Object context)
user - The user to addprofileId - The id of the profilecontext - The object contextpublic void denyProfileToUser(UserIdentity user, String profileId, Object context)
user - The user to addprofileId - The id of the profilecontext - The object contextpublic void removeAllowedProfileFromUser(UserIdentity user, String profileId, Object context)
user - The user to removecontext - The object contextprofileId - The id of the profilepublic void removeDeniedProfileFromUser(UserIdentity user, String profileId, Object context)
user - The user to removeprofileId - The id of the profilecontext - The object contextpublic Set<GroupIdentity> getAllowedGroups(Object object, String profileId)
object - The object to testprofileId - The id of the profilepublic Set<GroupIdentity> getDeniedGroups(Object object, String profileId)
object - The object to testprofileId - The id of the profilepublic Set<String> getAllowedProfilesForGroup(Object object, GroupIdentity group)
object - The object to testgroup - The grouppublic Set<String> getDeniedProfilesForGroup(Object object, GroupIdentity group)
object - The object to testgroup - The grouppublic Map<GroupIdentity,Set<String>> getAllowedProfilesForGroups(Object object)
object - The context objectpublic Map<GroupIdentity,Set<String>> getDeniedProfilesForGroups(Object context)
context - The object context to testpublic void allowProfileToGroup(GroupIdentity group, String profileId, Object context)
group - The group to addprofileId - The id of the profilecontext - The object contextpublic void denyProfileToGroup(GroupIdentity group, String profileId, Object context)
group - The group to addprofileId - The id of the profilecontext - The object contextpublic void removeAllowedProfileFromGroup(GroupIdentity group, String profileId, Object context)
group - The group to removeprofileId - The id of the profilecontext - The object contextpublic void removeDeniedProfileFromGroup(GroupIdentity group, String profileId, Object context)
group - The group to removeprofileId - The id of the profilecontext - The object contextprivate Optional<ProfileAssignmentStorage> _getFirstProfileAssignmentStorage(Object object)
private Optional<ModifiableProfileAssignmentStorage> _getFirstModifiableProfileAssignmentStorage(Object object)