com.hyper9.vangaea.impls.beans.admin
Class LinkedCredentialBeanImpl

java.lang.Object
  extended by com.hyper9.uvapi.impls.BeanImpl
      extended by com.hyper9.uvapi.impls.UniqueBeanImpl<java.lang.Integer>
          extended by com.hyper9.vangaea.impls.beans.admin.AdminBeanImpl
              extended by com.hyper9.vangaea.impls.beans.admin.LinkedCredentialBeanImpl
All Implemented Interfaces:
com.hyper9.common.beans.Bean, com.hyper9.common.beans.UniqueBean<java.lang.Integer>, AdminBean, LinkedCredentialBean, java.io.Serializable

public class LinkedCredentialBeanImpl
extends AdminBeanImpl
implements LinkedCredentialBean

A bean describing a row in the tbl_linked_credentials table.

Author:
akutz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.hyper9.vangaea.impls.beans.admin.AdminBeanImpl
conn, isDeleted, isDirty
 
Constructor Summary
LinkedCredentialBeanImpl()
          The default constructor for serialization.
LinkedCredentialBeanImpl(java.sql.Connection conn, int id, int userID, int serverID, java.lang.String userName, java.lang.String passphrase, java.lang.String certificate, java.lang.String salt)
          Initializes a new instance of the LinkedCredentialBeanImpl class.
 
Method Summary
static LinkedCredentialBean get(java.sql.Connection connection, int userID, int serverID)
          Gets a credential linked to the given user and server IDs.
 java.lang.String getCertificate()
          Gets the AES-encrypted certificate of this credential as a hex-formatted string.
 java.lang.String getPassphrase()
          Gets the AES-encrypted passphrase of this credential as a hex-formatted string.
 java.lang.String getSalt()
          Gets the salt used to encrypt this credential set as a hex-formatted string.
 ServerInformationBean getServer()
          Gets the server linked to this credential.
 int getServerID()
          Gets the ID of the server that this credential is linked to.
 UserBean getUser()
          Gets the user linked to this credential.
 int getUserID()
          Gets the ID of the user that this credential is linked to.
 java.lang.String getUserName()
          Gets the AES-encrypted user name of this credential as a hex-formatted string.
 void setCertificate(java.lang.String toSet)
          Sets the AES-encrypted certificate of this credential as a hex-formatted string.
 void setPassphrase(java.lang.String toSet)
          Sets the AES-encrypted passphrase of this credential as a hex-formatted string.
 void setSalt(java.lang.String toSet)
          Sets the salt used to encrypt this credential set as a hex-formatted string.
 void setServerID(int toSet)
          Sets the ID of the server that this credential is linked to.
 void setUserID(int toSet)
          Sets the ID of the user that this credential is linked to.
 void setUserName(java.lang.String toSet)
          Gets the AES-encrypted user name of this credential as a hex-formatted string.
 
Methods inherited from class com.hyper9.vangaea.impls.beans.admin.AdminBeanImpl
getConnection, isDeleted, isDirty
 
Methods inherited from class com.hyper9.uvapi.impls.UniqueBeanImpl
getID, setID
 
Methods inherited from class com.hyper9.uvapi.impls.BeanImpl
toString, toString, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hyper9.vangaea.types.beans.admin.AdminBean
getConnection, isDeleted, isDirty
 
Methods inherited from interface com.hyper9.common.beans.UniqueBean
getID, setID
 
Methods inherited from interface com.hyper9.common.beans.Bean
toString, toString, toString, toString
 

Constructor Detail

LinkedCredentialBeanImpl

public LinkedCredentialBeanImpl()
The default constructor for serialization.


LinkedCredentialBeanImpl

public LinkedCredentialBeanImpl(java.sql.Connection conn,
                                int id,
                                int userID,
                                int serverID,
                                java.lang.String userName,
                                java.lang.String passphrase,
                                java.lang.String certificate,
                                java.lang.String salt)
Initializes a new instance of the LinkedCredentialBeanImpl class.

Parameters:
conn - The underlying data connection.
id - The linked credential ID.
userID - The ID of the user linked to this credential.
serverID - The ID of the server linked to this credential.
userName - The AES-encrypted user name of this credential as a hex-formatted string.
passphrase - The AES-encrypted passphrase of this credential as a hex-formatted string.
certificate - The AES-encrypted certificate of this credential as a hex-formatted string.
salt - The salt used to encrypt this credential set as a hex-formatted string.
Method Detail

getCertificate

public java.lang.String getCertificate()
Description copied from interface: LinkedCredentialBean
Gets the AES-encrypted certificate of this credential as a hex-formatted string.

Specified by:
getCertificate in interface LinkedCredentialBean
Returns:
The AES-encrypted certificate of this credential as a hex-formatted string.

getPassphrase

public java.lang.String getPassphrase()
Description copied from interface: LinkedCredentialBean
Gets the AES-encrypted passphrase of this credential as a hex-formatted string.

Specified by:
getPassphrase in interface LinkedCredentialBean
Returns:
The AES-encrypted passphrase of this credential as a hex-formatted string.

getServerID

public int getServerID()
Description copied from interface: LinkedCredentialBean
Gets the ID of the server that this credential is linked to.

Specified by:
getServerID in interface LinkedCredentialBean
Returns:
The ID of the server that this credential is linked to.

getUserID

public int getUserID()
Description copied from interface: LinkedCredentialBean
Gets the ID of the user that this credential is linked to.

Specified by:
getUserID in interface LinkedCredentialBean
Returns:
The ID of the user that this credential is linked to.

getUserName

public java.lang.String getUserName()
Description copied from interface: LinkedCredentialBean
Gets the AES-encrypted user name of this credential as a hex-formatted string.

Specified by:
getUserName in interface LinkedCredentialBean
Returns:
The AES-encrypted user name of this credential as a hex-formatted string.

setCertificate

public void setCertificate(java.lang.String toSet)
Description copied from interface: LinkedCredentialBean
Sets the AES-encrypted certificate of this credential as a hex-formatted string.

Specified by:
setCertificate in interface LinkedCredentialBean
Parameters:
toSet - The AES-encrypted certificate of this credential as a hex-formatted string.

setPassphrase

public void setPassphrase(java.lang.String toSet)
Description copied from interface: LinkedCredentialBean
Sets the AES-encrypted passphrase of this credential as a hex-formatted string.

Specified by:
setPassphrase in interface LinkedCredentialBean
Parameters:
toSet - The AES-encrypted passphrase of this credential as a hex-formatted string.

setServerID

public void setServerID(int toSet)
Description copied from interface: LinkedCredentialBean
Sets the ID of the server that this credential is linked to.

Specified by:
setServerID in interface LinkedCredentialBean
Parameters:
toSet - The ID of the server that this credential is linked to.

setUserID

public void setUserID(int toSet)
Description copied from interface: LinkedCredentialBean
Sets the ID of the user that this credential is linked to.

Specified by:
setUserID in interface LinkedCredentialBean
Parameters:
toSet - The ID of the user that this credential is linked to.

setUserName

public void setUserName(java.lang.String toSet)
Description copied from interface: LinkedCredentialBean
Gets the AES-encrypted user name of this credential as a hex-formatted string.

Specified by:
setUserName in interface LinkedCredentialBean
Parameters:
toSet - The AES-encrypted user name of this credential as a hex-formatted string.

getUser

public UserBean getUser()
                 throws java.lang.Exception
Description copied from interface: LinkedCredentialBean
Gets the user linked to this credential.

Specified by:
getUser in interface LinkedCredentialBean
Returns:
The user linked to this credential.
Throws:
java.lang.Exception - When an error occurs.

getServer

public ServerInformationBean getServer()
                                throws java.lang.Exception
Description copied from interface: LinkedCredentialBean
Gets the server linked to this credential.

Specified by:
getServer in interface LinkedCredentialBean
Returns:
The server linked to this credential.
Throws:
java.lang.Exception - When an error occurs.

get

public static LinkedCredentialBean get(java.sql.Connection connection,
                                       int userID,
                                       int serverID)
                                throws java.sql.SQLException
Gets a credential linked to the given user and server IDs.

Parameters:
connection - The underlying data connection to use.
userID - The user ID to look for.
serverID - The server ID to look for.
Returns:
A credential linked to the given user and server IDs.
Throws:
java.sql.SQLException - When a SQL error occurs.

getSalt

public java.lang.String getSalt()
Description copied from interface: LinkedCredentialBean
Gets the salt used to encrypt this credential set as a hex-formatted string.

Specified by:
getSalt in interface LinkedCredentialBean
Returns:
The salt used to encrypt this credential set as a hex-formatted string.

setSalt

public void setSalt(java.lang.String toSet)
Description copied from interface: LinkedCredentialBean
Sets the salt used to encrypt this credential set as a hex-formatted string.

Specified by:
setSalt in interface LinkedCredentialBean
Parameters:
toSet - The salt used to encrypt this credential set as a hex-formatted string.


Copyright © 2009 Hyper9. All Rights Reserved.