Class V2XPayloadParser

  • All Implemented Interfaces:
    PayloadParser

    public class V2XPayloadParser
    extends BasePayloadParser
    Payload Parser for generating V2X messages according to v2x_registration_schema2_0.xsd
    • Field Detail

      • NAMESPACE

        public static java.lang.String NAMESPACE
      • V2X_XSD_SCHEMA_2_0_RESOURCE_LOCATION

        public static final java.lang.String V2X_XSD_SCHEMA_2_0_RESOURCE_LOCATION
        See Also:
        Constant Field Values
    • Constructor Detail

      • V2XPayloadParser

        public V2XPayloadParser()
    • 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()
      • generateRegisterITSSRequest

        public byte[] generateRegisterITSSRequest​(java.lang.String requestId,
                                                  java.lang.String destinationId,
                                                  java.lang.String organisation,
                                                  java.lang.String ecuType,
                                                  java.lang.String canonicalId,
                                                  byte[] canonicalSignPubKey,
                                                  java.lang.String eaName,
                                                  java.lang.String ecProfile,
                                                  java.lang.String atProfile,
                                                  java.util.List<AppPermissionsType> atAppPermissions,
                                                  java.util.Date itssValidFrom,
                                                  java.util.Date itssValidTo,
                                                  RegionsType regions,
                                                  Credential originator,
                                                  java.util.List<java.lang.Object> assertions)
                                           throws MessageContentException,
                                                  MessageProcessingException
        Method generate a Register ITSS Request Message.
        Parameters:
        requestId - id of request to send.
        destinationId - the destination Id to use.
        organisation - the related organisation (short name)
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level. (Required)
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier. (Required)
        canonicalSignPubKey - the initial ec sign public key as a COER encoded PublicVerificationKey from ETSI 103 097.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets (Required).
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        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.
      • generateRegisterITSSResponse

        public CSMessageResponseData generateRegisterITSSResponse​(java.lang.String relatedEndEntity,
                                                                  CSMessage request,
                                                                  java.lang.String ecuType,
                                                                  java.lang.String canonicalId,
                                                                  CanonicalKeyType canonicalKey,
                                                                  java.lang.String eaName,
                                                                  java.lang.String ecProfile,
                                                                  java.lang.String atProfile,
                                                                  java.util.List<AppPermissionsType> atAppPermissions,
                                                                  java.util.Date itssValidFrom,
                                                                  java.util.Date itssValidTo,
                                                                  RegionsType regions,
                                                                  ITSSStatusType itsStatus)
                                                           throws MessageContentException,
                                                                  MessageProcessingException
        Method generate a Register ITSS Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier.
        canonicalKey - the initial ec public key type containing keys to update.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets.
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        itsStatus - the current status of the ITS Station.
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.
      • generateUpdateITSSRequest

        public byte[] generateUpdateITSSRequest​(java.lang.String requestId,
                                                java.lang.String destinationId,
                                                java.lang.String organisation,
                                                java.lang.String ecuType,
                                                java.lang.String canonicalId,
                                                byte[] canonicalSignPubKey,
                                                java.lang.String eaName,
                                                java.lang.String ecProfile,
                                                java.lang.String atProfile,
                                                java.util.List<AppPermissionsType> atAppPermissions,
                                                java.util.Date itssValidFrom,
                                                java.util.Date itssValidTo,
                                                RegionsType regions,
                                                Credential originator,
                                                java.util.List<java.lang.Object> assertions)
                                         throws MessageContentException,
                                                MessageProcessingException
        Method generate a Update ITSS Request Message. Fields that are null will not be updated.
        Parameters:
        requestId - id of request to send.
        destinationId - the destination Id to use.
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier. (Required)
        canonicalSignPubKey - the initial ec sign public key as a COER encoded PublicVerificationKey from ETSI 103 097.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets.
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        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.
      • generateUpdateITSSResponse

        public CSMessageResponseData generateUpdateITSSResponse​(java.lang.String relatedEndEntity,
                                                                CSMessage request,
                                                                java.lang.String ecuType,
                                                                java.lang.String canonicalId,
                                                                CanonicalKeyType canonicalKey,
                                                                java.lang.String eaName,
                                                                java.lang.String ecProfile,
                                                                java.lang.String atProfile,
                                                                java.util.List<AppPermissionsType> atAppPermissions,
                                                                java.util.Date itssValidFrom,
                                                                java.util.Date itssValidTo,
                                                                RegionsType regions,
                                                                ITSSStatusType itsStatus)
                                                         throws MessageContentException,
                                                                MessageProcessingException
        Method generate a Update ITSS Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier in hostname format.
        canonicalKey - the initial ec public key type containing keys to update.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets.
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        itsStatus - the current status of the ITS Station.
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.
      • generateUpdateITSSResponse

        public CSMessageResponseData generateUpdateITSSResponse​(java.lang.String relatedEndEntity,
                                                                CSMessage request,
                                                                UpdateITSSResponse payload)
                                                         throws MessageContentException,
                                                                MessageProcessingException
        Method generate a Update ITSS Response Message from a pre-populated UpdateITSSResponse
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        payload - a pre-populated UpdateITSSResponse payload.
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.
      • generateGetITSSDataRequest

        public byte[] generateGetITSSDataRequest​(java.lang.String requestId,
                                                 java.lang.String destinationId,
                                                 java.lang.String organisation,
                                                 java.lang.String canonicalId,
                                                 boolean includeEC,
                                                 Credential originator,
                                                 java.util.List<java.lang.Object> assertions)
                                          throws MessageContentException,
                                                 MessageProcessingException
        Method generate a Get ITSS Data Request Message.
        Parameters:
        requestId - id of request to send.
        destinationId - the destination Id to use.
        organisation - the related organisation (short name)
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier.
        includeEC - if issued enrolment credentials should be returned in the response.
        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.
      • generateGetITSSDataResponse

        public CSMessageResponseData generateGetITSSDataResponse​(java.lang.String relatedEndEntity,
                                                                 CSMessage request,
                                                                 java.lang.String ecuType,
                                                                 java.lang.String canonicalId,
                                                                 CanonicalKeyType canonicalKeyType,
                                                                 java.lang.String eaName,
                                                                 java.lang.String ecProfile,
                                                                 java.lang.String atProfile,
                                                                 java.util.List<AppPermissionsType> atAppPermissions,
                                                                 java.util.Date itssValidFrom,
                                                                 java.util.Date itssValidTo,
                                                                 RegionsType regions,
                                                                 ITSSStatusType itsStatus,
                                                                 java.util.List<EnrolmentCredentialType> enrolmentCredentials)
                                                          throws MessageContentException,
                                                                 MessageProcessingException
        Method generate a Get ITSS Data Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier in hostname format.
        canonicalKeyType - the initial ec public key type containing keys to update.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets.
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        itsStatus - the current status of the ITS Station.
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.
      • generateDeactivateITSSRequest

        public byte[] generateDeactivateITSSRequest​(java.lang.String requestId,
                                                    java.lang.String destinationId,
                                                    java.lang.String organisation,
                                                    java.lang.String canonicalId,
                                                    Credential originator,
                                                    java.util.List<java.lang.Object> assertions)
                                             throws MessageContentException,
                                                    MessageProcessingException
        Method generate a Deactivate ITSS Request Message.
        Parameters:
        requestId - id of request to send.
        destinationId - the destination Id to use.
        organisation - the related organisation (short name)
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier.
        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.
      • generateDeactivateITSSResponse

        public CSMessageResponseData generateDeactivateITSSResponse​(java.lang.String relatedEndEntity,
                                                                    CSMessage request,
                                                                    java.lang.String ecuType,
                                                                    java.lang.String canonicalId,
                                                                    CanonicalKeyType canonicalKey,
                                                                    java.lang.String eaName,
                                                                    java.lang.String ecProfile,
                                                                    java.lang.String atProfile,
                                                                    java.util.List<AppPermissionsType> atAppPermissions,
                                                                    java.util.Date itssValidFrom,
                                                                    java.util.Date itssValidTo,
                                                                    RegionsType regions,
                                                                    ITSSStatusType itsStatus)
                                                             throws MessageContentException,
                                                                    MessageProcessingException
        Method generate a Deactivate ITSS Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier.
        canonicalKey - the initial ec public key type containing keys to update.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets.
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        itsStatus - the current status of the ITS Station.
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.
      • generateReactivateITSSRequest

        public byte[] generateReactivateITSSRequest​(java.lang.String requestId,
                                                    java.lang.String destinationId,
                                                    java.lang.String organisation,
                                                    java.lang.String canonicalId,
                                                    Credential originator,
                                                    java.util.List<java.lang.Object> assertions)
                                             throws MessageContentException,
                                                    MessageProcessingException
        Method generate a Reactivate ITS Request Message.
        Parameters:
        requestId - id of request to send.
        destinationId - the destination Id to use.
        organisation - the related organisation (short name)
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier.
        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.
      • generateReactivateITSSResponse

        public CSMessageResponseData generateReactivateITSSResponse​(java.lang.String relatedEndEntity,
                                                                    CSMessage request,
                                                                    java.lang.String ecuType,
                                                                    java.lang.String canonicalId,
                                                                    CanonicalKeyType canonicalKey,
                                                                    java.lang.String eaName,
                                                                    java.lang.String ecProfile,
                                                                    java.lang.String atProfile,
                                                                    java.util.List<AppPermissionsType> atAppPermissions,
                                                                    java.util.Date itssValidFrom,
                                                                    java.util.Date itssValidTo,
                                                                    RegionsType regions,
                                                                    ITSSStatusType itsStatus)
                                                             throws MessageContentException,
                                                                    MessageProcessingException
        Method generate a Reactivate ITS Response Message.
        Parameters:
        relatedEndEntity - the name of the related end entity (such as username of the related user)
        request - the related request
        ecuType - Type of ECU used for the ITS station, used to verify against available values in profile and when defining assurance level.
        canonicalId - the canonical name of the ITS to register. Should be a unique identifier.
        canonicalKey - the initial ec public key type containing keys to update.
        eaName - name of EA that the ITSS should be associated with.
        ecProfile - Name of profile to use for the enrollment credential. The profile determines Service Permissions, default region and validity. If not set is default profile for default EA used.
        atProfile - Name of profile to use for the authorization ticket. The profile determines Service Permissions, default region and validity. If not set is default profile for default AA used.
        atAppPermissions - list of app permissions to use in generate Authorization Tickets.
        itssValidFrom - The date time when the related ITS station will have it's initial EC certificate start date. The start date of any EC or AT certificates cannot be before this date.
        itssValidTo - Field to define an end life of an ITS station, no certificate (EC or AT) can have a validity after this date. Use case could be a test fleet where no vehicles should be used after a specific date.
        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.
        itsStatus - the current status of the ITS Station.
        Returns:
        a generated and signed message.
        Throws:
        MessageContentException - if input data contained invalid format.
        MessageProcessingException - if internal problems occurred processing the cs message.