atg.security
Class GenericAccessRight

java.lang.Object
  extended by atg.security.GenericAccessRight
All Implemented Interfaces:
AccessRight, java.io.Serializable, java.security.acl.Permission
Direct Known Subclasses:
Privilege

public class GenericAccessRight
extends java.lang.Object
implements AccessRight, java.io.Serializable

A generic implementation of an access right object.

See Also:
AccessRight, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
GenericAccessRight(java.lang.String name)
           
GenericAccessRight(java.lang.String name, java.lang.String description)
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if this access right is the same as another.
static AccessRight fromString(java.lang.String pRightName)
          Returns an access right with the given name, reusing rights with the same name.
 java.lang.String getDescription()
          Returns a description of the access right suitable for display to a user.
 java.lang.String getDisplayName()
          Returns the human-readable name of the access right.
 java.lang.String getName()
          Returns a machine-readable name of the access right, useful for persisting the object.
 int hashCode()
          Access rights with the same name hash equivalently.
static AccessRight[] parse(java.lang.String pRightString)
          Parses a list of access rights.
 java.lang.String toString()
          Output a representation of the assess right.
static java.lang.String toString(AccessRight[] pRights)
          Converts a list of access rights into a parseable string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

GenericAccessRight

public GenericAccessRight(java.lang.String name)

GenericAccessRight

public GenericAccessRight(java.lang.String name,
                          java.lang.String description)
Method Detail

fromString

public static AccessRight fromString(java.lang.String pRightName)
Returns an access right with the given name, reusing rights with the same name. This is really useful in access control list parsers, although not strictly necessary.


parse

public static AccessRight[] parse(java.lang.String pRightString)
Parses a list of access rights.


toString

public static java.lang.String toString(AccessRight[] pRights)
Converts a list of access rights into a parseable string.


getName

public java.lang.String getName()
Returns a machine-readable name of the access right, useful for persisting the object.

Specified by:
getName in interface AccessRight

getDisplayName

public java.lang.String getDisplayName()
Returns the human-readable name of the access right.

Specified by:
getDisplayName in interface AccessRight

getDescription

public java.lang.String getDescription()
Returns a description of the access right suitable for display to a user.

Specified by:
getDescription in interface AccessRight

equals

public boolean equals(java.lang.Object object)
Returns true if this access right is the same as another.

Specified by:
equals in interface AccessRight
Specified by:
equals in interface java.security.acl.Permission
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Access rights with the same name hash equivalently.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Output a representation of the assess right.

Specified by:
toString in interface java.security.acl.Permission
Overrides:
toString in class java.lang.Object