Class Role

  • All Implemented Interfaces:
    java.io.Serializable

    @JsonObject("Role")
    public final class Role
    extends java.lang.Object
    implements java.io.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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Role​(java.lang.String code, boolean spaceLevel)
      Creates a new instance from specified code and space level flag.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getCode()
      Returns role code.
      int hashCode()  
      boolean isSpaceLevel()
      Returns true if this role is for a particular space.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Role

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

      • getCode

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object