Package africa.absa.inception.security
Class Role
- java.lang.Object
-
- africa.absa.inception.security.Role
-
- All Implemented Interfaces:
Serializable
@Entity public class Role extends Object implements Serializable
The Role class holds the information for a role.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Role()Constructs a new Role.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFunction(Function function)Add the function to the role.booleanequals(Object object)Indicates whether some other object is "equal to" this one.StringgetCode()Returns the code for the role.StringgetDescription()Returns the description for the role.Set<Function>getFunctions()Returns the functions associated with the role.Set<Group>getGroups()Returns the groups the role is associated with.StringgetName()Returns the name of the role.inthashCode()Returns a hash code value for the object.voidremoveFunction(Function function)Remove the function to the role.voidsetCode(String code)Set the code for the role.voidsetDescription(String description)Set the description for the role.voidsetFunctions(Set<Function> functions)Set the functions associated with the role.voidsetGroups(Set<Group> groups)Set the groups the role is associated with.voidsetName(String name)Set the name of the role.
-
-
-
Method Detail
-
addFunction
public void addFunction(Function function)
Add the function to the role.- Parameters:
function- the function
-
equals
public boolean equals(Object object)
Indicates whether some other object is "equal to" this one.
-
getCode
public String getCode()
Returns the code for the role.- Returns:
- the code for the role
-
getDescription
public String getDescription()
Returns the description for the role.- Returns:
- the description for the role
-
getFunctions
public Set<Function> getFunctions()
Returns the functions associated with the role.- Returns:
- the functions associated with the role
-
getGroups
public Set<Group> getGroups()
Returns the groups the role is associated with.- Returns:
- the groups the role is associated with
-
getName
public String getName()
Returns the name of the role.- Returns:
- the name of the role
-
hashCode
public int hashCode()
Returns a hash code value for the object.
-
removeFunction
public void removeFunction(Function function)
Remove the function to the role.- Parameters:
function- the function
-
setCode
public void setCode(String code)
Set the code for the role.- Parameters:
code- the code for the role
-
setDescription
public void setDescription(String description)
Set the description for the role.- Parameters:
description- the description for the role
-
setFunctions
public void setFunctions(Set<Function> functions)
Set the functions associated with the role.- Parameters:
functions- the functions associated with the role
-
setGroups
public void setGroups(Set<Group> groups)
Set the groups the role is associated with.- Parameters:
groups- the groups the role is associated with
-
setName
public void setName(String name)
Set the name of the role.- Parameters:
name- the name of the role
-
-