Interface AuthorizableWrapper


@ProviderType public interface AuthorizableWrapper
A wrapper for working with JackRabbit Authorizables in JSPs and Sling Models from a Resource
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.apache.jackrabbit.api.security.user.Authorizable
    Gets the JackRabbit Authorizable
    @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable>
    Gets the declared members of this authorizable.
    @NotNull Iterator<org.apache.jackrabbit.api.security.user.Group>
    Get the groups this authorizable is a member of
    @NotNull Iterator<String>
    Gets a collection of all of the groups this user belongs to including containing groups.
    @Nullable String
    Get the id of the current user.
    @Nullable Locale
    Gets the locale configured for the authorizable
    @Nullable String
    Gets the locale tag configured for the authorizable
    @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable>
    Gets the transitive members of this authorizable.
    @NotNull Iterator<org.apache.jackrabbit.api.security.user.Group>
    Gets the transitive membership of this authorizable
    boolean
    Returns true if the authorizable is a user and is the admin user or is a member of the administrators group.
    boolean
    isMember(String groupName)
    Returns true if the authorizable is a member of the group
  • Method Details

    • getAuthorizable

      @NotNull @NotNull org.apache.jackrabbit.api.security.user.Authorizable getAuthorizable()
      Gets the JackRabbit Authorizable
      Returns:
      a JackRabbit Authorizable
    • getDeclaredMembers

      @NotNull @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> getDeclaredMembers()
      Gets the declared members of this authorizable. For Users this will return an empty iterator.
      Returns:
      the declared members of this authorizable
    • getDeclaredMembership

      @NotNull @NotNull Iterator<org.apache.jackrabbit.api.security.user.Group> getDeclaredMembership()
      Get the groups this authorizable is a member of
      Returns:
      the direct membership
    • getGroupNames

      @NotNull @NotNull Iterator<String> getGroupNames()
      Gets a collection of all of the groups this user belongs to including containing groups.
      Returns:
      the groups the user belongs to
    • getId

      @Nullable @Nullable String getId()
      Get the id of the current user.
      Returns:
      the current user's ID
    • getLocaleTag

      @Nullable @Nullable String getLocaleTag()
      Gets the locale tag configured for the authorizable
      Returns:
      the locale tag
    • getLocale

      @Nullable @Nullable Locale getLocale()
      Gets the locale configured for the authorizable
      Returns:
      the locale
    • getMembers

      @NotNull @NotNull Iterator<org.apache.jackrabbit.api.security.user.Authorizable> getMembers()
      Gets the transitive members of this authorizable. For Users this will return an empty iterator.
      Returns:
      the transitive members of this authorizable
    • getMembership

      @NotNull @NotNull Iterator<org.apache.jackrabbit.api.security.user.Group> getMembership()
      Gets the transitive membership of this authorizable
      Returns:
      the transitive membership
    • isAdministrator

      boolean isAdministrator()
      Returns true if the authorizable is a user and is the admin user or is a member of the administrators group.
      Returns:
      true if the user is a super user
    • isMember

      boolean isMember(String groupName)
      Returns true if the authorizable is a member of the group
      Parameters:
      groupName - the name of the group to check
      Returns:
      true if the authorizable is a member of the group