Interface Filter
-
@ProviderType public interface FilterInterface that allows to define the principals for which principal based access control management and permission evaluation can be executed. For any other principals this module would never take effect.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanHandle(@NotNull Set<Principal> principals)Reveals if this filter implementation is able to handle the given set of principals.@NotNull StringgetOakPath(@NotNull Principal validPrincipal)Returns the Oak path of theTreeto which the policy for the givenvalidPrincipalwill be bound.@Nullable PrincipalgetValidPrincipal(@NotNull String oakPath)Retrieves theItemBasedPrincipalfor the givenoakPathand returns it if it is considered valid by theFilterimplementation.
-
-
-
Method Detail
-
canHandle
boolean canHandle(@NotNull @NotNull Set<Principal> principals)Reveals if this filter implementation is able to handle the given set of principals.- Parameters:
principals- A set of principals.- Returns:
trueif the principals can be dealt with by this filter implementation,falseotherwise.
-
getOakPath
@NotNull @NotNull String getOakPath(@NotNull @NotNull Principal validPrincipal)
Returns the Oak path of theTreeto which the policy for the givenvalidPrincipalwill be bound. This method can rely on the fact that the given principal has beenvalidatedbefore and is not expected to validate the principal.- Parameters:
validPrincipal- A valid principal i.e. that has been validated throughcanHandle(Set).- Returns:
- The absolute oak path to an exiting
Tree. The policy for the given principal will be bound to that tree. - Throws:
IllegalArgumentException- If the specified principal is not validated/valid.
-
getValidPrincipal
@Nullable @Nullable Principal getValidPrincipal(@NotNull @NotNull String oakPath)
Retrieves theItemBasedPrincipalfor the givenoakPathand returns it if it is considered valid by theFilterimplementation. Otherwise this method returnsnull.- Parameters:
oakPath- A non-null Oak path pointing to anItemBasedPrincipal.- Returns:
- A valid principal or
nullif no valid principal can be retrieved/exists for the given path.
-
-