Class KeystoreMgmtPayloadParser
- java.lang.Object
-
- org.certificateservices.messages.csmessages.BasePayloadParser
-
- org.certificateservices.messages.keystoremgmt.KeystoreMgmtPayloadParser
-
- All Implemented Interfaces:
PayloadParser
public class KeystoreMgmtPayloadParser extends BasePayloadParser
Payload Parser for generating SysConfig messages according to keystoremgmt_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 KeystoreMgmtPayloadParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generateAttachCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String alias, java.util.List<Credential> credentialChain, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Attach Credentials RequestCSMessageResponseDatagenerateAttachCredentialsResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method generate a Attach Credentials Response.byte[]generateGenerateCredentialRequestRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String application, CredentialRequestParams credentialRequestParams, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Generate Credential Request RequestCSMessageResponseDatagenerateGenerateCredentialRequestResponse(java.lang.String relatedEndEntity, CSMessage request, CredentialRequest credentialRequest, java.util.List<java.lang.Object> assertions)Method generate a Generate Credential Request Response.byte[]generateGetAvailableKeyStoreInfoRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Get Available Key Store Info RequestCSMessageResponseDatagenerateGetAvailableKeyStoreInfoResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<KeyStore> keyStores, java.util.List<java.lang.Object> assertions)Method generate a Get Available Key Store Info Responsebyte[]generateRemoveKeyRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String alias, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Remove Key RequestCSMessageResponseDatagenerateRemoveKeyResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method generate a Remove Key Response.byte[]generateUpdateKeyDescriptionRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String alias, java.lang.String description, Credential originator, java.util.List<java.lang.Object> assertions)Method generate a Update Key Description RequestCSMessageResponseDatagenerateUpdateKeyDescriptionResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions)Method generate a Update Key Description 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()
-
generateGetAvailableKeyStoreInfoRequest
public byte[] generateGetAvailableKeyStoreInfoRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Get Available Key Store Info Request- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)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.
-
generateGetAvailableKeyStoreInfoResponse
public CSMessageResponseData generateGetAvailableKeyStoreInfoResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<KeyStore> keyStores, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Get Available Key Store Info Response- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the related requestkeyStores- a list of available key store data.assertions- a list of related authorization assertions, or null if no authorization assertions is available.- Returns:
- as success response back to the requestor.
- Throws:
MessageContentExceptionMessageProcessingException
-
generateGenerateCredentialRequestRequest
public byte[] generateGenerateCredentialRequestRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String application, CredentialRequestParams credentialRequestParams, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Generate Credential Request Request- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)keyStoreProviderName- the name of the key store provider managing the keyapplication- the application that should use the key.credentialRequestParams- the credential request parameters.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.
-
generateGenerateCredentialRequestResponse
public CSMessageResponseData generateGenerateCredentialRequestResponse(java.lang.String relatedEndEntity, CSMessage request, CredentialRequest credentialRequest, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Generate Credential Request Response.- Parameters:
relatedEndEntity- the name of the related end entity (such as username of the related user)request- the related requestcredentialRequest- the generate credential requestassertions- 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.
-
generateRemoveKeyRequest
public byte[] generateRemoveKeyRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String alias, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Remove Key Request- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)keyStoreProviderName- the name of the key store provider managing the keyalias- the alias of the keyoriginator- 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.
-
generateRemoveKeyResponse
public CSMessageResponseData generateRemoveKeyResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Remove Key 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:
- a generated and signed (if configured) message.
- Throws:
MessageContentException- if input data contained invalid format.MessageProcessingException- if internal problems occurred processing the cs message.
-
generateAttachCredentialsRequest
public byte[] generateAttachCredentialsRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String alias, java.util.List<Credential> credentialChain, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Attach Credentials Request- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)keyStoreProviderName- the name of the key store provider managing the keyalias- the alias of the keycredentialChain- one more credentials of the credential chain to attach to the key.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.
-
generateAttachCredentialsResponse
public CSMessageResponseData generateAttachCredentialsResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Attach Credentials 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:
- a generated and signed (if configured) message.
- Throws:
MessageContentException- if input data contained invalid format.MessageProcessingException- if internal problems occurred processing the cs message.
-
generateUpdateKeyDescriptionRequest
public byte[] generateUpdateKeyDescriptionRequest(java.lang.String requestId, java.lang.String destinationId, java.lang.String organisation, java.lang.String keyStoreProviderName, java.lang.String alias, java.lang.String description, Credential originator, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingExceptionMethod generate a Update Key Description Request- Parameters:
requestId- id of request to send.destinationId- the destination Id to use.organisation- the related organisation (short name)keyStoreProviderName- the name of the key store provider managing the keyalias- the alias of the keydescription- the description to updateoriginator- 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.
-
generateUpdateKeyDescriptionResponse
public CSMessageResponseData generateUpdateKeyDescriptionResponse(java.lang.String relatedEndEntity, CSMessage request, java.util.List<java.lang.Object> assertions) throws MessageContentException, MessageProcessingException
Method generate a Update Key Description 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
-
-