Class RoleMapperFactory.NullRoleMapper

java.lang.Object
nxt.authentication.RoleMapperFactory.NullRoleMapper
All Implemented Interfaces:
RoleMapper
Enclosing class:
RoleMapperFactory

public static class RoleMapperFactory.NullRoleMapper extends Object implements RoleMapper
Dummy role mapper for a non-permissioned blockchain
  • Constructor Details

    • NullRoleMapper

      public NullRoleMapper()
  • Method Details

    • getUserRoles

      public EnumSet<Role> getUserRoles(String rsAccount)
      Description copied from interface: RoleMapper
      Get the user roles for the supplied Nxt account
      Specified by:
      getUserRoles in interface RoleMapper
      Parameters:
      rsAccount - Nxt account
      Returns:
      Set of user roles
    • isValidRoleSetter

      public boolean isValidRoleSetter(long setterId)
      Description copied from interface: RoleMapper
      Check if the supplied Nxt account is allowed to set user roles. An account must have the ADMIN role in order to set user roles.
      Specified by:
      isValidRoleSetter in interface RoleMapper
      Parameters:
      setterId - Account setting the user roles
      Returns:
      TRUE if the account is allowed to set user roles
    • isUserInRole

      public boolean isUserInRole(long accountId, Role role)
      Description copied from interface: RoleMapper
      Check if the supplied Nxt account has the specified user role
      Specified by:
      isUserInRole in interface RoleMapper
      Parameters:
      accountId - Account identifier
      role - User role
      Returns:
      TRUE if the account has the specified user role
    • parseRoles

      public EnumSet<Role> parseRoles(String value)
      Description copied from interface: RoleMapper
      Parse the account property string containing the user roles. Multiple roles can be specified separated by commas.
      Specified by:
      parseRoles in interface RoleMapper
      Parameters:
      value - User roles
      Returns:
      Set of user roles