Class UserUtil

  • All Implemented Interfaces:
    UserConstants

    public final class UserUtil
    extends java.lang.Object
    implements UserConstants
    Utility methods for user management.
    • Method Detail

      • isAdmin

        public static boolean isAdmin​(@NotNull
                                      @NotNull ConfigurationParameters parameters,
                                      @NotNull
                                      @NotNull java.lang.String userId)
      • getAdminId

        @NotNull
        public static @NotNull java.lang.String getAdminId​(@NotNull
                                                           @NotNull ConfigurationParameters parameters)
      • getAnonymousId

        @NotNull
        public static @NotNull java.lang.String getAnonymousId​(@NotNull
                                                               @NotNull ConfigurationParameters parameters)
      • isType

        public static boolean isType​(@Nullable
                                     @Nullable Tree authorizableTree,
                                     @NotNull
                                     @NotNull AuthorizableType type)
      • getType

        @Nullable
        public static @Nullable AuthorizableType getType​(@NotNull
                                                         @NotNull Tree authorizableNode)
      • getType

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

        public static boolean isSystemUser​(@Nullable
                                           @Nullable Tree authorizableTree)
      • getAuthorizableRootPath

        @Nullable
        public static @Nullable java.lang.String getAuthorizableRootPath​(@NotNull
                                                                         @NotNull ConfigurationParameters parameters,
                                                                         @Nullable
                                                                         @Nullable AuthorizableType type)
      • getAuthorizableId

        @Nullable
        public static @Nullable java.lang.String getAuthorizableId​(@NotNull
                                                                   @NotNull Tree authorizableTree)
      • getAuthorizableId

        @NotNull
        public static @NotNull java.lang.String getAuthorizableId​(@NotNull
                                                                  @NotNull 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.