Class UserUtil

    • Method Detail

      • isType

        public static boolean isType​(@Nullable
                                     @Nullable org.apache.jackrabbit.oak.api.Tree authorizableTree,
                                     @NotNull
                                     @NotNull AuthorizableType type)
      • getType

        @Nullable
        public static @Nullable AuthorizableType getType​(@NotNull
                                                         @NotNull org.apache.jackrabbit.oak.api.Tree authorizableNode)
      • getType

        @Nullable
        public static @Nullable AuthorizableType getType​(@Nullable
                                                         @Nullable String primaryTypeName)
      • isSystemUser

        public static boolean isSystemUser​(@Nullable
                                           @Nullable org.apache.jackrabbit.oak.api.Tree authorizableTree)
      • getAuthorizableId

        @Nullable
        public static @Nullable String getAuthorizableId​(@NotNull
                                                         @NotNull org.apache.jackrabbit.oak.api.Tree authorizableTree)
      • getAuthorizableId

        @NotNull
        public static @NotNull String getAuthorizableId​(@NotNull
                                                        @NotNull org.apache.jackrabbit.oak.api.Tree authorizableTree,
                                                        @NotNull
                                                        @NotNull AuthorizableType type)
        Retrieve the id from the given authorizableTree, which must have been verified for being a valid authorizable of the specified type upfront.
        Parameters:
        authorizableTree - The authorizable tree which must be of the given type/
        type - The type of the authorizable tree.
        Returns:
        The id retrieved from the specified AuthorizableTree.
      • castAuthorizable

        @Nullable
        public static <T extends org.apache.jackrabbit.api.security.user.Authorizable> T castAuthorizable​(@Nullable
                                                                                                          @Nullable org.apache.jackrabbit.api.security.user.Authorizable authorizable,
                                                                                                          Class<T> authorizableClass)
                                                                                                   throws org.apache.jackrabbit.api.security.user.AuthorizableTypeException
        Throws:
        org.apache.jackrabbit.api.security.user.AuthorizableTypeException