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 ofProfileAssignmentStorageforModifiableACLAmetysObjects 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
Constructors Constructor Description ModifiableACLAmetysObjectProfileAssignmentStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllowedGroups(Set<GroupIdentity> groups, Object object, String profileId)Associates some groups with an allowed profile on a given objectvoidaddAllowedProfilesForAnonymous(Object object, Set<String> profileIds)Adds allowed profiles an anonymous user has on the given objectvoidaddAllowedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)Adds allowed profiles any connected user has on the given objectvoidaddAllowedUsers(Set<UserIdentity> users, Object object, String profileId)Associates some users with an allowed profile on a given objectvoidaddDeniedGroups(Set<GroupIdentity> groups, Object object, String profileId)Associates some groups with a denied profile on a given objectvoidaddDeniedProfilesForAnonymous(Object object, Set<String> profileIds)Adds denied profiles an anonymous user has on the given objectvoidaddDeniedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)Adds denied profiles any connected user has on the given objectvoidaddDeniedUsers(Set<UserIdentity> users, Object object, String profileId)Associates some users with a denied profile on a given objectvoiddisallowInheritance(Object object, boolean disallow)Allow or disallow inheritance of permissions on the given objectintgetPriority()Get the priority for the component.booleanisSupported(Object object)Returns true if this profile storage supports the given object, i.e.voidremoveAllowedGroups(Set<GroupIdentity> groups, Object object)Removes the association between some groups and all allowed profiles on a given objectvoidremoveAllowedGroups(Set<GroupIdentity> groups, Object object, String profileId)Removes the association between some groups and an allowed profile on a given objectvoidremoveAllowedProfilesForAnonymous(Object object, Set<String> profileIds)Removes allowed profiles an anonymous user has on the given objectvoidremoveAllowedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)Removes allowed profiles any connected user has on the given objectvoidremoveAllowedUsers(Set<UserIdentity> users, Object object)Removes the association between some users and all allowed profiles on a given objectvoidremoveAllowedUsers(Set<UserIdentity> users, Object object, String profileId)Removes the association between some users and an allowed profile on a given objectvoidremoveDeniedGroups(Set<GroupIdentity> groups, Object object)Removes the association between some groups and all denied profiles on a given objectvoidremoveDeniedGroups(Set<GroupIdentity> groups, Object object, String profileId)Removes the association between some groups and a denied profile on a given objectvoidremoveDeniedProfilesForAnonymous(Object object, Set<String> profileIds)Removes denied profiles an anonymous user has on the given objectvoidremoveDeniedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)Removes denied profiles any connected user has on the given objectvoidremoveDeniedUsers(Set<UserIdentity> users, Object object)Removes the association between some users and all denied profiles on a given objectvoidremoveDeniedUsers(Set<UserIdentity> users, Object object, String profileId)Removes the association between some users and an denied profile on a given objectvoidremoveGroup(GroupIdentity group)Removes all the assignments involving this groupvoidremoveProfile(String profileId)Removes all the assignments between this profile and users/groups/anonymous/any connectedvoidremoveUser(UserIdentity user)Removes all the assignments involving this user-
Methods 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 Detail
-
ModifiableACLAmetysObjectProfileAssignmentStorage
public ModifiableACLAmetysObjectProfileAssignmentStorage()
-
-
Method Detail
-
addAllowedProfilesForAnyConnectedUser
public void addAllowedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageAdds allowed profiles any connected user has on the given object- Specified by:
addAllowedProfilesForAnyConnectedUserin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to add
-
removeAllowedProfilesForAnyConnectedUser
public void removeAllowedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves allowed profiles any connected user has on the given object- Specified by:
removeAllowedProfilesForAnyConnectedUserin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to remove
-
addDeniedProfilesForAnyConnectedUser
public void addDeniedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageAdds denied profiles any connected user has on the given object- Specified by:
addDeniedProfilesForAnyConnectedUserin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to add
-
removeDeniedProfilesForAnyConnectedUser
public void removeDeniedProfilesForAnyConnectedUser(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves denied profiles any connected user has on the given object- Specified by:
removeDeniedProfilesForAnyConnectedUserin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to remove
-
addAllowedProfilesForAnonymous
public void addAllowedProfilesForAnonymous(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageAdds allowed profiles an anonymous user has on the given object- Specified by:
addAllowedProfilesForAnonymousin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to add
-
removeAllowedProfilesForAnonymous
public void removeAllowedProfilesForAnonymous(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves allowed profiles an anonymous user has on the given object- Specified by:
removeAllowedProfilesForAnonymousin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to remove
-
addDeniedProfilesForAnonymous
public void addDeniedProfilesForAnonymous(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageAdds denied profiles an anonymous user has on the given object- Specified by:
addDeniedProfilesForAnonymousin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to add
-
removeDeniedProfilesForAnonymous
public void removeDeniedProfilesForAnonymous(Object object, Set<String> profileIds)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves denied profiles an anonymous user has on the given object- Specified by:
removeDeniedProfilesForAnonymousin interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectprofileIds- The profiles to remove
-
addAllowedUsers
public void addAllowedUsers(Set<UserIdentity> users, Object object, String profileId)
Description copied from interface:ModifiableProfileAssignmentStorageAssociates some users with an allowed profile on a given object- Specified by:
addAllowedUsersin 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:ModifiableProfileAssignmentStorageRemoves the association between some users and an allowed profile on a given object- Specified by:
removeAllowedUsersin 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:ModifiableProfileAssignmentStorageRemoves the association between some users and all allowed profiles on a given object- Specified by:
removeAllowedUsersin interfaceModifiableProfileAssignmentStorage- Parameters:
users- The users to removeobject- The object
-
addAllowedGroups
public void addAllowedGroups(Set<GroupIdentity> groups, Object object, String profileId)
Description copied from interface:ModifiableProfileAssignmentStorageAssociates some groups with an allowed profile on a given object- Specified by:
addAllowedGroupsin 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:ModifiableProfileAssignmentStorageRemoves the association between some groups and an allowed profile on a given object- Specified by:
removeAllowedGroupsin 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:ModifiableProfileAssignmentStorageRemoves the association between some groups and all allowed profiles on a given object- Specified by:
removeAllowedGroupsin interfaceModifiableProfileAssignmentStorage- Parameters:
groups- The groups to removeobject- The object
-
addDeniedUsers
public void addDeniedUsers(Set<UserIdentity> users, Object object, String profileId)
Description copied from interface:ModifiableProfileAssignmentStorageAssociates some users with a denied profile on a given object- Specified by:
addDeniedUsersin 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:ModifiableProfileAssignmentStorageRemoves the association between some users and an denied profile on a given object- Specified by:
removeDeniedUsersin 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:ModifiableProfileAssignmentStorageRemoves the association between some users and all denied profiles on a given object- Specified by:
removeDeniedUsersin interfaceModifiableProfileAssignmentStorage- Parameters:
users- The users to removeobject- The object
-
addDeniedGroups
public void addDeniedGroups(Set<GroupIdentity> groups, Object object, String profileId)
Description copied from interface:ModifiableProfileAssignmentStorageAssociates some groups with a denied profile on a given object- Specified by:
addDeniedGroupsin 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:ModifiableProfileAssignmentStorageRemoves the association between some groups and a denied profile on a given object- Specified by:
removeDeniedGroupsin 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:ModifiableProfileAssignmentStorageRemoves the association between some groups and all denied profiles on a given object- Specified by:
removeDeniedGroupsin interfaceModifiableProfileAssignmentStorage- Parameters:
groups- The groups to removeobject- The object
-
removeProfile
public void removeProfile(String profileId)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves all the assignments between this profile and users/groups/anonymous/any connected- Specified by:
removeProfilein interfaceModifiableProfileAssignmentStorage- Parameters:
profileId- The profile to remove
-
removeUser
public void removeUser(UserIdentity user)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves all the assignments involving this user- Specified by:
removeUserin interfaceModifiableProfileAssignmentStorage- Parameters:
user- The user
-
removeGroup
public void removeGroup(GroupIdentity group)
Description copied from interface:ModifiableProfileAssignmentStorageRemoves all the assignments involving this group- Specified by:
removeGroupin interfaceModifiableProfileAssignmentStorage- Parameters:
group- The group
-
disallowInheritance
public void disallowInheritance(Object object, boolean disallow)
Description copied from interface:ModifiableProfileAssignmentStorageAllow or disallow inheritance of permissions on the given object- Specified by:
disallowInheritancein interfaceModifiableProfileAssignmentStorage- Parameters:
object- The objectdisallow- true to disallow inheritance, false otherwise
-
isSupported
public boolean isSupported(Object object)
Description copied from interface:ProfileAssignmentStorageReturns 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:
isSupportedin interfaceProfileAssignmentStorage- Overrides:
isSupportedin 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:PrioritizableGet the priority for the component. On components usingPrioritizableinterface, each implementation define the order. In most cases, less is the number, more prior is the component.- Specified by:
getPriorityin interfacePrioritizable- Overrides:
getPriorityin classACLAmetysObjectProfileAssignmentStorage- Returns:
- the priority
-
-