org.rhq.enterprise.server.plugins.rhnhosted.certificate
Class Certificate

java.lang.Object
  extended by org.rhq.enterprise.server.plugins.rhnhosted.certificate.Certificate

public class Certificate
extends Object

A rhq server certificate.


Field Summary
static String CURRENT_GENERATION
           
 
Method Summary
 void addChannelFamily(ChannelFamilyDescriptor family)
          Add a channel family
 String asChecksumString()
          Convert this certificate into the canonical form used for signing.
 String asXmlString()
          Returns the XML representation of the cert.
 List getChannelFamilies()
          Return an unmodifiable list of the channel families
 ChannelFamilyDescriptor getChannelFamily(String family)
          Return the channel family with name family, or null if no such family exists.
 String getExpires()
          Get the expiration date
 Date getExpiresDate()
          Convenience function, returns java.util.Date equivalent of expires
 String getGeneration()
          Get the generation
 String getIssued()
          Get the issue date
 String getMonitoringSlots()
          Get the monitoring slots
 String getNonlinuxSlots()
          Get the nonlinux slots
 String getOwner()
          Get the owner
 String getProduct()
          Get the product
 String getProvisioningSlots()
          Get the number of provisioning slots
 String getSatelliteVersion()
          Get the satellite version
 String getSignature()
          Get the ASCII armoured signature
 String getSlots()
          Get the number of slots
 String getVirtualizationPlatformSlots()
          Get the number of virtualization platform slots
 String getVirtualizationSlots()
          Get the number of virtualization slots
 boolean isExpired()
          States whether or not this certificate is expired.
 void setExpires(String expires0)
          Set the expiration date for the certificate
 void setGeneration(String generation0)
          Set the generation
 void setIssued(String issued0)
          Set the date of issue
 void setMonitoringSlots(String monitoringSlots0)
          Set the number of monitoring slots
 void setNonlinuxSlots(String nonlinuxSlots0)
          Set the number of non-linux slots
 void setOwner(String owner0)
          Set the owner
 void setProduct(String product0)
          Set the product
 void setProvisioningSlots(String provisioningSlots0)
          Set the number of provisioning slots
 void setSatelliteVersion(String satelliteVersion0)
          Set the satellite version
 void setSignature(String signature0)
          Set the signature as an ASCII armored string
 void setSlots(String slots0)
          Set the number of slots
 void setVirtualizationPlatformSlots(String virtualizationSlots0)
          Set the number of virtualization platform slots
 void setVirtualizationSlots(String virtualizationSlots0)
          Set the number of virtualization slots
 boolean verifySignature(PublicKeyRing keyRing)
          Check that this certificate was signed with a private key whose public counterpart is on keyRing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_GENERATION

public static final String CURRENT_GENERATION
See Also:
Constant Field Values
Method Detail

isExpired

public boolean isExpired()
                  throws ParseException
States whether or not this certificate is expired.

Returns:
true iff expires is after current system time
Throws:
ParseException - this shouldn't happen, means the date format in the cert is not what we expect

asChecksumString

public String asChecksumString()
Convert this certificate into the canonical form used for signing.

Returns:
the certificate in the canonical form used for signing

asXmlString

public String asXmlString()
Returns the XML representation of the cert.

Returns:
the XML representation of the cert.

verifySignature

public boolean verifySignature(PublicKeyRing keyRing)
                        throws SignatureException
Check that this certificate was signed with a private key whose public counterpart is on keyRing

Parameters:
keyRing - the public keys with which to check the signatures
Returns:
true if this certificate was signed with a private key whose public counterpart is on keyRing, false otherwise
Throws:
SignatureException - if processing the sigature fails

addChannelFamily

public void addChannelFamily(ChannelFamilyDescriptor family)
Add a channel family

Parameters:
family - the channel family to add

setExpires

public void setExpires(String expires0)
Set the expiration date for the certificate

Parameters:
expires0 - the expiration date

setGeneration

public void setGeneration(String generation0)
Set the generation

Parameters:
generation0 - the generation

setIssued

public void setIssued(String issued0)
Set the date of issue

Parameters:
issued0 - date of issue

setNonlinuxSlots

public void setNonlinuxSlots(String nonlinuxSlots0)
Set the number of non-linux slots

Parameters:
nonlinuxSlots0 - the number of non-linux slots

setMonitoringSlots

public void setMonitoringSlots(String monitoringSlots0)
Set the number of monitoring slots

Parameters:
monitoringSlots0 - the number of monitoring slots

setOwner

public void setOwner(String owner0)
Set the owner

Parameters:
owner0 - the owner

setProduct

public void setProduct(String product0)
Set the product

Parameters:
product0 - the product

setProvisioningSlots

public void setProvisioningSlots(String provisioningSlots0)
Set the number of provisioning slots

Parameters:
provisioningSlots0 - the number of provisioning slots

setSatelliteVersion

public void setSatelliteVersion(String satelliteVersion0)
Set the satellite version

Parameters:
satelliteVersion0 - the satellite version

setSignature

public void setSignature(String signature0)
Set the signature as an ASCII armored string

Parameters:
signature0 - the ASCII armored signature

setSlots

public void setSlots(String slots0)
Set the number of slots

Parameters:
slots0 - the number of slots

setVirtualizationSlots

public void setVirtualizationSlots(String virtualizationSlots0)
Set the number of virtualization slots

Parameters:
virtualizationSlots0 - the number of virtualization slots

setVirtualizationPlatformSlots

public void setVirtualizationPlatformSlots(String virtualizationSlots0)
Set the number of virtualization platform slots

Parameters:
virtualizationSlots0 - the number of virtualization platform slots

getChannelFamilies

public List getChannelFamilies()
Return an unmodifiable list of the channel families

Returns:
an unmodifiable list of the channel families

getChannelFamily

public ChannelFamilyDescriptor getChannelFamily(String family)
Return the channel family with name family, or null if no such family exists.

Parameters:
family - the name of the family
Returns:
the channel family with name family, or null if no such family exists.

getExpires

public String getExpires()
Get the expiration date

Returns:
the expiration date

getExpiresDate

public Date getExpiresDate()
                    throws ParseException
Convenience function, returns java.util.Date equivalent of expires

Returns:
Date obj equivalent of expires
Throws:
ParseException - format of expires not what we expected

getGeneration

public String getGeneration()
Get the generation

Returns:
the generation

getIssued

public String getIssued()
Get the issue date

Returns:
the issue date

getNonlinuxSlots

public String getNonlinuxSlots()
Get the nonlinux slots

Returns:
the nonlinux slots

getMonitoringSlots

public String getMonitoringSlots()
Get the monitoring slots

Returns:
the monitoring slots

getOwner

public String getOwner()
Get the owner

Returns:
the owner

getProduct

public String getProduct()
Get the product

Returns:
the product

getProvisioningSlots

public String getProvisioningSlots()
Get the number of provisioning slots

Returns:
the number of provisioning slots

getSatelliteVersion

public String getSatelliteVersion()
Get the satellite version

Returns:
the satellite version

getSignature

public String getSignature()
Get the ASCII armoured signature

Returns:
the ASCII armoured signature

getSlots

public String getSlots()
Get the number of slots

Returns:
the number of slots

getVirtualizationSlots

public String getVirtualizationSlots()
Get the number of virtualization slots

Returns:
the number of virtualization slots

getVirtualizationPlatformSlots

public String getVirtualizationPlatformSlots()
Get the number of virtualization platform slots

Returns:
the number of virtualizationPlatform slots


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.