org.nhindirect.config.service.impl
Class ConfigurationServiceImpl

java.lang.Object
  extended by org.nhindirect.config.service.impl.ConfigurationServiceImpl
All Implemented Interfaces:
AddressService, AnchorService, CertificateService, ConfigurationService, DomainService, SettingService

public class ConfigurationServiceImpl
extends Object
implements ConfigurationService

Implements the single Service Endpoint Interface. Delegates everything to the individual service implementations.


Constructor Summary
ConfigurationServiceImpl()
           
 
Method Summary
 void addAddress(Collection<Address> address)
          Add an Address.
 void addAnchors(Collection<Anchor> anchors)
          Add a collection of Anchors.
 void addCertificates(Collection<Certificate> certs)
          Add a Certificate.
 void addDomain(Domain domain)
          Add a new Domain.
 void addSetting(String name, String value)
          
 boolean contains(Certificate cert)
          Determines if a certificate exists in the certificate store.
 void deleteSetting(Collection<String> names)
          
 Collection<Address> getAddress(Collection<String> addressNames, EntityStatus status)
          Get a collection of all Addresses matching the parameters.
 int getAddressCount()
          Get a count of Addresses.
 AddressService getAddressSvc()
          Get the AddressService object.
 Collection<Setting> getAllSettings()
          
 Anchor getAnchor(String owner, String thumbprint, CertificateGetOptions options)
          Get an Anchor.
 Collection<Anchor> getAnchors(Collection<Long> anchorIds, CertificateGetOptions options)
          Get a collection of Anchors.
 Collection<Anchor> getAnchorsForOwner(String owner, CertificateGetOptions options)
          Get a collection of Anchors for an owner.
 AnchorService getAnchorSvc()
          Get the AnchorService object.
 Certificate getCertificate(String owner, String thumbprint, CertificateGetOptions options)
          Get a Certificate.
 Collection<Certificate> getCertificates(Collection<Long> certIds, CertificateGetOptions options)
          Get a collection of Certificates.
 Collection<Certificate> getCertificatesForOwner(String owner, CertificateGetOptions options)
          Get a collection of Certificates for an owner.
 CertificateService getCertSvc()
          Get the CertificateService object.
 Domain getDomain(Long id)
          Return a Domain matching the given ID.
 int getDomainCount()
          Get a count of Domains.
 Collection<Domain> getDomains(Collection<String> domainNames, EntityStatus status)
          Get a collection of all Domains matching the parameters.
 DomainService getDomainSvc()
          Get the DomainService object.
 Collection<Anchor> getIncomingAnchors(String owner, CertificateGetOptions options)
          Get a collection of incoming Anchors.
 Collection<Anchor> getOutgoingAnchors(String owner, CertificateGetOptions options)
          Get a collection of outgoing Anchors.
 Setting getSettingByName(String name)
          
 Collection<Setting> getSettingsByNames(Collection<String> names)
          
 SettingService getSettingSvc()
          Get the SettingService object.
 void init()
          Initialization method.
 Collection<Address> listAddresss(String lastAddressName, int maxResults)
          Return a list of Addresses matching the parameters.
 Collection<Anchor> listAnchors(Long lastAnchorID, int maxResults, CertificateGetOptions options)
          Get a collection of Anchors.
 Collection<Certificate> listCertificates(long lastCertificateId, int maxResults, CertificateGetOptions options)
          Get a collection of Certificates.
 Collection<Domain> listDomains(String lastDomainName, int maxResults)
          Return a list of Domains matching the parameters.
 void removeAddress(String addressName)
          Remove an Address.
 void removeAnchors(Collection<Long> anchorIds)
          Remove an Anchor.
 void removeAnchorsForOwner(String owner)
          Remove the Anchors for an owner.
 void removeCertificates(Collection<Long> certificateIds)
          Remove a Certificate.
 void removeCertificatesForOwner(String owner)
          Remove the Certificates for an owner.
 void removeDomain(String domainName)
          Remove a Domain.
 Collection<Domain> searchDomain(String domain, EntityStatus status)
          Return a collection of Domains matching the parameters.
 void setAddressSvc(AddressService addressSvc)
          Set the AddressService object.
 void setAnchorStatusForOwner(String owner, EntityStatus status)
          Set an Anchor status for a given owner.
 void setAnchorSvc(AnchorService anchorSvc)
          Set the AnchorService object.
 void setCertificateStatus(Collection<Long> certificateIds, EntityStatus status)
          Set a Certificate status.
 void setCertificateStatusForOwner(String owner, EntityStatus status)
          Set the Certificate status for an owner.
 void setCertSvc(CertificateService certSvc)
          Set the CertificateService object.
 void setDomainSvc(DomainService domainSvc)
          Set the DomainService object.
 void setSettingSvc(SettingService settingSvc)
          Set the SettingService object.
 void updateAddress(Address address)
          Update an Address.
 void updateDomain(Domain domain)
          Update a Domain.
 void updateSetting(String name, String value)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationServiceImpl

public ConfigurationServiceImpl()
Method Detail

init

public void init()
Initialization method.


addAddress

@FaultAction(className=ConfigurationFault.class)
public void addAddress(Collection<Address> address)
                throws ConfigurationServiceException
Description copied from interface: AddressService
Add an Address.

Specified by:
addAddress in interface AddressService
Parameters:
address - The Address to add.
Throws:
ConfigurationServiceException

updateAddress

@FaultAction(className=ConfigurationFault.class)
public void updateAddress(Address address)
                   throws ConfigurationServiceException
Description copied from interface: AddressService
Update an Address.

Specified by:
updateAddress in interface AddressService
Parameters:
address - The Address to update.
Throws:
ConfigurationServiceException

getAddressCount

@FaultAction(className=ConfigurationFault.class)
public int getAddressCount()
                    throws ConfigurationServiceException
Description copied from interface: AddressService
Get a count of Addresses.

Specified by:
getAddressCount in interface AddressService
Returns:
a count of Addresses.
Throws:
ConfigurationServiceException

getAddress

@FaultAction(className=ConfigurationFault.class)
public Collection<Address> getAddress(Collection<String> addressNames,
                                                                                   EntityStatus status)
                               throws ConfigurationServiceException
Description copied from interface: AddressService
Get a collection of all Addresses matching the parameters.

Specified by:
getAddress in interface AddressService
Parameters:
addressNames - A collection of address names.
status - An EntityStatus object.
Returns:
a collection of all Addresses matching the parameters.
Throws:
ConfigurationServiceException

removeAddress

@FaultAction(className=ConfigurationFault.class)
public void removeAddress(String addressName)
                   throws ConfigurationServiceException
Description copied from interface: AddressService
Remove an Address.

Specified by:
removeAddress in interface AddressService
Parameters:
addressName - The address name.
Throws:
ConfigurationServiceException

listAddresss

@FaultAction(className=ConfigurationFault.class)
public Collection<Address> listAddresss(String lastAddressName,
                                                                                     int maxResults)
                                 throws ConfigurationServiceException
Description copied from interface: AddressService
Return a list of Addresses matching the parameters.

Specified by:
listAddresss in interface AddressService
Parameters:
lastAddressName - The last address name.
maxResults - The maximum number of results.
Returns:
a list of Addresses matching the parameters.
Throws:
ConfigurationServiceException

addDomain

@FaultAction(className=ConfigurationFault.class)
public void addDomain(Domain domain)
               throws ConfigurationServiceException
Description copied from interface: DomainService
Add a new Domain.

Specified by:
addDomain in interface DomainService
Parameters:
domain - The Domain to add.
Throws:
ConfigurationServiceException

updateDomain

@FaultAction(className=ConfigurationFault.class)
public void updateDomain(Domain domain)
                  throws ConfigurationServiceException
Description copied from interface: DomainService
Update a Domain.

Specified by:
updateDomain in interface DomainService
Parameters:
domain - The Domain to update.
Throws:
ConfigurationServiceException

getDomainCount

@FaultAction(className=ConfigurationFault.class)
public int getDomainCount()
                   throws ConfigurationServiceException
Description copied from interface: DomainService
Get a count of Domains.

Specified by:
getDomainCount in interface DomainService
Returns:
a count of Domains.
Throws:
ConfigurationServiceException

getDomains

@FaultAction(className=ConfigurationFault.class)
public Collection<Domain> getDomains(Collection<String> domainNames,
                                                                                  EntityStatus status)
                              throws ConfigurationServiceException
Description copied from interface: DomainService
Get a collection of all Domains matching the parameters.

Specified by:
getDomains in interface DomainService
Parameters:
domainNames - A collection of domain names.
status - An EntityStatus object.
Returns:
a collection of all Domains matching the parameters.
Throws:
ConfigurationServiceException

removeDomain

@FaultAction(className=ConfigurationFault.class)
public void removeDomain(String domainName)
                  throws ConfigurationServiceException
Description copied from interface: DomainService
Remove a Domain.

Specified by:
removeDomain in interface DomainService
Parameters:
domainName - The name of the Domain to remove.
Throws:
ConfigurationServiceException

listDomains

@FaultAction(className=ConfigurationFault.class)
public Collection<Domain> listDomains(String lastDomainName,
                                                                                   int maxResults)
                               throws ConfigurationServiceException
Description copied from interface: DomainService
Return a list of Domains matching the parameters.

Specified by:
listDomains in interface DomainService
Parameters:
lastDomainName - The last domain name.
maxResults - The maximum number of results.
Returns:
a List of Domains matching the parameters.
Throws:
ConfigurationServiceException

searchDomain

@FaultAction(className=ConfigurationFault.class)
public Collection<Domain> searchDomain(String domain,
                                                                                    EntityStatus status)
Description copied from interface: DomainService
Return a collection of Domains matching the parameters.

Specified by:
searchDomain in interface DomainService
Parameters:
domain - The Domain name.
status - The Domain EntityStatus.
Returns:
a collection of Domains matching the parameters.

getDomain

@FaultAction(className=ConfigurationFault.class)
public Domain getDomain(Long id)
Description copied from interface: DomainService
Return a Domain matching the given ID.

Specified by:
getDomain in interface DomainService
Parameters:
id - The ID of the Domain.
Returns:
a Domain matching the given ID.

addCertificates

@FaultAction(className=ConfigurationFault.class)
public void addCertificates(Collection<Certificate> certs)
                     throws ConfigurationServiceException
Description copied from interface: CertificateService
Add a Certificate.

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

setCertificateStatus

@FaultAction(className=ConfigurationFault.class)
public void setCertificateStatus(Collection<Long> certificateIds,
                                                                              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

@FaultAction(className=ConfigurationFault.class)
public void setCertificateStatusForOwner(String owner,
                                                                                      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

@FaultAction(className=ConfigurationFault.class)
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

@FaultAction(className=ConfigurationFault.class)
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

contains

@FaultAction(className=ConfigurationFault.class)
public boolean contains(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.

addAnchors

@FaultAction(className=ConfigurationFault.class)
public void addAnchors(Collection<Anchor> anchors)
                throws ConfigurationServiceException
Description copied from interface: AnchorService
Add a collection of Anchors.

Specified by:
addAnchors in interface AnchorService
Parameters:
anchors - A collection of Anchors.
Throws:
ConfigurationServiceException

setAnchorStatusForOwner

@FaultAction(className=ConfigurationFault.class)
public void setAnchorStatusForOwner(String owner,
                                                                                 EntityStatus status)
                             throws ConfigurationServiceException
Description copied from interface: AnchorService
Set an Anchor status for a given owner.

Specified by:
setAnchorStatusForOwner in interface AnchorService
Parameters:
owner - The anchor owner.
status - The anchor status.
Throws:
ConfigurationServiceException

removeAnchors

@FaultAction(className=ConfigurationFault.class)
public void removeAnchors(Collection<Long> anchorIds)
                   throws ConfigurationServiceException
Description copied from interface: AnchorService
Remove an Anchor.

Specified by:
removeAnchors in interface AnchorService
Parameters:
anchorIds - A collection of Anchor IDs.
Throws:
ConfigurationServiceException

removeAnchorsForOwner

@FaultAction(className=ConfigurationFault.class)
public void removeAnchorsForOwner(String owner)
                           throws ConfigurationServiceException
Description copied from interface: AnchorService
Remove the Anchors for an owner.

Specified by:
removeAnchorsForOwner in interface AnchorService
Parameters:
owner - The Anchor owner.
Throws:
ConfigurationServiceException

getDomainSvc

public DomainService getDomainSvc()
Get the DomainService object.

Returns:
the DomainService object.

setDomainSvc

public void setDomainSvc(DomainService domainSvc)
Set the DomainService object.

Parameters:
domainSvc - The DomainService object.

getAddressSvc

public AddressService getAddressSvc()
Get the AddressService object.

Returns:
the AddressService object.

setAddressSvc

public void setAddressSvc(AddressService addressSvc)
Set the AddressService object.

Parameters:
addressSvc - The ADdressService object.

getCertSvc

public CertificateService getCertSvc()
Get the CertificateService object.

Returns:
the CertificateService object.

setCertSvc

public void setCertSvc(CertificateService certSvc)
Set the CertificateService object.

Parameters:
certSvc - The CertificateService object.

getSettingSvc

public SettingService getSettingSvc()
Get the SettingService object.

Returns:
the SettingService object.

setSettingSvc

public void setSettingSvc(SettingService settingSvc)
Set the SettingService object.

Parameters:
settingSvc - The SettingService object.

getAnchorSvc

public AnchorService getAnchorSvc()
Get the AnchorService object.

Returns:
the AnchorService object.

setAnchorSvc

public void setAnchorSvc(AnchorService anchorSvc)
Set the AnchorService object.

Parameters:
anchorSvc - The AnchorService object.

getCertificate

@FaultAction(className=ConfigurationFault.class)
public 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

@FaultAction(className=ConfigurationFault.class)
public Collection<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

@FaultAction(className=ConfigurationFault.class)
public Collection<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

listCertificates

@FaultAction(className=ConfigurationFault.class)
public Collection<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

getAnchor

@FaultAction(className=ConfigurationFault.class)
public Anchor getAnchor(String owner,
                                                                     String thumbprint,
                                                                     CertificateGetOptions options)
                 throws ConfigurationServiceException
Description copied from interface: AnchorService
Get an Anchor.

Specified by:
getAnchor in interface AnchorService
Parameters:
owner - The Anchor owner.
thumbprint - The Anchor thumbprint.
options - The Anchor options.
Returns:
an Anchor.
Throws:
ConfigurationServiceException

getAnchors

@FaultAction(className=ConfigurationFault.class)
public Collection<Anchor> getAnchors(Collection<Long> anchorIds,
                                                                                  CertificateGetOptions options)
                              throws ConfigurationServiceException
Description copied from interface: AnchorService
Get a collection of Anchors.

Specified by:
getAnchors in interface AnchorService
Parameters:
anchorIds - A collection of Anchor IDs.
options - The Anchor options.
Returns:
a collection of Anchors.
Throws:
ConfigurationServiceException

getAnchorsForOwner

@FaultAction(className=ConfigurationFault.class)
public Collection<Anchor> getAnchorsForOwner(String owner,
                                                                                          CertificateGetOptions options)
                                      throws ConfigurationServiceException
Description copied from interface: AnchorService
Get a collection of Anchors for an owner.

Specified by:
getAnchorsForOwner in interface AnchorService
Parameters:
owner - The Anchor owner.
options - The Anchor options.
Returns:
a collection of Anchors.
Throws:
ConfigurationServiceException

getIncomingAnchors

@FaultAction(className=ConfigurationFault.class)
public Collection<Anchor> getIncomingAnchors(String owner,
                                                                                          CertificateGetOptions options)
                                      throws ConfigurationServiceException
Description copied from interface: AnchorService
Get a collection of incoming Anchors.

Specified by:
getIncomingAnchors in interface AnchorService
Parameters:
owner - The Anchor owner.
options - The Anchor options.
Returns:
a collection of Anchors.
Throws:
ConfigurationServiceException

getOutgoingAnchors

@FaultAction(className=ConfigurationFault.class)
public Collection<Anchor> getOutgoingAnchors(String owner,
                                                                                          CertificateGetOptions options)
                                      throws ConfigurationServiceException
Description copied from interface: AnchorService
Get a collection of outgoing Anchors.

Specified by:
getOutgoingAnchors in interface AnchorService
Parameters:
owner - The Anchor owner.
options - The Anchor options.
Returns:
a collection of Anchors.
Throws:
ConfigurationServiceException

listAnchors

@FaultAction(className=ConfigurationFault.class)
public Collection<Anchor> listAnchors(Long lastAnchorID,
                                                                                   int maxResults,
                                                                                   CertificateGetOptions options)
                               throws ConfigurationServiceException
Description copied from interface: AnchorService
Get a collection of Anchors.

Specified by:
listAnchors in interface AnchorService
Parameters:
lastAnchorID - The last Anchor ID.
maxResults - The maximum number of results.
options - The Anchor options.
Returns:
a collection of Anchors.
Throws:
ConfigurationServiceException

addSetting

@FaultAction(className=ConfigurationFault.class)
public void addSetting(String name,
                                                                    String value)
                throws ConfigurationServiceException

Specified by:
addSetting in interface SettingService
Throws:
ConfigurationServiceException

getAllSettings

@FaultAction(className=ConfigurationFault.class)
public Collection<Setting> getAllSettings()
                                   throws ConfigurationServiceException

Specified by:
getAllSettings in interface SettingService
Throws:
ConfigurationServiceException

getSettingByName

@FaultAction(className=ConfigurationFault.class)
public Setting getSettingByName(String name)
                         throws ConfigurationServiceException

Specified by:
getSettingByName in interface SettingService
Throws:
ConfigurationServiceException

getSettingsByNames

@FaultAction(className=ConfigurationFault.class)
public Collection<Setting> getSettingsByNames(Collection<String> names)
                                       throws ConfigurationServiceException

Specified by:
getSettingsByNames in interface SettingService
Throws:
ConfigurationServiceException

updateSetting

@FaultAction(className=ConfigurationFault.class)
public void updateSetting(String name,
                                                                       String value)
                   throws ConfigurationServiceException

Specified by:
updateSetting in interface SettingService
Throws:
ConfigurationServiceException

deleteSetting

@FaultAction(className=ConfigurationFault.class)
public void deleteSetting(Collection<String> names)
                   throws ConfigurationServiceException

Specified by:
deleteSetting in interface SettingService
Throws:
ConfigurationServiceException


Copyright © 2010. All Rights Reserved.