Class SysConfigPayloadParser
- java.lang.Object
-
- org.certificateservices.messages.csmessages.BasePayloadParser
-
- org.certificateservices.messages.sysconfig.SysConfigPayloadParser
-
- All Implemented Interfaces:
PayloadParser
public class SysConfigPayloadParser extends BasePayloadParser
Payload Parser for generating SysConfig messages according to sysconfig_schema2_0.xsd
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMESPACE-
Fields inherited from class org.certificateservices.messages.csmessages.BasePayloadParser
config, csMessageObjectFactory, customCSMessageParser, payloadVersion, secProv
-
-
Constructor Summary
Constructors Constructor Description SysConfigPayloadParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generateGetActiveConfigurationRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String application, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Get Active Configuration Request.CSMessageResponseDatagenerateGetActiveConfigurationResponse(java.lang.String relatedEndEntity, CSMessage request, SystemConfiguration systemConfiguration, java.util.List<java.lang.Object> assertions)Method generate a Get Active Configuration Response.byte[]generatePublishConfigurationRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, SystemConfiguration systemConfiguration, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Publish Configuration RequestCSMessageResponseDatageneratePublishConfigurationResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method generate a Publish Configuration Responseprotected java.lang.StringgetDefaultPayloadVersion()java.lang.StringgetJAXBPackage()Method that returns the JAXBPackage Name for the package name containing the JAXB classes.java.lang.StringgetNameSpace()java.io.InputStreamgetSchemaAsInputStream(java.lang.String payLoadVersion)Method that should return the location of the schema for a given payLoadVersion, it should be accessable as a class resource using getClass().getResourceAsStream()protected java.lang.String[]getSupportedVersions()-
Methods inherited from class org.certificateservices.messages.csmessages.BasePayloadParser
generateGetApprovalRequest, generateIsApprovedRequest, getAssertions, getCSMessageParser, getPayload, getPayloadVersion, getRelatedSchemas, getResponseStatus, init, init, isPayloadVersionSupported, parseMessage, parseMessage, parseMessage, setPayloadVersion
-
-
-
-
Method Detail
-
getJAXBPackage
public java.lang.String getJAXBPackage()
Description copied from interface:PayloadParserMethod that returns the JAXBPackage Name for the package name containing the JAXB classes. For multiple package names use a ':' without spaces.- See Also:
PayloadParser.getJAXBPackage()
-
getNameSpace
public java.lang.String getNameSpace()
- Returns:
- the related pay load elements unique name space.
- See Also:
PayloadParser.getNameSpace()
-
getSchemaAsInputStream
public java.io.InputStream getSchemaAsInputStream(java.lang.String payLoadVersion) throws MessageContentException, MessageProcessingExceptionDescription copied from interface:PayloadParserMethod that should return the location of the schema for a given payLoadVersion, it should be accessable as a class resource using getClass().getResourceAsStream()- Throws:
MessageContentException- if given version isn't supported.MessageProcessingException- if problems occurred setting up the stream.- See Also:
PayloadParser.getSchemaAsInputStream(String)
-
getSupportedVersions
protected java.lang.String[] getSupportedVersions()
- Specified by:
getSupportedVersionsin classBasePayloadParser- Returns:
- an array of version numbers of payload that is supported by this parser.
- See Also:
BasePayloadParser.getSupportedVersions()
-
getDefaultPayloadVersion
protected java.lang.String getDefaultPayloadVersion()
- Specified by:
getDefaultPayloadVersionin classBasePayloadParser- Returns:
- returns the payload version used by default when generating request messages.
- See Also:
BasePayloadParser.getDefaultPayloadVersion()
-
generateGetActiveConfigurationRequest
public byte[] generateGetActiveConfigurationRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String application, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Get Active Configuration Request.- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)application- the application name to fetch configuration for.originator- the credential of the original requester, null if this is the origin of the request.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated and signed (if configured) message.
- Throws:
MessageContentException- if input data contained invalid format.MessageProcessingException- if internal problems occurred processing the cs message.
-
generateGetActiveConfigurationResponse
public CSMessageResponseData generateGetActiveConfigurationResponse(java.lang.String relatedEndEntity, CSMessage request, SystemConfiguration systemConfiguration, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Get Active Configuration Response.- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the related requestsystemConfiguration- the current active system configuration.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated and signed (if configured) message.
- Throws:
MessageContentException- if input data contained invalid format.MessageProcessingException- if internal problems occurred processing the cs message.
-
generatePublishConfigurationRequest
public byte[] generatePublishConfigurationRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, SystemConfiguration systemConfiguration, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Publish Configuration Request- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)systemConfiguration- system configuration to publish to send.originator- the credential of the original requester, null if this is the origin of the request.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- a generated and signed (if configured) message.
- Throws:
MessageContentException- if input data contained invalid format.MessageProcessingException- if internal problems occurred processing the cs message.
-
generatePublishConfigurationResponse
public CSMessageResponseData generatePublishConfigurationResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Publish Configuration Response- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the related requestassertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- as success response back to the requestor.
- Throws:
MessageContentExceptionMessageProcessingException
-
-