Package org.ametys.plugins.repository
Class ModifiableACLAmetysObjectProfileAssignmentStorage
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.repository.ACLAmetysObjectProfileAssignmentStorage
org.ametys.plugins.repository.ModifiableACLAmetysObjectProfileAssignmentStorage
- All Implemented Interfaces:
ModifiableProfileAssignmentStorage
,ProfileAssignmentStorage
,LogEnabled
,Prioritizable
public class ModifiableACLAmetysObjectProfileAssignmentStorage
extends ACLAmetysObjectProfileAssignmentStorage
implements ModifiableProfileAssignmentStorage
Implementation of
ProfileAssignmentStorage
for ModifiableACLAmetysObject
s which stores profile assignments in subnodes of the node representing this object.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.core.right.ProfileAssignmentStorage
ProfileAssignmentStorage.AnonymousOrAnyConnectedKeys, ProfileAssignmentStorage.UserOrGroup
-
Field Summary
Fields inherited from interface org.ametys.core.right.ProfileAssignmentStorage
MAX_PRIORITY, MIN_PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllowedGroups
(Set<GroupIdentity> groups, Object object, String profileId) Associates some groups with an allowed profile on a given objectvoid
addAllowedProfilesForAnonymous
(Object object, Set<String> profileIds) Adds allowed profiles an anonymous user has on the given objectvoid
addAllowedProfilesForAnyConnectedUser
(Object object, Set<String> profileIds) Adds allowed profiles any connected user has on the given objectvoid
addAllowedUsers
(Set<UserIdentity> users, Object object, String profileId) Associates some users with an allowed profile on a given objectvoid
addDeniedGroups
(Set<GroupIdentity> groups, Object object, String profileId) Associates some groups with a denied profile on a given objectvoid
addDeniedProfilesForAnonymous
(Object object, Set<String> profileIds) Adds denied profiles an anonymous user has on the given objectvoid
addDeniedProfilesForAnyConnectedUser
(Object object, Set<String> profileIds) Adds denied profiles any connected user has on the given objectvoid
addDeniedUsers
(Set<UserIdentity> users, Object object, String profileId) Associates some users with a denied profile on a given objectvoid
disallowInheritance
(Object object, boolean disallow) Allow or disallow inheritance of permissions on the given objectint
Get the priority for the component.boolean
isSupported
(Object object) Returns true if this profile storage supports the given object, i.e.void
removeAllowedGroups
(Set<GroupIdentity> groups, Object object) Removes the association between some groups and all allowed profiles on a given objectvoid
removeAllowedGroups
(Set<GroupIdentity> groups, Object object, String profileId) Removes the association between some groups and an allowed profile on a given objectvoid
removeAllowedProfilesForAnonymous
(Object object, Set<String> profileIds) Removes allowed profiles an anonymous user has on the given objectvoid
removeAllowedProfilesForAnyConnectedUser
(Object object, Set<String> profileIds) Removes allowed profiles any connected user has on the given objectvoid
removeAllowedUsers
(Set<UserIdentity> users, Object object) Removes the association between some users and all allowed profiles on a given objectvoid
removeAllowedUsers
(Set<UserIdentity> users, Object object, String profileId) Removes the association between some users and an allowed profile on a given objectvoid
removeDeniedGroups
(Set<GroupIdentity> groups, Object object) Removes the association between some groups and all denied profiles on a given objectvoid
removeDeniedGroups
(Set<GroupIdentity> groups, Object object, String profileId) Removes the association between some groups and a denied profile on a given objectvoid
removeDeniedProfilesForAnonymous
(Object object, Set<String> profileIds) Removes denied profiles an anonymous user has on the given objectvoid
removeDeniedProfilesForAnyConnectedUser
(Object object, Set<String> profileIds) Removes denied profiles any connected user has on the given objectvoid
removeDeniedUsers
(Set<UserIdentity> users, Object object) Removes the association between some users and all denied profiles on a given objectvoid
removeDeniedUsers
(Set<UserIdentity> users, Object object, String profileId) Removes the association between some users and an denied profile on a given objectvoid
removeGroup
(GroupIdentity group) Removes all the assignments involving this groupvoid
removeProfile
(String profileId) Removes all the assignments between this profile and users/groups/anonymous/any connectedvoid
removeUser
(UserIdentity user) Removes all the assignments involving this userMethods inherited from class org.ametys.plugins.repository.ACLAmetysObjectProfileAssignmentStorage
getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasAnonymousAnyAllowedProfile, hasAnyConnectedAnyAllowedProfile, hasGroupAnyAllowedProfile, hasUserAnyAllowedProfile, isInheritanceDisallowed, isRootContextSupported
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.core.right.ProfileAssignmentStorage
getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasAnonymousAnyAllowedProfile, hasAnyConnectedAnyAllowedProfile, hasGroupAnyAllowedProfile, hasUserAnyAllowedProfile, isInheritanceDisallowed, isRootContextSupported
-
Constructor Details
-
ModifiableACLAmetysObjectProfileAssignmentStorage
-
-
Method Details
-
addAllowedProfilesForAnyConnectedUser
Description copied from interface:ModifiableProfileAssignmentStorage
Adds allowed profiles any connected user has on the given object- Specified by:
addAllowedProfilesForAnyConnectedUser
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to add
-
removeAllowedProfilesForAnyConnectedUser
Description copied from interface:ModifiableProfileAssignmentStorage
Removes allowed profiles any connected user has on the given object- Specified by:
removeAllowedProfilesForAnyConnectedUser
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to remove
-
addDeniedProfilesForAnyConnectedUser
Description copied from interface:ModifiableProfileAssignmentStorage
Adds denied profiles any connected user has on the given object- Specified by:
addDeniedProfilesForAnyConnectedUser
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to add
-
removeDeniedProfilesForAnyConnectedUser
Description copied from interface:ModifiableProfileAssignmentStorage
Removes denied profiles any connected user has on the given object- Specified by:
removeDeniedProfilesForAnyConnectedUser
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to remove
-
addAllowedProfilesForAnonymous
Description copied from interface:ModifiableProfileAssignmentStorage
Adds allowed profiles an anonymous user has on the given object- Specified by:
addAllowedProfilesForAnonymous
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to add
-
removeAllowedProfilesForAnonymous
Description copied from interface:ModifiableProfileAssignmentStorage
Removes allowed profiles an anonymous user has on the given object- Specified by:
removeAllowedProfilesForAnonymous
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to remove
-
addDeniedProfilesForAnonymous
Description copied from interface:ModifiableProfileAssignmentStorage
Adds denied profiles an anonymous user has on the given object- Specified by:
addDeniedProfilesForAnonymous
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to add
-
removeDeniedProfilesForAnonymous
Description copied from interface:ModifiableProfileAssignmentStorage
Removes denied profiles an anonymous user has on the given object- Specified by:
removeDeniedProfilesForAnonymous
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectprofileIds
- The profiles to remove
-
addAllowedUsers
Description copied from interface:ModifiableProfileAssignmentStorage
Associates some users with an allowed profile on a given object- Specified by:
addAllowedUsers
in interfaceModifiableProfileAssignmentStorage
- Parameters:
users
- The users to addobject
- The objectprofileId
- The id of the profile
-
removeAllowedUsers
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some users and an allowed profile on a given object- Specified by:
removeAllowedUsers
in interfaceModifiableProfileAssignmentStorage
- Parameters:
users
- The users to removeobject
- The objectprofileId
- The id of the profile
-
removeAllowedUsers
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some users and all allowed profiles on a given object- Specified by:
removeAllowedUsers
in interfaceModifiableProfileAssignmentStorage
- Parameters:
users
- The users to removeobject
- The object
-
addAllowedGroups
Description copied from interface:ModifiableProfileAssignmentStorage
Associates some groups with an allowed profile on a given object- Specified by:
addAllowedGroups
in interfaceModifiableProfileAssignmentStorage
- Parameters:
groups
- The groups to addobject
- The objectprofileId
- The id of the profile
-
removeAllowedGroups
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some groups and an allowed profile on a given object- Specified by:
removeAllowedGroups
in interfaceModifiableProfileAssignmentStorage
- Parameters:
groups
- The groups to removeobject
- The objectprofileId
- The id of the profile
-
removeAllowedGroups
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some groups and all allowed profiles on a given object- Specified by:
removeAllowedGroups
in interfaceModifiableProfileAssignmentStorage
- Parameters:
groups
- The groups to removeobject
- The object
-
addDeniedUsers
Description copied from interface:ModifiableProfileAssignmentStorage
Associates some users with a denied profile on a given object- Specified by:
addDeniedUsers
in interfaceModifiableProfileAssignmentStorage
- Parameters:
users
- The users to addobject
- The objectprofileId
- The id of the profile
-
removeDeniedUsers
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some users and an denied profile on a given object- Specified by:
removeDeniedUsers
in interfaceModifiableProfileAssignmentStorage
- Parameters:
users
- The users to removeobject
- The objectprofileId
- The id of the profile
-
removeDeniedUsers
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some users and all denied profiles on a given object- Specified by:
removeDeniedUsers
in interfaceModifiableProfileAssignmentStorage
- Parameters:
users
- The users to removeobject
- The object
-
addDeniedGroups
Description copied from interface:ModifiableProfileAssignmentStorage
Associates some groups with a denied profile on a given object- Specified by:
addDeniedGroups
in interfaceModifiableProfileAssignmentStorage
- Parameters:
groups
- The groups to addobject
- The objectprofileId
- The id of the profile
-
removeDeniedGroups
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some groups and a denied profile on a given object- Specified by:
removeDeniedGroups
in interfaceModifiableProfileAssignmentStorage
- Parameters:
groups
- The groups to removeobject
- The objectprofileId
- The id of the profile
-
removeDeniedGroups
Description copied from interface:ModifiableProfileAssignmentStorage
Removes the association between some groups and all denied profiles on a given object- Specified by:
removeDeniedGroups
in interfaceModifiableProfileAssignmentStorage
- Parameters:
groups
- The groups to removeobject
- The object
-
removeProfile
Description copied from interface:ModifiableProfileAssignmentStorage
Removes all the assignments between this profile and users/groups/anonymous/any connected- Specified by:
removeProfile
in interfaceModifiableProfileAssignmentStorage
- Parameters:
profileId
- The profile to remove
-
removeUser
Description copied from interface:ModifiableProfileAssignmentStorage
Removes all the assignments involving this user- Specified by:
removeUser
in interfaceModifiableProfileAssignmentStorage
- Parameters:
user
- The user
-
removeGroup
Description copied from interface:ModifiableProfileAssignmentStorage
Removes all the assignments involving this group- Specified by:
removeGroup
in interfaceModifiableProfileAssignmentStorage
- Parameters:
group
- The group
-
disallowInheritance
Description copied from interface:ModifiableProfileAssignmentStorage
Allow or disallow inheritance of permissions on the given object- Specified by:
disallowInheritance
in interfaceModifiableProfileAssignmentStorage
- Parameters:
object
- The objectdisallow
- true to disallow inheritance, false otherwise
-
isSupported
Description copied from interface:ProfileAssignmentStorage
Returns true if this profile storage supports the given object, i.e. if it is able to retrieve the allowed users/groups on that object- Specified by:
isSupported
in interfaceProfileAssignmentStorage
- Overrides:
isSupported
in classACLAmetysObjectProfileAssignmentStorage
- Parameters:
object
- The object to test- Returns:
- true if this profile storage supports the given object
-
getPriority
Description copied from interface:Prioritizable
Get the priority for the component. On components usingPrioritizable
interface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriority
in interfacePrioritizable
- Overrides:
getPriority
in classACLAmetysObjectProfileAssignmentStorage
- Returns:
- the priority
-