org.nhindirect.config.service
Interface TrustBundleService

All Known Subinterfaces:
ConfigurationService
All Known Implementing Classes:
ConfigurationServiceImpl, TrustBundleServiceImpl

public interface TrustBundleService

Web service interface for trust bundle operations.

Since:
1.3
Author:
Greg Meyer

Method Summary
 void addTrustBundle(org.nhindirect.config.store.TrustBundle bundle)
          Adds a trust bundle to the system.
 void associateTrustBundleToDomain(long domainId, long trustBundleId, boolean incoming, boolean outgoing)
          Associates a domain to a trust bundle.
 void deleteTrustBundles(long[] trustBundleIds)
          Deletes a set of trust bundle from the system.
 void disassociateTrustBundleFromDomain(long domainId, long trustBundleId)
          Dissociates a domain from a trust bundle.
 void disassociateTrustBundleFromDomains(long trustBundleId)
          Dissociates a trust bundle from all domains.
 void disassociateTrustBundlesFromDomain(long domainId)
          Dissociates a domain from all trust bundles.
 org.nhindirect.config.store.TrustBundle getTrustBundleById(long id)
          Gets a specific trust bundle by its internal id.
 org.nhindirect.config.store.TrustBundle getTrustBundleByName(String bundleName)
          Gets a specific trust bundle by name.
 Collection<org.nhindirect.config.store.TrustBundle> getTrustBundles(boolean fetchAnchors)
          Gets a collection of all trust bundles in the system
 Collection<org.nhindirect.config.store.TrustBundleDomainReltn> getTrustBundlesByDomain(long domainId, boolean fetchAnchors)
          Gets all trust bundles associated with a domain
 void refreshTrustBundle(long id)
          Forces an on demand refresh of a trust bundle regardless of its refresh internal.
 void updateLastUpdateError(long trustBundleId, Calendar attemptTime, org.nhindirect.config.store.BundleRefreshError error)
          Updates the last error that occurred when trying to download or refresh the bundle from its URL.
 void updateTrustBundleSigningCertificate(long trustBundleId, org.nhindirect.config.store.Certificate signingCert)
          Updates the signing certificate used to validate the authenticity of a bundle.
 

Method Detail

getTrustBundles

Collection<org.nhindirect.config.store.TrustBundle> getTrustBundles(boolean fetchAnchors)
                                                                    throws ConfigurationServiceException
Gets a collection of all trust bundles in the system

Parameters:
fetchAnchors - Indicates if the anchors should be fetched. When only the trust bundle names are needed, it is desireable to suppress returning the list of anchors for efficiency.
Returns:
Collection of all trust bundles in the system. If no trust bundles have been configured, then an empty collection is returned.
Throws:
ConfigurationServiceException

getTrustBundleByName

org.nhindirect.config.store.TrustBundle getTrustBundleByName(String bundleName)
                                                             throws ConfigurationServiceException
Gets a specific trust bundle by name. Each trust bundle name is unique and case insensitive.

Parameters:
bundleName - The bundle name.
Returns:
The trust bundle specified by the name. If a bundle with the given name is not found, then null is returned.
Throws:
ConfigurationServiceException

getTrustBundleById

org.nhindirect.config.store.TrustBundle getTrustBundleById(long id)
                                                           throws ConfigurationServiceException
Gets a specific trust bundle by its internal id.

Parameters:
id - The internal trust bundle id.
Returns:
The trust bundle specified by the id. If a bundle with the given id is not found, then null is returned.
Throws:
ConfigurationServiceException

addTrustBundle

void addTrustBundle(org.nhindirect.config.store.TrustBundle bundle)
                    throws ConfigurationServiceException
Adds a trust bundle to the system. The anchors should not be provided in the object as they will be downloaded. from the provided trust bundle URL.

Parameters:
bundle - The bundle to add.
Throws:
ConfigurationServiceException - Throw if a bundle with the same name already exists of if required properties are empty or null.

refreshTrustBundle

void refreshTrustBundle(long id)
                        throws ConfigurationServiceException
Forces an on demand refresh of a trust bundle regardless of its refresh internal.

Parameters:
id - The id of the trust bundle to refresh.
Throws:
ConfigurationServiceException

updateLastUpdateError

void updateLastUpdateError(long trustBundleId,
                           Calendar attemptTime,
                           org.nhindirect.config.store.BundleRefreshError error)
                           throws ConfigurationServiceException
Updates the last error that occurred when trying to download or refresh the bundle from its URL.

Parameters:
trustBundleId - The id of the bundle.
attemptTime - The time the bundle update was attempted
error - The reason for the error.
Throws:
ConfigurationServiceException

deleteTrustBundles

void deleteTrustBundles(long[] trustBundleIds)
                        throws ConfigurationServiceException
Deletes a set of trust bundle from the system. All associations to domains are deleted as well.

Parameters:
trustBundleIds - The ids of the bundles to delete.
Throws:
ConfigurationServiceException

updateTrustBundleSigningCertificate

void updateTrustBundleSigningCertificate(long trustBundleId,
                                         org.nhindirect.config.store.Certificate signingCert)
                                         throws ConfigurationServiceException
Updates the signing certificate used to validate the authenticity of a bundle.

Parameters:
trustBundleId - The trust bundle id.
signingCert - The certificate used to sign the bundle
Throws:
ConfigurationServiceException

associateTrustBundleToDomain

void associateTrustBundleToDomain(long domainId,
                                  long trustBundleId,
                                  boolean incoming,
                                  boolean outgoing)
                                  throws ConfigurationServiceException
Associates a domain to a trust bundle. Bundle associates are directional and may be set as incoming only, outgoing only, or incoming and outgoing.

Parameters:
domainId - The id of the domain.
trustBundleId - The id of the trust bundle.
incoming - Indicates if the trust should allow incoming messages.
outgoing - Indicates if the trust should allow outgoing messages.
Throws:
ConfigurationServiceException

disassociateTrustBundleFromDomain

void disassociateTrustBundleFromDomain(long domainId,
                                       long trustBundleId)
                                       throws ConfigurationServiceException
Dissociates a domain from a trust bundle.

Parameters:
domainId - The id of the domain
trustBundleId - The id of the trust bundle
Throws:
ConfigurationServiceException

disassociateTrustBundlesFromDomain

void disassociateTrustBundlesFromDomain(long domainId)
                                        throws ConfigurationServiceException
Dissociates a domain from all trust bundles.

Parameters:
domainId - The id of the domain
Throws:
ConfigurationServiceException

disassociateTrustBundleFromDomains

void disassociateTrustBundleFromDomains(long trustBundleId)
                                        throws ConfigurationServiceException
Dissociates a trust bundle from all domains.

Parameters:
trustBundleId - The trust bundle id.
Throws:
ConfigurationServiceException

getTrustBundlesByDomain

Collection<org.nhindirect.config.store.TrustBundleDomainReltn> getTrustBundlesByDomain(long domainId,
                                                                                       boolean fetchAnchors)
                                                                                       throws ConfigurationServiceException
Gets all trust bundles associated with a domain

Parameters:
domainId - The domain id
fetchAnchors - Indicates if the anchors should be returned with each bundle. When only the trust bundle names are needed, it is desireable to suppress returning the list of anchors for efficiency.
Returns:
Collection of all trust bundles associated with a specific domain.
Throws:
ConfigurationServiceException


Copyright © 2013. All Rights Reserved.