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 booleanequals(Object other)This function returns true if the object passed matches the principal represented in this implementationStringgetDescription()inthashCode()Returns the hashcode for this Principal objectvoidsetDescription(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:PrincipalImplThis function returns true if the object passed matches the principal represented in this implementation- Specified by:
equalsin interfacePrincipal- Overrides:
equalsin 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:PrincipalImplReturns the hashcode for this Principal object- Specified by:
hashCodein interfacePrincipal- Overrides:
hashCodein classPrincipalImpl- Returns:
- a hashcode for the principal.
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
-