Package com.jbstrap.core.authorization
Class Role
java.lang.Object
com.jbstrap.core.authorization.Role
The Role POJO class
This class contains the currently logged in user's roles and the role attributes
- Since:
- 4.0
- Author:
- JBStrap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCode()
Gets the role codeGets the role descriptiongetName()
Gets the role nameSets the role code.setDescription
(String description) Sets the role description.Sets the role name.
-
Constructor Details
-
Role
public Role()
-
-
Method Details
-
getCode
Gets the role code- Returns:
- The role code or
null
, if the role has no code set
-
setCode
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
Gets the role name- Returns:
- The role name or
null
, if the role has no name set
-
setName
Sets the role name. The role name should be easily understandable for the user.- Parameters:
name
- The role name- Returns:
- The role object
-
getDescription
Gets the role description- Returns:
- The role description or
null
, if the role has no description set
-
setDescription
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
-