Package org.glassfish.security.common
Class Role
- java.lang.Object
-
- org.glassfish.security.common.PrincipalImpl
-
- org.glassfish.security.common.Role
-
- All Implemented Interfaces:
Serializable
,Principal
public class Role extends PrincipalImpl
In EJBs, ACL checking is done using the Roles. Roles are an abstraction of an application specific Logical Principals. These Principals do not have any properties of Principals within a Security Domain (or Realm). They merely serve as abstraction to application specific entities.- Author:
- Harish Prabandham
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
This function returns true if the object passed matches the principal represented in this implementationString
getDescription()
int
hashCode()
Returns the hashcode for this Principal objectvoid
setDescription(String description)
-
Methods inherited from class org.glassfish.security.common.PrincipalImpl
getName, toString
-
-
-
-
Constructor Detail
-
Role
public Role(String name)
Creates a new Role with a given name
-
-
Method Detail
-
equals
public boolean equals(Object other)
Description copied from class:PrincipalImpl
This function returns true if the object passed matches the principal represented in this implementation- Specified by:
equals
in interfacePrincipal
- Overrides:
equals
in classPrincipalImpl
- Parameters:
other
- the Principal to compare with.- Returns:
- true if the Principal passed is the same as that encapsulated in this object, false otherwise
-
hashCode
public int hashCode()
Description copied from class:PrincipalImpl
Returns the hashcode for this Principal object- Specified by:
hashCode
in interfacePrincipal
- Overrides:
hashCode
in classPrincipalImpl
- Returns:
- a hashcode for the principal.
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
-