Interface PrincipalSetPolicy
-
- All Superinterfaces:
javax.jcr.security.AccessControlPolicy
- All Known Subinterfaces:
CugPolicy
@ProviderType public interface PrincipalSetPolicy extends javax.jcr.security.AccessControlPolicyExtension of the JCRAccessControlPolicyintended to grant a set ofPrincipals 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 givenPrincipalSetPolicyis being applied.The very details on what actions are granted by a given
PrincipalSetPolicyremains an implementation detail. Similarly a given permission model is in charge of defining the interactions and effects differentpolicieswill have if used together in the same repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddPrincipals(@NotNull java.security.Principal... principals)AddPrincipals that are allowed to perform some implementation specific actions on those items where this policy takes effect.@NotNull java.util.Set<java.security.Principal>getPrincipals()Returns the set ofPrincipals that are allowed to perform implementation specific actions on the items affected by this policy.booleanremovePrincipals(@NotNull java.security.Principal... principals)Remove the specifiedPrincipals 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 java.util.Set<java.security.Principal> getPrincipals()
Returns the set ofPrincipals that are allowed to perform implementation specific actions on the items affected by this policy.- Returns:
- The set of
Principals that are allowed to perform implementation specific actions on the those items where this policy takes effect.
-
addPrincipals
boolean addPrincipals(@NotNull @NotNull java.security.Principal... principals) throws javax.jcr.security.AccessControlExceptionAddPrincipals that are allowed to perform some implementation specific actions on those items where this policy takes effect.- Parameters:
principals- ThePrincipals that are granted access.- Returns:
trueif this policy was modified;falseotherwise.- Throws:
javax.jcr.security.AccessControlException- If any of the specified principals is considered invalid or if another access control specific error occurs.
-
removePrincipals
boolean removePrincipals(@NotNull @NotNull java.security.Principal... principals) throws javax.jcr.security.AccessControlExceptionRemove the specifiedPrincipals 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- ThePrincipals for which access should be revoked.- Returns:
trueif this policy was modified;falseotherwise.- Throws:
javax.jcr.security.AccessControlException- If any of the specified principals is considered invalid or if another access control specific error occurs.
-
-