Interface PrincipalSetPolicy
-
- All Superinterfaces:
AccessControlPolicy
- All Known Subinterfaces:
CugPolicy
@ProviderType public interface PrincipalSetPolicy extends AccessControlPolicy
Extension of the JCRAccessControlPolicy
intended to grant a set ofPrincipal
s the ability to perform certain actions. The scope of this policy (and thus the affected items) is an implementation detail; it may e.g. take effect on the tree defined by theNode
, where a givenPrincipalSetPolicy
is being applied.The very details on what actions are granted by a given
PrincipalSetPolicy
remains an implementation detail. Similarly a given permission model is in charge of defining the interactions and effects differentpolicies
will have if used together in the same repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addPrincipals(@NotNull Principal... principals)
AddPrincipal
s that are allowed to perform some implementation specific actions on those items where this policy takes effect.@NotNull Set<Principal>
getPrincipals()
Returns the set ofPrincipal
s that are allowed to perform implementation specific actions on the items affected by this policy.boolean
removePrincipals(@NotNull Principal... principals)
Remove the specifiedPrincipal
s for the set of allowed principals thus revoking their ability to perform the implementation specific actions on items where this policy takes effect.
-
-
-
Method Detail
-
getPrincipals
@NotNull @NotNull Set<Principal> getPrincipals()
Returns the set ofPrincipal
s that are allowed to perform implementation specific actions on the items affected by this policy.- Returns:
- The set of
Principal
s that are allowed to perform implementation specific actions on the those items where this policy takes effect.
-
addPrincipals
boolean addPrincipals(@NotNull @NotNull Principal... principals) throws AccessControlException
AddPrincipal
s that are allowed to perform some implementation specific actions on those items where this policy takes effect.- Parameters:
principals
- ThePrincipal
s that are granted access.- Returns:
true
if this policy was modified;false
otherwise.- Throws:
AccessControlException
- If any of the specified principals is considered invalid or if another access control specific error occurs.
-
removePrincipals
boolean removePrincipals(@NotNull @NotNull Principal... principals) throws AccessControlException
Remove the specifiedPrincipal
s for the set of allowed principals thus revoking their ability to perform the implementation specific actions on items where this policy takes effect.- Parameters:
principals
- ThePrincipal
s for which access should be revoked.- Returns:
true
if this policy was modified;false
otherwise.- Throws:
AccessControlException
- If any of the specified principals is considered invalid or if another access control specific error occurs.
-
-