Class Role

java.lang.Object
com.jbstrap.core.authorization.Role

public class Role extends Object

The Role POJO class

This class contains the currently logged in user's roles and the role attributes

Since:
4.0
Author:
JBStrap
  • Constructor Details

    • Role

      public Role()
  • Method Details

    • getCode

      public String getCode()
      Gets the role code
      Returns:
      The role code or null, if the role has no code set
    • setCode

      public Role setCode(String code)
      Sets the role code. The Role code is used to identify and reference the role.
      Parameters:
      code - The role code
      Returns:
      The role object
    • getName

      public String getName()
      Gets the role name
      Returns:
      The role name or null, if the role has no name set
    • setName

      public Role setName(String name)
      Sets the role name. The role name should be easily understandable for the user.
      Parameters:
      name - The role name
      Returns:
      The role object
    • getDescription

      public String getDescription()
      Gets the role description
      Returns:
      The role description or null, if the role has no description set
    • setDescription

      public Role setDescription(String description)
      Sets the role description. The description should explain what the role is limited to, and what the role specifics are.
      Parameters:
      description - The role description
      Returns:
      The role object