org.nhindirect.config.store
Class Certificate

java.lang.Object
  extended by org.nhindirect.config.store.Certificate

@Entity
public class Certificate
extends Object


Nested Class Summary
static class Certificate.CertContainer
           
 
Field Summary
static byte[] NULL_CERT
           
 
Constructor Summary
Certificate()
           
 
Method Summary
 void clearData()
          Clear the data of a Certificate.
 Calendar getCreateTime()
          Get the value of createTime.
 byte[] getData()
          Get the value of data.
 long getId()
          Get the value of id.
static String getJCEProviderName()
          Gets the configured JCE crypto provider string for crypto operations.
 String getOwner()
          Get the value of owner.
 EntityStatus getStatus()
          Get the value of status.
 String getThumbprint()
          Get the value of thumbprint.
 Calendar getValidEndDate()
          Get the value of validEndDate.
 Calendar getValidStartDate()
          Get the value of validStartDate.
 boolean isPrivateKey()
          Indicates if the certificate has a private key
 void setCreateTime(Calendar timestamp)
          Set the value of createTime.
 void setData(byte[] data)
          Set the value of data.
 void setId(long id)
          Set the value of id.
static void setJCEProviderName(String name)
          Overrides the configured JCE crypto provider string.
 void setOwner(String owner)
          Set the value of owner.
 void setPrivateKey(boolean b)
          Indicates if the certificate has a private key
 void setStatus(EntityStatus status)
          Set the value of status.
 void setValidEndDate(Calendar validEndDate)
          Set the value of validEndDate.
 void setValidStartDate(Calendar validStartDate)
          Set the value of validStartDate.
 Certificate.CertContainer toCredential()
           
 void validate()
          Validate the Certificate for the existance of data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_CERT

public static final byte[] NULL_CERT
Constructor Detail

Certificate

public Certificate()
Method Detail

getJCEProviderName

public static String getJCEProviderName()
Gets the configured JCE crypto provider string for crypto operations. This is configured using the -Dorg.nhindirect.config.JCEProviderName JVM parameters. If the parameter is not set or is empty, then the default string "BC" (BouncyCastle provider) is returned. By default the agent installs the BouncyCastle provider.

Returns:
The name of the JCE provider string.

setJCEProviderName

public static void setJCEProviderName(String name)
Overrides the configured JCE crypto provider string. If the name is empty or null, the default string "BC" (BouncyCastle provider) is used.

Parameters:
name - The name of the JCE provider.

getOwner

public String getOwner()
Get the value of owner.

Returns:
the value of owner.

setOwner

public void setOwner(String owner)
Set the value of owner.

Parameters:
owner - The value of owner.

getData

public byte[] getData()
Get the value of data.

Returns:
the value of data.

setData

public void setData(byte[] data)
             throws CertificateException
Set the value of data.

Parameters:
data - The value of data.
Throws:
CertificateException

isPrivateKey

public boolean isPrivateKey()
Indicates if the certificate has a private key

Returns:

setPrivateKey

public void setPrivateKey(boolean b)
                   throws CertificateException
Indicates if the certificate has a private key

Parameters:
data -
Throws:
CertificateException

getThumbprint

public String getThumbprint()
Get the value of thumbprint.

Returns:
the value of thumbprint.

getId

public long getId()
Get the value of id.

Returns:
the value of id.

setId

public void setId(long id)
Set the value of id.

Parameters:
id - The value of id.

getCreateTime

public Calendar getCreateTime()
Get the value of createTime.

Returns:
the value of createTime.

setCreateTime

public void setCreateTime(Calendar timestamp)
Set the value of createTime.

Parameters:
timestamp - The value of createTime.

getStatus

public EntityStatus getStatus()
Get the value of status.

Returns:
the value of status.

setStatus

public void setStatus(EntityStatus status)
Set the value of status.

Parameters:
status - The value of status.

getValidStartDate

public Calendar getValidStartDate()
Get the value of validStartDate.

Returns:
the value of validStartDate.

setValidStartDate

public void setValidStartDate(Calendar validStartDate)
Set the value of validStartDate.

Parameters:
validStartDate - The value of validStartDate.

getValidEndDate

public Calendar getValidEndDate()
Get the value of validEndDate.

Returns:
the value of validEndDate.

setValidEndDate

public void setValidEndDate(Calendar validEndDate)
Set the value of validEndDate.

Parameters:
validEndDate - The value of validEndDate.

validate

public void validate()
              throws CertificateException
Validate the Certificate for the existance of data.

Throws:
CertificateException

clearData

public void clearData()
Clear the data of a Certificate.


toCredential

public Certificate.CertContainer toCredential()
                                       throws CertificateException
Throws:
CertificateException


Copyright © 2011. All Rights Reserved.