org.safehaus.triplesec.guardian
Class Permission

java.lang.Object
  extended by org.safehaus.triplesec.guardian.Permission
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class Permission
extends java.lang.Object
implements java.lang.Comparable, java.lang.Cloneable, java.io.Serializable

An application permission.

Version:
$Rev: 71 $, $Date: 2005-11-07 19:11:39 -0500 (Mon, 07 Nov 2005) $
Author:
Alex Karasulu, Trustin Lee
See Also:
Serialized Form

Constructor Summary
Permission(java.lang.String applicationName, java.lang.String permissionName)
          Creates a new permission instance.
Permission(java.lang.String applicationName, java.lang.String permissionName, java.lang.String description)
          Creates a new permission instance with description.
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(java.lang.Object that)
           
 boolean equals(java.lang.Object that)
           
 java.lang.String getApplicationName()
          Gets the application name this permission is defined for.
 java.lang.String getDescription()
          Gets the name of this permission.
 java.lang.String getName()
          Gets the name of this permission.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Permission

public Permission(java.lang.String applicationName,
                  java.lang.String permissionName)
Creates a new permission instance.

Parameters:
applicationName - the name of the application this permission is associated with
permissionName - the permissionName of the permission

Permission

public Permission(java.lang.String applicationName,
                  java.lang.String permissionName,
                  java.lang.String description)
Creates a new permission instance with description.

Parameters:
applicationName - the name of the application this permission is associated with
permissionName - the permissionName of the permission
Method Detail

getName

public java.lang.String getName()
Gets the name of this permission.

Returns:
the name

getApplicationName

public java.lang.String getApplicationName()
Gets the application name this permission is defined for.

Returns:
the name of the application.

getDescription

public java.lang.String getDescription()
Gets the name of this permission.

Returns:
the description

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object that)
Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object