org.apache.lenya.ac.impl
Class CredentialImpl

java.lang.Object
  extended by org.apache.lenya.ac.impl.CredentialImpl
All Implemented Interfaces:
org.apache.lenya.ac.Credential

public class CredentialImpl
extends java.lang.Object
implements org.apache.lenya.ac.Credential

Credential implementation.


Field Summary
 
Fields inherited from interface org.apache.lenya.ac.Credential
DENY, GRANT
 
Constructor Summary
CredentialImpl(org.apache.lenya.ac.Accreditable accreditable, org.apache.lenya.ac.Role role)
          Creates a new credential object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 org.apache.lenya.ac.Accreditable getAccreditable()
          Returns the accreditable of this credential.
 java.lang.String getMethod()
           
 org.apache.lenya.ac.Role getRole()
          Returns the role of this credential.
 int hashCode()
           
 boolean isDenied()
           
 boolean isGranted()
           
 void setMethod(java.lang.String method)
          Set the method of the credential, grant or deny
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CredentialImpl

public CredentialImpl(org.apache.lenya.ac.Accreditable accreditable,
                      org.apache.lenya.ac.Role role)
Creates a new credential object.

Parameters:
accreditable - The accreditable.
role - The role.
Method Detail

getRole

public org.apache.lenya.ac.Role getRole()
Returns the role of this credential.

Specified by:
getRole in interface org.apache.lenya.ac.Credential
Returns:
A role.

getAccreditable

public org.apache.lenya.ac.Accreditable getAccreditable()
Returns the accreditable of this credential.

Specified by:
getAccreditable in interface org.apache.lenya.ac.Credential
Returns:
An accreditable.

toString

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

setMethod

public void setMethod(java.lang.String method)
Set the method of the credential, grant or deny

Parameters:
method - A string grant or deny

getMethod

public java.lang.String getMethod()
Specified by:
getMethod in interface org.apache.lenya.ac.Credential

isGranted

public boolean isGranted()
Returns:
if the method is Credential.GRANT.

isDenied

public boolean isDenied()
Returns:
if the method is Credential.DENY.

equals

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

hashCode

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


Copyright $ Apache Software Foundation. All Rights Reserved.