com.ca.commons.security
Class KeystoreGUI.CertItem

java.lang.Object
  |
  +--com.ca.commons.security.KeystoreGUI.CertItem
Enclosing class:
KeystoreGUI

public static class KeystoreGUI.CertItem
extends java.lang.Object

A representation of a certificate that is displayed in the certificate list.


Field Summary
 java.lang.String alias
           
 boolean hasPrivateKey
           
 java.security.cert.X509Certificate x509Cert
           
 
Constructor Summary
KeystoreGUI.CertItem(java.lang.String certAlias)
          Initialises a certitem with the alias name of a certificate only (the actual cert can be added seperately)
KeystoreGUI.CertItem(java.lang.String certAlias, java.security.cert.X509Certificate cert)
          Initialises a certItem with the alias name of a certificate and the actual certificate data.
 
Method Summary
 void addX509Cert(java.security.cert.X509Certificate x)
          Adds (or Replaces) the X509Cert data.
 java.lang.String getAlias()
          returns the raw alias for this cert.
 boolean getHasPrivateKey()
           
 javax.swing.ImageIcon getIcon()
          Returns an image representing this CertItem.
 java.lang.String getSelectedText()
          Returns a formatted string identifying the cert by the alias.
 java.security.cert.X509Certificate getX509Cert()
          Returns the X509 certificate data (may be null if this hasn't been set).
 void setHasPrivateKey(boolean state)
           
 java.lang.String toString()
          Returns a formatted string identifying the cert by the alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alias

public java.lang.String alias

x509Cert

public java.security.cert.X509Certificate x509Cert

hasPrivateKey

public boolean hasPrivateKey
Constructor Detail

KeystoreGUI.CertItem

public KeystoreGUI.CertItem(java.lang.String certAlias)
Initialises a certitem with the alias name of a certificate only (the actual cert can be added seperately)


KeystoreGUI.CertItem

public KeystoreGUI.CertItem(java.lang.String certAlias,
                            java.security.cert.X509Certificate cert)
Initialises a certItem with the alias name of a certificate and the actual certificate data.

Parameters:
cert - the actual X509 Certificate data.
Method Detail

addX509Cert

public void addX509Cert(java.security.cert.X509Certificate x)
Adds (or Replaces) the X509Cert data.


toString

public java.lang.String toString()
Returns a formatted string identifying the cert by the alias.

Overrides:
toString in class java.lang.Object
Returns:
the alias assigned to this cert.

getSelectedText

public java.lang.String getSelectedText()
Returns a formatted string identifying the cert by the alias.

Returns:
the alias assigned to this cert.

getAlias

public java.lang.String getAlias()
returns the raw alias for this cert.

Returns:
the alias assigned to this cert.

getIcon

public javax.swing.ImageIcon getIcon()
Returns an image representing this CertItem.


getX509Cert

public java.security.cert.X509Certificate getX509Cert()
Returns the X509 certificate data (may be null if this hasn't been set).

Returns:
the X509 certificate stored in this CertItem

setHasPrivateKey

public void setHasPrivateKey(boolean state)

getHasPrivateKey

public boolean getHasPrivateKey()