Package org.ametys.core.right
Interface ProfileAssignmentStorage
- All Superinterfaces:
- Prioritizable
- All Known Subinterfaces:
- ModifiableProfileAssignmentStorage
- All Known Implementing Classes:
- ACLAmetysObjectProfileAssignmentStorage,- JdbcProfileAssignmentStorage,- ModifiableACLAmetysObjectProfileAssignmentStorage
This interface is for read-only profile assignments storage
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumKeys for method that can return profiles of anonymous or any connected userstatic enumKeys for method that can return profiles of user or groups
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intMaximum priority.static final intMinimum priority.
- 
Method SummaryModifier and TypeMethodDescriptionGets the allowed profiles any connected user has on the given objectgetProfilesForGroups(Object object, Set<GroupIdentity> groups) Gets the groups that have allowed profiles assigned on the given objectgetProfilesForUsers(Object object, UserIdentity user) Gets the users that have allowed profiles assigned on the given objecthasAnonymousAnyAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds) Returns some profiles that are matching if anonymous user has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmittedhasAnyConnectedAnyAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds) Returns some profiles that are matching if any connected user has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmittedhasGroupAnyAllowedProfile(Set<? extends Object> rootContexts, Set<GroupIdentity> groups, Set<String> profileIds) Returns some profiles that are matching if group has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmittedhasUserAnyAllowedProfile(Set<? extends Object> rootContexts, UserIdentity user, Set<String> profileIds) Returns some profiles that are matching if user has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmittedbooleanisInheritanceDisallowed(Object object) Returns true if the inheritance of permissions is disallowed on the given objectbooleanisRootContextSupported(Object rootContext) Returns true if this profile storage supports the given object as a root context i.e.booleanisSupported(Object object) Returns true if this profile storage supports the given object, i.e.Methods inherited from interface org.ametys.runtime.plugin.component.PrioritizablegetPriority
- 
Field Details- 
MIN_PRIORITYMinimum priority.- See Also:
 
- 
MAX_PRIORITYMaximum priority.- See Also:
 
 
- 
- 
Method Details- 
hasAnonymousAnyAllowedProfileSet<String> hasAnonymousAnyAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds) Returns some profiles that are matching if anonymous user has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmitted- Parameters:
- rootContexts- The root contexts to search rights for
- profileIds- The ids of the profiles
- Returns:
- If the Set is empty, it means anonymous has no matching profile.
 If the Set is non empty, it contains at least one of the given profile BUT it may not contains all the matching profiles for anonymous AND it can contains some other profiles that were not in the given profiles
 
- 
hasAnyConnectedAnyAllowedProfileSet<String> hasAnyConnectedAnyAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds) Returns some profiles that are matching if any connected user has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmitted- Parameters:
- rootContexts- The root contexts to search rights for
- profileIds- The ids of the profiles
- Returns:
- If the Set is empty, it means the user has no matching profile.
 If the Set is non empty, it contains at least one of the given profile BUT it may not contains all the matching profiles for the user AND it can contains some other profiles that were not in the given profiles
 
- 
hasUserAnyAllowedProfileSet<String> hasUserAnyAllowedProfile(Set<? extends Object> rootContexts, UserIdentity user, Set<String> profileIds) Returns some profiles that are matching if user has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmitted- Parameters:
- rootContexts- The root contexts to search rights for
- user- The user to test
- profileIds- The ids of the profiles
- Returns:
- If the Set is empty, it means any connected user has no matching profile.
 If the Set is non empty, it contains at least one of the given profile BUT it may not contains all the matching profiles for anyconnected user AND it can contains some other profiles that were not in the given profiles
 
- 
hasGroupAnyAllowedProfileSet<String> hasGroupAnyAllowedProfile(Set<? extends Object> rootContexts, Set<GroupIdentity> groups, Set<String> profileIds) Returns some profiles that are matching if group has the allowed profile for any given root context (or any sub context), given some profiles.
 Only supported objects are transmitted- Parameters:
- rootContexts- The root contexts to search rights for
- groups- The groups to test (a single group needs to match)
- profileIds- The ids of the profiles
- Returns:
- If the Set is empty, it means the group has no matching profile.
 If the Set is non empty, it contains at least one of the given profile BUT it may not contains all the matching profiles for the group AND it can contains some other profiles that were not in the given profiles
 
- 
getProfilesForAnonymousAndAnyConnectedUserMap<ProfileAssignmentStorage.AnonymousOrAnyConnectedKeys,Set<String>> getProfilesForAnonymousAndAnyConnectedUser(Object object) Gets the allowed profiles any connected user has on the given object- Parameters:
- object- The object
- Returns:
- a map containing allowed/denied profiles that anonymous and any connected user has on the given object
 
- 
getProfilesForUsersMap<UserIdentity,Map<ProfileAssignmentStorage.UserOrGroup, getProfilesForUsersSet<String>>> (Object object, UserIdentity user) Gets the users that have allowed profiles assigned on the given object- Parameters:
- object- The object to test
- user- The user to get profiles for. Can be null to get profiles for all users that have rights
- Returns:
- The map of allowed users with their assigned allowed/denied profiles
 
- 
getProfilesForGroupsMap<GroupIdentity,Map<ProfileAssignmentStorage.UserOrGroup, getProfilesForGroupsSet<String>>> (Object object, Set<GroupIdentity> groups) Gets the groups that have allowed profiles assigned on the given object- Parameters:
- object- The object to test
- groups- The group to get profiles for. Can be null to get profiles for all groups that have rights
- Returns:
- The map of allowed/denied groups with their assigned profiles
 
- 
isSupportedReturns true if this profile storage supports the given object, i.e. if it is able to retrieve the allowed users/groups on that object- Parameters:
- object- The object to test
- Returns:
- true if this profile storage supports the given object
 
- 
isRootContextSupportedReturns true if this profile storage supports the given object as a root context i.e. it can seek any permission under this object- Parameters:
- rootContext- The object to start searching
- Returns:
- true if this profile storage support this a as root context to search in
 
- 
isInheritanceDisallowedReturns true if the inheritance of permissions is disallowed on the given object- Parameters:
- object- The object to test
- Returns:
- true if the inheritance of permissions is disallowed on the given object
 
 
-