com.sas.hls.security.role
Class RoleDescriptor

java.lang.Object
  extended by com.sas.hls.security.role.RoleDescriptor
All Implemented Interfaces:
Identifiable, Serializable
Direct Known Subclasses:
Role

public class RoleDescriptor
extends Object
implements Identifiable

A light-weight representation of a Role defined in the system.See Role

See Also:
Serialized Form

Field Summary
static String OBJECT_TYPE
          Represents the type name of a Role object.
 
Constructor Summary
RoleDescriptor(ObjectIdentity roleContext, String name, String identifier, String description)
          Constructor
RoleDescriptor(ObjectIdentity roleContext, String name, String identifier, String description, long revision)
          Constructor
 
Method Summary
 boolean equals(Object obj)
          Indicate whether some other object is "equal to" this one.
 String getDescription()
          Get the description of this role.
 String getIdentifier()
          Get the identifier of this object.
 String getName()
          Get the name of this role.
 String getObjectType()
          Get the object type of this item.
 long getRevision()
          Get the internal revision number of this object.
 ObjectIdentity getRoleContext()
          Get the context in which this role is defined.
 int hashCode()
          Return a hash code value for the object.
 void setDescription(String description)
          Set the description of this role.
protected  void setIdentifier(String identifier)
          Get the identifier of this object.
 void setName(String name)
          Set the name of this role.
protected  void setObjectType(String objectType)
          Set the objectType of this object.
protected  void setRevision(long revision)
          Set the internal revision number of this object.
protected  void setRoleContext(ObjectIdentity roleContext)
          Set the context in which this role is defined.
 String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECT_TYPE

public static final String OBJECT_TYPE
Represents the type name of a Role object.

See Also:
Constant Field Values
Constructor Detail

RoleDescriptor

public RoleDescriptor(ObjectIdentity roleContext,
                      String name,
                      String identifier,
                      String description)
Constructor

Parameters:
roleContext - The context in which this role is being defined
name - The name of the role being created
identifier - The identifier value to use for this role
description - A description of this role

RoleDescriptor

public RoleDescriptor(ObjectIdentity roleContext,
                      String name,
                      String identifier,
                      String description,
                      long revision)
Constructor

Parameters:
roleContext - The context in which this role is being defined
name - The name of the role being created
identifier - The identifier value to use for this role
description - A description of this role
revision - The internal revision number of this role
Method Detail

getRevision

public long getRevision()
Get the internal revision number of this object.

Returns:
the internal revision number of this object.

setRevision

protected void setRevision(long revision)
Set the internal revision number of this object.

Parameters:
revision - the revision to set

setIdentifier

protected void setIdentifier(String identifier)
Get the identifier of this object.

Parameters:
identifier - the identifier to set

getIdentifier

public String getIdentifier()
Description copied from interface: Identifiable
Get the identifier of this object.

Specified by:
getIdentifier in interface Identifiable
Returns:
the identifier of this object

getObjectType

public String getObjectType()
Description copied from interface: Identifiable
Get the object type of this item.

Specified by:
getObjectType in interface Identifiable
Returns:
the object type of this item.

getRoleContext

public ObjectIdentity getRoleContext()
Get the context in which this role is defined.

Returns:
the roleContext

setRoleContext

protected void setRoleContext(ObjectIdentity roleContext)
Set the context in which this role is defined.

Parameters:
roleContext - the roleContext to set

setObjectType

protected void setObjectType(String objectType)
Set the objectType of this object.

Parameters:
objectType - the objectType to set

setName

public void setName(String name)
Set the name of this role.

Parameters:
name - the name to give this role

getName

public String getName()
Get the name of this role.

Returns:
the name of this role

setDescription

public void setDescription(String description)
Set the description of this role.

Parameters:
description - the description

getDescription

public String getDescription()
Get the description of this role.

Returns:
the description of this role.

hashCode

public int hashCode()
Return a hash code value for the object.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Indicate whether some other object is "equal to" this one.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Return a string representation of the object.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright (c) 2016, SAS Institute Inc., Cary, NC, USA