at.gv.egovernment.moa.spss.server.config
Class IssuerAndSerial

java.lang.Object
  |
  +--at.gv.egovernment.moa.spss.server.config.IssuerAndSerial

public class IssuerAndSerial
extends Object

A class containing the issuer and serial number of a certificate, which can be used to uniquely identify the certificate. The issuer is contained as an RFC2253 encoded String.

Version:
$Id$
Author:
Patrick Peck

Constructor Summary
IssuerAndSerial(Principal issuer, BigInteger serial)
          Create an IssuerAndSerial object.
IssuerAndSerial(String issuerDN, BigInteger serial)
          Create an IssuerAndSerial object.
 
Method Summary
 boolean equals(Object other)
          Compare this IssuerAndSerial to another object.
 String getIssuerDN()
          Return the issuer DN in RFC2253 format.
 BigInteger getSerial()
          Return the serial number.
 int hashCode()
          Return the hash code of this IssuerAndSerial.
 String toString()
          Return a String representation of this IssuerAndSerial object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IssuerAndSerial

public IssuerAndSerial(Principal issuer,
                       BigInteger serial)
Create an IssuerAndSerial object. The name of the issuer is converted to RFC2253. If it cannot be parsed, the DN contained in the issuer is set.
Parameters:
issuer - The isser of a certificate.
serial - The serial number of the certificate.

IssuerAndSerial

public IssuerAndSerial(String issuerDN,
                       BigInteger serial)
Create an IssuerAndSerial object.
Parameters:
issuerDN - The issuer distinguished name. Should be an RFC2253 name.
serial - The serial number of the certificate.
Method Detail

getIssuerDN

public String getIssuerDN()
Return the issuer DN in RFC2253 format.
Returns:
The issuer part of this object.

getSerial

public BigInteger getSerial()
Return the serial number.
Returns:
The serial number of this object.

equals

public boolean equals(Object other)
Compare this IssuerAndSerial to another object.
Overrides:
equals in class Object
Parameters:
other - The object to compare this IssuerAndSerial to.
Returns:
true, if other is an IssuerAndSerial object and the issuer and serial fields are both equal. false otherwise.
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Return the hash code of this IssuerAndSerial.
Overrides:
hashCode in class Object
Returns:
The hash code of this IssuerAndSerial.
See Also:
Object.hashCode()

toString

public String toString()
Return a String representation of this IssuerAndSerial object.
Overrides:
toString in class Object
Returns:
The String representation.
See Also:
Object.toString()