org.nhindirect.config.service.impl
Class CertificateServiceImpl

java.lang.Object
  extended by org.nhindirect.config.service.impl.CertificateServiceImpl
All Implemented Interfaces:
CertificateService

public class CertificateServiceImpl
extends Object
implements CertificateService

Service class for methods related to a Certificate object.


Nested Class Summary
static class CertificateServiceImpl.CertContainer
           
 
Constructor Summary
CertificateServiceImpl()
           
 
Method Summary
 void addCertificates(Collection<org.nhindirect.config.store.Certificate> certs)
          Add a Certificate.
 boolean contains(org.nhindirect.config.store.Certificate cert)
          Determines if a certificate exists in the certificate store.
 org.nhindirect.config.store.Certificate getCertificate(String owner, String thumbprint, CertificateGetOptions options)
          Get a Certificate.
 Collection<org.nhindirect.config.store.Certificate> getCertificates(Collection<Long> certIds, CertificateGetOptions options)
          Get a collection of Certificates.
 Collection<org.nhindirect.config.store.Certificate> getCertificatesForOwner(String owner, CertificateGetOptions options)
          Get a collection of Certificates for an owner.
 void init()
          Initialization method.
 Collection<org.nhindirect.config.store.Certificate> listCertificates(long lastCertificateID, int maxResults, CertificateGetOptions options)
          Get a collection of Certificates.
 void removeCertificates(Collection<Long> certificateIds)
          Remove a Certificate.
 void removeCertificatesForOwner(String owner)
          Remove the Certificates for an owner.
 void setCertificateStatus(Collection<Long> certificateIDs, org.nhindirect.config.store.EntityStatus status)
          Set a Certificate status.
 void setCertificateStatusForOwner(String owner, org.nhindirect.config.store.EntityStatus status)
          Set the Certificate status for an owner.
 void setDao(org.nhindirect.config.store.dao.CertificateDao aDao)
          Set the value of the CertificateDao object.
 CertificateServiceImpl.CertContainer toCertContainer(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateServiceImpl

public CertificateServiceImpl()
Method Detail

setDao

public void setDao(org.nhindirect.config.store.dao.CertificateDao aDao)
Set the value of the CertificateDao object.

Parameters:
aDao - The value of the CertificateDao object.

init

public void init()
Initialization method.


addCertificates

public void addCertificates(Collection<org.nhindirect.config.store.Certificate> certs)
                     throws ConfigurationServiceException
Description copied from interface: CertificateService
Add a Certificate.

Specified by:
addCertificates in interface CertificateService
Parameters:
certs - The Certificate.
Throws:
ConfigurationServiceException

getCertificate

public org.nhindirect.config.store.Certificate getCertificate(String owner,
                                                              String thumbprint,
                                                              CertificateGetOptions options)
                                                       throws ConfigurationServiceException
Description copied from interface: CertificateService
Get a Certificate.

Specified by:
getCertificate in interface CertificateService
Parameters:
owner - The Certificate owner.
thumbprint - The Certificate thumbprint.
options - The Certificate options.
Returns:
a Certificate.
Throws:
ConfigurationServiceException

getCertificates

public Collection<org.nhindirect.config.store.Certificate> getCertificates(Collection<Long> certIds,
                                                                           CertificateGetOptions options)
                                                                    throws ConfigurationServiceException
Description copied from interface: CertificateService
Get a collection of Certificates.

Specified by:
getCertificates in interface CertificateService
Parameters:
certIds - A collection of Certificate IDs.
options - The Certificate options.
Returns:
a collection of Certificates.
Throws:
ConfigurationServiceException

getCertificatesForOwner

public Collection<org.nhindirect.config.store.Certificate> getCertificatesForOwner(String owner,
                                                                                   CertificateGetOptions options)
                                                                            throws ConfigurationServiceException
Description copied from interface: CertificateService
Get a collection of Certificates for an owner.

Specified by:
getCertificatesForOwner in interface CertificateService
Parameters:
owner - The Certificate owner.
options - The Certificate options.
Returns:
a collection of Certificates.
Throws:
ConfigurationServiceException

setCertificateStatus

public void setCertificateStatus(Collection<Long> certificateIDs,
                                 org.nhindirect.config.store.EntityStatus status)
                          throws ConfigurationServiceException
Description copied from interface: CertificateService
Set a Certificate status.

Specified by:
setCertificateStatus in interface CertificateService
Parameters:
certificateIDs - A collection of Certificates.
status - The Certificate status.
Throws:
ConfigurationServiceException

setCertificateStatusForOwner

public void setCertificateStatusForOwner(String owner,
                                         org.nhindirect.config.store.EntityStatus status)
                                  throws ConfigurationServiceException
Description copied from interface: CertificateService
Set the Certificate status for an owner.

Specified by:
setCertificateStatusForOwner in interface CertificateService
Parameters:
owner - The Certificate owner.
status - The Certificate status.
Throws:
ConfigurationServiceException

removeCertificates

public void removeCertificates(Collection<Long> certificateIds)
                        throws ConfigurationServiceException
Description copied from interface: CertificateService
Remove a Certificate.

Specified by:
removeCertificates in interface CertificateService
Parameters:
certificateIds - A collection of Certificate IDs.
Throws:
ConfigurationServiceException

removeCertificatesForOwner

public void removeCertificatesForOwner(String owner)
                                throws ConfigurationServiceException
Description copied from interface: CertificateService
Remove the Certificates for an owner.

Specified by:
removeCertificatesForOwner in interface CertificateService
Parameters:
owner - The Certificate owner.
Throws:
ConfigurationServiceException

listCertificates

public Collection<org.nhindirect.config.store.Certificate> listCertificates(long lastCertificateID,
                                                                            int maxResults,
                                                                            CertificateGetOptions options)
                                                                     throws ConfigurationServiceException
Description copied from interface: CertificateService
Get a collection of Certificates.

Specified by:
listCertificates in interface CertificateService
Parameters:
lastCertificateID - The last Certificate ID.
maxResults - The maximum number of results.
options - The Certificate options.
Returns:
a collection of Certificates.
Throws:
ConfigurationServiceException

contains

public boolean contains(org.nhindirect.config.store.Certificate cert)
Description copied from interface: CertificateService
Determines if a certificate exists in the certificate store. Although not specific in the interface definition, certificate thumbprinting is recommended for certificate searching.

Specified by:
contains in interface CertificateService
Parameters:
cert - The certificate to search for.
Returns:
True if the certificate exist in the store. False otherwise.

toCertContainer

public CertificateServiceImpl.CertContainer toCertContainer(byte[] data)
                                                     throws ConfigurationServiceException
Throws:
ConfigurationServiceException


Copyright © 2011. All Rights Reserved.