Class V2XBackendPayloadParser

  • All Implemented Interfaces:
    PayloadParser

    public class V2XBackendPayloadParser
    extends BasePayloadParser
    Payload Parser for generating V2X Backend messages according to v2x_backend_schema2_0.xsd
    • Field Detail

      • NAMESPACE

        public static java.lang.String NAMESPACE
    • Constructor Detail

      • V2XBackendPayloadParser

        public V2XBackendPayloadParser()
    • Method Detail

      • getJAXBPackage

        public java.lang.String getJAXBPackage()
        Description copied from interface: PayloadParser
        Method 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()
      • getRelatedSchemas

        public java.lang.String[] getRelatedSchemas​(java.lang.String payloadVersion)
        Method that returns related v2x schema
        Specified by:
        getRelatedSchemas in interface PayloadParser
        Overrides:
        getRelatedSchemas in class BasePayloadParser
        Parameters:
        payloadVersion - payload version.
        Returns:
        an array of related schemas if no related schemas exists is empty array returned, never null.
      • generateSignCertRequest

        public byte[] generateSignCertRequest​(java.lang.String requestId,
                                              java.lang.String destinationId,
                                              java.lang.String organisation,
                                              java.lang.String canonicalId,
                                              java.lang.Integer assuranceLevel,
                                              java.lang.Integer confidenceLevel,
                                              java.lang.String caId,
                                              java.lang.String profileName,
                                              ValidityUnitType validityUnit,
                                              java.lang.Integer validityDuration,
                                              RegionsType regions,
                                              byte[] publicVerificationKey,
                                              byte[] publicEncryptionKey,
                                              byte[] requestHash,
                                              Credential originator,
                                              java.util.List<java.lang.Object> assertions)
                                       throws MessageContentException,
                                              MessageProcessingException
        Method generate a Sign Cert Request Message.
        Parameters:
        requestId - id of request to send. (Required)
        destinationId - the destination Id to use. (Required)
        organisation - the related organisation (short name) (Required)
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier. (Required)
        assuranceLevel - the assurance level to set in the certificate (Optional, use if assuranceLevel and confidenceLevel should be set).
        confidenceLevel - the confidenceLevel level to set in the certificate (Optional, use if assuranceLevel and confidenceLevel should be set).
        caId - the hashedId8 of related CA in hexadecimal representation.
        profileName - Name of profile to use for the credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default profile is used.
        validityUnit - the unit used for the maximum end date for EC if specified, if empty is profile validity used. (Optional)
        validityDuration - the duration value the maximum end date for EC if specified, if empty is profile validity used. (Optional)
        regions - Defines specific regions for this vehicle. The defined regions is checked against the profile and only regions that are a subset of regions defined in related profile will be accepted. If not set is the default regions set in related profile used. (Optional)
        publicVerificationKey - the public verification key as a COER encoded PublicVerificationKey from ETSI 103 097. (Required)
        publicEncryptionKey - the public verification key as a COER encoded PublicEncryptionKey from ETSI 103 097. (Optional)
        requestHash - the related request message hash (Required).
        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.
      • generateSignCertResponse

        public CSMessageResponseData generateSignCertResponse​(java.lang.String relatedEndEntity,
                                                              CSMessage request,
                                                              java.lang.String canonicalId,
                                                              java.lang.String responseCode,
                                                              java.lang.String message,
                                                              byte[] responseData)
                                                       throws MessageContentException,
                                                              MessageProcessingException
        Method generate a Sign Cert Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier. (Required)
        responseCode - name representation of one result code in related enrolment protocol. (Required)
        message - descriptive messate related to the response used in logging (Optional)
        responseData - the signed response data. (Required)
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.
      • generateSignErrorRequest

        public byte[] generateSignErrorRequest​(java.lang.String requestId,
                                               java.lang.String destinationId,
                                               java.lang.String organisation,
                                               java.lang.String canonicalId,
                                               java.lang.String caId,
                                               java.lang.String responseCode,
                                               java.lang.String message,
                                               byte[] requestHash,
                                               Credential originator,
                                               java.util.List<java.lang.Object> assertions)
                                        throws MessageContentException,
                                               MessageProcessingException
        Method generate a SignErrorRequest message
        Parameters:
        requestId - id of request to send.
        destinationId - the destination Id to use.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier. (Required)
        caId - the hashedId8 of related CA in hexadecimal representation.
        responseCode - name representation of one result code in related enrolment protocol. (Required)
        requestHash - the related request message hash
        message - descriptive messate related to the response used in logging (Required)
        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.
      • generateSignErrorResponse

        public CSMessageResponseData generateSignErrorResponse​(java.lang.String relatedEndEntity,
                                                               CSMessage request,
                                                               java.lang.String canonicalId,
                                                               java.lang.String responseCode,
                                                               java.lang.String message,
                                                               byte[] responseData)
                                                        throws MessageContentException,
                                                               MessageProcessingException
        Method generate a Sign Error Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier. (Required)
        responseCode - name representation of one result code in related enrolment protocol. (Required)
        message - descriptive messate related to the response used in logging (Optional)
        responseData - the signed response data. (Required)
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.