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
public class ModifiableACLAmetysObjectProfileAssignmentStorage extends ACLAmetysObjectProfileAssignmentStorage implements ModifiableProfileAssignmentStorage
Implementation ofProfileAssignmentStorage
forModifiableACLAmetysObject
s which stores profile assignments in subnodes of the node representing this object.
-
-
Field Summary
-
Fields inherited from interface org.ametys.core.right.ProfileAssignmentStorage
MAX_PRIORITY, MIN_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ModifiableACLAmetysObjectProfileAssignmentStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 objectSet<UserIdentity>
getAllowedUsers(Object object, String profileId)
Gets the users that have the given allowed profile on the given objectint
getPriority()
Returns the priority of this profile storage TheProfileAssignmentStorageExtensionPoint
will take the profile storage which supports the object with the highest priority to return the allowed/denied users/groupsboolean
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 user-
Methods inherited from class org.ametys.plugins.repository.ACLAmetysObjectProfileAssignmentStorage
getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, hasAnonymousAllowedProfile, hasAnonymousDeniedProfile, hasAnyConnectedAllowedProfile, hasAnyConnectedDeniedProfile, hasGroupAllowedProfile, hasGroupDeniedProfile, hasUserAllowedProfile, hasUserDeniedProfile, isAnonymousAllowed, isAnonymousDenied, isAnyConnectedUserAllowed, isAnyConnectedUserDenied, 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
getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, hasAnonymousAllowedProfile, hasAnonymousDeniedProfile, hasAnyConnectedAllowedProfile, hasAnyConnectedDeniedProfile, hasGroupAllowedProfile, hasGroupDeniedProfile, hasUserAllowedProfile, hasUserDeniedProfile, isAnonymousAllowed, isAnonymousDenied, isAnyConnectedUserAllowed, isAnyConnectedUserDenied, isInheritanceDisallowed, isRootContextSupported
-
-
-
-
Constructor Detail
-
ModifiableACLAmetysObjectProfileAssignmentStorage
public ModifiableACLAmetysObjectProfileAssignmentStorage()
-
-
Method Detail
-
addAllowedProfilesForAnyConnectedUser
public void addAllowedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
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
public void removeAllowedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
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
public void addDeniedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
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
public void removeDeniedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
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
public void addAllowedProfilesForAnonymous(Object object, Set<String> profileIds)
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
public void removeAllowedProfilesForAnonymous(Object object, Set<String> profileIds)
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
public void addDeniedProfilesForAnonymous(Object object, Set<String> profileIds)
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
public void removeDeniedProfilesForAnonymous(Object object, Set<String> profileIds)
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
-
getAllowedUsers
public Set<UserIdentity> getAllowedUsers(Object object, String profileId)
Description copied from interface:ProfileAssignmentStorage
Gets the users that have the given allowed profile on the given object- Specified by:
getAllowedUsers
in interfaceProfileAssignmentStorage
- Overrides:
getAllowedUsers
in classACLAmetysObjectProfileAssignmentStorage
- Parameters:
object
- The object to testprofileId
- The id of the profile- Returns:
- The allowed users with that profile on that object
-
addAllowedUsers
public void addAllowedUsers(Set<UserIdentity> users, Object object, String profileId)
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
public void removeAllowedUsers(Set<UserIdentity> users, Object object, String profileId)
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
public void removeAllowedUsers(Set<UserIdentity> users, Object object)
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
public void addAllowedGroups(Set<GroupIdentity> groups, Object object, String profileId)
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
public void removeAllowedGroups(Set<GroupIdentity> groups, Object object, String profileId)
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
public void removeAllowedGroups(Set<GroupIdentity> groups, Object object)
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
public void addDeniedUsers(Set<UserIdentity> users, Object object, String profileId)
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
public void removeDeniedUsers(Set<UserIdentity> users, Object object, String profileId)
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
public void removeDeniedUsers(Set<UserIdentity> users, Object object)
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
public void addDeniedGroups(Set<GroupIdentity> groups, Object object, String profileId)
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
public void removeDeniedGroups(Set<GroupIdentity> groups, Object object, String profileId)
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
public void removeDeniedGroups(Set<GroupIdentity> groups, Object object)
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
public void removeProfile(String profileId)
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
public void removeUser(UserIdentity user)
Description copied from interface:ModifiableProfileAssignmentStorage
Removes all the assignments involving this user- Specified by:
removeUser
in interfaceModifiableProfileAssignmentStorage
- Parameters:
user
- The user
-
removeGroup
public void removeGroup(GroupIdentity group)
Description copied from interface:ModifiableProfileAssignmentStorage
Removes all the assignments involving this group- Specified by:
removeGroup
in interfaceModifiableProfileAssignmentStorage
- Parameters:
group
- The group
-
disallowInheritance
public void disallowInheritance(Object object, boolean disallow)
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
public boolean isSupported(Object object)
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
public int getPriority()
Description copied from interface:ProfileAssignmentStorage
Returns the priority of this profile storage TheProfileAssignmentStorageExtensionPoint
will take the profile storage which supports the object with the highest priority to return the allowed/denied users/groups- Specified by:
getPriority
in interfaceProfileAssignmentStorage
- Overrides:
getPriority
in classACLAmetysObjectProfileAssignmentStorage
- Returns:
- the priority of this profile storage
-
-