use of org.geotoolkit.wcs.xml.v200.ServiceMetadataType in project peppol-commons by phax.
the class BDXR2Client method saveServiceEndpoints.
/**
* Saves a service information data object.
*
* @param aServiceGroupID
* The service group ID to use. May not be <code>null</code>.
* @param aDocumentTypeID
* The document type ID to use. May not be <code>null</code>.
* @param aEndpoints
* The endpoints to the created or updated. May not be
* <code>null</code>.
* @param aCredentials
* The user name and password to use as credentials. May not be
* <code>null</code>.
* @throws SMPClientException
* in case something goes wrong
* @throws SMPClientUnauthorizedException
* The user name or password was not correct.
* @throws SMPClientNotFoundException
* A HTTP Not Found was received. This can happen if the service was
* not found.
* @throws SMPClientBadRequestException
* The request was not well formed.
* @see #saveServiceRedirect(ParticipantIDType, IDType, RedirectType,
* BasicAuthClientCredentials)
*/
public void saveServiceEndpoints(@Nonnull final ParticipantIDType aServiceGroupID, @Nonnull final IDType aDocumentTypeID, @Nonnull final List<EndpointType> aEndpoints, @Nonnull final BasicAuthClientCredentials aCredentials) throws SMPClientException {
ValueEnforcer.notNull(aServiceGroupID, "ServiceGroupID");
ValueEnforcer.notNull(aDocumentTypeID, "DocumentTypeID");
ValueEnforcer.notNull(aEndpoints, "Endpoints");
ValueEnforcer.notNull(aCredentials, "Credentials");
final ServiceMetadataType aServiceMetadata = new ServiceMetadataType();
aServiceMetadata.setSMPVersionID("2.0");
aServiceMetadata.setID(aDocumentTypeID);
aServiceMetadata.setParticipantID(aServiceGroupID);
final ProcessMetadataType aPM = new ProcessMetadataType();
aPM.getEndpoint().addAll(aEndpoints);
aServiceMetadata.addProcessMetadata(aPM);
_saveServiceInformation(aServiceMetadata, aCredentials);
}
Aggregations