org.apache.jetspeed.security.om.impl
Class InternalCredentialImpl

java.lang.Object
  extended by org.apache.jetspeed.security.om.impl.InternalCredentialImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, InternalCredential

public class InternalCredentialImpl
extends java.lang.Object
implements InternalCredential

InternalCredential interface implementation.

Version:
$Id: InternalCredentialImpl.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Le Strat
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jetspeed.security.om.InternalCredential
MAX_DATE, PRIVATE, PUBLIC
 
Constructor Summary
InternalCredentialImpl()
          InternalCredential implementation default constructor.
InternalCredentialImpl(InternalCredential credential, java.lang.String classname)
          InternalCredentialImpl copy constructor given another InternalCredential and overriding classname
InternalCredentialImpl(long principalId, java.lang.String value, int type, java.lang.String classname)
          InternalCredentialImpl constructor given a value, type and classname.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compares this InternalCredential to the provided credential and check if they are equal.
 int getAuthenticationFailures()
          Getter for the current number of authentication failures in a row.
 java.lang.String getClassname()
          Getter for the principal classname.
 java.sql.Timestamp getCreationDate()
          Getter for creation date.
 long getCredentialId()
          Getter for the credential id.
 java.sql.Date getExpirationDate()
          Getter for the expiration date.
 java.sql.Timestamp getLastAuthenticationDate()
          Getter for the last authentication date
 java.sql.Timestamp getModifiedDate()
          Getter for the modified date.
 java.sql.Timestamp getPreviousAuthenticationDate()
          Getter for the previous authentication date
 long getPrincipalId()
          Getter for the principal id.
 int getType()
          Getter for the credential type.
 java.lang.String getValue()
          Getter for the credential value.
 boolean isEnabled()
          Getter for the enabled state
 boolean isEncoded()
          Getter for the encoded state
 boolean isExpired()
          Getter for the expired state.
 boolean isUpdateRequired()
          Getter for the update required state
 void setAuthenticationFailures(int authenticationFailures)
          Setter for the number of authentication failures
 void setClassname(java.lang.String classname)
          Setter for the principal classname.
 void setCreationDate(java.sql.Timestamp creationDate)
          Setter for the creation date.
 void setCredentialId(long credentialId)
          Setter for the credential id.
 void setEnabled(boolean enabled)
          Setter for the enabled state
 void setEncoded(boolean encoded)
          Setter for the encoded state
 void setExpirationDate(java.sql.Date expirationDate)
          Setter for the expiration date.
 void setExpired(boolean expired)
          Setter for the expired state.
 void setLastAuthenticationDate(java.sql.Timestamp lastAuthenticationDate)
          Setter for the last authentication date
 void setModifiedDate(java.sql.Timestamp modifiedDate)
          Setter for the modified date.
 void setPreviousAuthenticationDate(java.sql.Timestamp previousAuthenticationDate)
          Setter for the previous authentication date
 void setPrincipalId(long principalId)
          Setter for the principal id.
 void setType(int type)
          Setter for the credential type.
 void setUpdateRequired(boolean updateRequired)
          Setter for the update required state
 void setValue(java.lang.String value)
          Setter for the credential value.
 java.lang.String toString()
          Convert Node to string.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternalCredentialImpl

public InternalCredentialImpl()

InternalCredential implementation default constructor.


InternalCredentialImpl

public InternalCredentialImpl(long principalId,
                              java.lang.String value,
                              int type,
                              java.lang.String classname)

InternalCredentialImpl constructor given a value, type and classname.

Parameters:
principalId - The principal id.
value - The value.
type - The type.
classname - The classname.

InternalCredentialImpl

public InternalCredentialImpl(InternalCredential credential,
                              java.lang.String classname)

InternalCredentialImpl copy constructor given another InternalCredential and overriding classname

Parameters:
credential - The credential to copy from
classname - The classname for the new credential
Method Detail

getCredentialId

public long getCredentialId()
Description copied from interface: InternalCredential

Getter for the credential id.

Specified by:
getCredentialId in interface InternalCredential
Returns:
The credential id.
See Also:
InternalCredential.getCredentialId()

setCredentialId

public void setCredentialId(long credentialId)
Description copied from interface: InternalCredential

Setter for the credential id.

Specified by:
setCredentialId in interface InternalCredential
Parameters:
credentialId - The credential id.
See Also:
InternalCredential.setCredentialId(long)

getPrincipalId

public long getPrincipalId()
Description copied from interface: InternalCredential

Getter for the principal id.

Specified by:
getPrincipalId in interface InternalCredential
Returns:
The principal id.
See Also:
InternalCredential.getPrincipalId()

setPrincipalId

public void setPrincipalId(long principalId)
Description copied from interface: InternalCredential

Setter for the principal id.

Specified by:
setPrincipalId in interface InternalCredential
Parameters:
principalId - The principal id.
See Also:
InternalCredential.setPrincipalId(long)

getValue

public java.lang.String getValue()
Description copied from interface: InternalCredential

Getter for the credential value.

Specified by:
getValue in interface InternalCredential
Returns:
The credential value.
See Also:
InternalCredential.getValue()

setValue

public void setValue(java.lang.String value)
Description copied from interface: InternalCredential

Setter for the credential value.

Specified by:
setValue in interface InternalCredential
Parameters:
value - The credential value.
See Also:
InternalCredential.setValue(java.lang.String)

isUpdateRequired

public boolean isUpdateRequired()
Description copied from interface: InternalCredential

Getter for the update required state

Specified by:
isUpdateRequired in interface InternalCredential
Returns:
true if required
See Also:
InternalCredential.isUpdateRequired()

setUpdateRequired

public void setUpdateRequired(boolean updateRequired)
Description copied from interface: InternalCredential

Setter for the update required state

Specified by:
setUpdateRequired in interface InternalCredential
Parameters:
updateRequired - the update required state

isEncoded

public boolean isEncoded()
Description copied from interface: InternalCredential

Getter for the encoded state

Specified by:
isEncoded in interface InternalCredential
Returns:
true if encoded
See Also:
InternalCredential.isEncoded()

setEncoded

public void setEncoded(boolean encoded)
Description copied from interface: InternalCredential
Setter for the encoded state

Specified by:
setEncoded in interface InternalCredential
Parameters:
encoded - The encoded state
See Also:
InternalCredential.setEncoded(boolean)

isEnabled

public boolean isEnabled()
Description copied from interface: InternalCredential

Getter for the enabled state

Specified by:
isEnabled in interface InternalCredential
Returns:
true if enabled
See Also:
InternalCredential.isEnabled()

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: InternalCredential
Setter for the enabled state

Specified by:
setEnabled in interface InternalCredential
Parameters:
enabled - The enabled state
See Also:
InternalCredential.setEnabled(boolean)

getAuthenticationFailures

public int getAuthenticationFailures()
Description copied from interface: InternalCredential

Getter for the current number of authentication failures in a row.

Specified by:
getAuthenticationFailures in interface InternalCredential
Returns:
The number of authentication failures
See Also:
InternalCredential.getAuthenticationFailures()

setAuthenticationFailures

public void setAuthenticationFailures(int authenticationFailures)
Description copied from interface: InternalCredential

Setter for the number of authentication failures

Specified by:
setAuthenticationFailures in interface InternalCredential
Parameters:
authenticationFailures - The number of authentication failures
See Also:
InternalCredential.setAuthenticationFailures(int)

isExpired

public boolean isExpired()
Description copied from interface: InternalCredential
Getter for the expired state.

Specified by:
isExpired in interface InternalCredential
Returns:
true if expired
See Also:
InternalCredential.isExpired()

setExpired

public void setExpired(boolean expired)
Description copied from interface: InternalCredential
Setter for the expired state.

Specified by:
setExpired in interface InternalCredential
Parameters:
expired - The expired state
See Also:
InternalCredential.setExpired(boolean)

getExpirationDate

public java.sql.Date getExpirationDate()
Description copied from interface: InternalCredential

Getter for the expiration date.

Specified by:
getExpirationDate in interface InternalCredential
Returns:
The expiration date.
See Also:
InternalCredential.getExpirationDate()

setExpirationDate

public void setExpirationDate(java.sql.Date expirationDate)
Description copied from interface: InternalCredential

Setter for the expiration date.

Specified by:
setExpirationDate in interface InternalCredential
Parameters:
expirationDate - The expiration date.
See Also:
InternalCredential.setExpirationDate(java.sql.Date)

getType

public int getType()
Description copied from interface: InternalCredential

Getter for the credential type.

Specified by:
getType in interface InternalCredential
Returns:
The credential type.
See Also:
InternalCredential.getType()

setType

public void setType(int type)
Description copied from interface: InternalCredential

Setter for the credential type.

Specified by:
setType in interface InternalCredential
Parameters:
type - The credential type.
See Also:
InternalCredential.setType(int)

getClassname

public java.lang.String getClassname()
Description copied from interface: InternalCredential

Getter for the principal classname.

Specified by:
getClassname in interface InternalCredential
Returns:
The principal classname.
See Also:
InternalCredential.getClassname()

setClassname

public void setClassname(java.lang.String classname)
Description copied from interface: InternalCredential

Setter for the principal classname.

Specified by:
setClassname in interface InternalCredential
Parameters:
classname - The principal classname.
See Also:
InternalCredential.setClassname(java.lang.String)

getCreationDate

public java.sql.Timestamp getCreationDate()
Description copied from interface: InternalCredential

Getter for creation date.

Specified by:
getCreationDate in interface InternalCredential
Returns:
The creation date.
See Also:
InternalCredential.getCreationDate()

setCreationDate

public void setCreationDate(java.sql.Timestamp creationDate)
Description copied from interface: InternalCredential

Setter for the creation date.

Specified by:
setCreationDate in interface InternalCredential
Parameters:
creationDate - The creation date.
See Also:
InternalCredential.setCreationDate(java.sql.Timestamp)

getModifiedDate

public java.sql.Timestamp getModifiedDate()
Description copied from interface: InternalCredential

Getter for the modified date.

Specified by:
getModifiedDate in interface InternalCredential
Returns:
The modified date.
See Also:
InternalCredential.getModifiedDate()

setModifiedDate

public void setModifiedDate(java.sql.Timestamp modifiedDate)
Description copied from interface: InternalCredential

Setter for the modified date.

Specified by:
setModifiedDate in interface InternalCredential
Parameters:
modifiedDate - The modified date.
See Also:
InternalCredential.setModifiedDate(java.sql.Timestamp)

getPreviousAuthenticationDate

public java.sql.Timestamp getPreviousAuthenticationDate()
Description copied from interface: InternalCredential

Getter for the previous authentication date

Specified by:
getPreviousAuthenticationDate in interface InternalCredential
Returns:
The previous authentication date.
See Also:
InternalCredential.getPreviousAuthenticationDate()

setPreviousAuthenticationDate

public void setPreviousAuthenticationDate(java.sql.Timestamp previousAuthenticationDate)
Description copied from interface: InternalCredential

Setter for the previous authentication date

Specified by:
setPreviousAuthenticationDate in interface InternalCredential
Parameters:
previousAuthenticationDate - The previous authentication date.
See Also:
InternalCredential.setPreviousAuthenticationDate(java.sql.Timestamp)

getLastAuthenticationDate

public java.sql.Timestamp getLastAuthenticationDate()
Description copied from interface: InternalCredential

Getter for the last authentication date

Specified by:
getLastAuthenticationDate in interface InternalCredential
Returns:
The last authentication date.
See Also:
InternalCredential.getLastAuthenticationDate()

setLastAuthenticationDate

public void setLastAuthenticationDate(java.sql.Timestamp lastAuthenticationDate)
Description copied from interface: InternalCredential

Setter for the last authentication date

Specified by:
setLastAuthenticationDate in interface InternalCredential
Parameters:
lastAuthenticationDate - The last authentication date.
See Also:
InternalCredential.setLastAuthenticationDate(java.sql.Timestamp)

equals

public boolean equals(java.lang.Object object)

Compares this InternalCredential to the provided credential and check if they are equal.

return Whether the InternalCredential are equal.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()

Convert Node to string.

Overrides:
toString in class java.lang.Object
Returns:
The Node string value.


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.