java.lang.Object
ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Role
All Implemented Interfaces:
Serializable

@JsonObject("Role") public final class Role extends Object implements Serializable
Immutable value object representing an authorization role. A role has a code and a flag which tells whether this role is for a certain space or for all spaces.
See Also:
  • Constructor Details

    • Role

      public Role(String code, boolean spaceLevel)
      Creates a new instance from specified code and space level flag.
      Throws:
      IllegalArgumentException - if specified code is null or an empty string.
  • Method Details

    • getCode

      public final String getCode()
      Returns role code.
    • isSpaceLevel

      public final boolean isSpaceLevel()
      Returns true if this role is for a particular space.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object