Interface ITSLObject

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    TSLObject

    public interface ITSLObject
    extends java.io.Serializable

    Interface that represents a TSL object regardless it implementation.

    Project:

    Library for the integration with the services of @Firma, eVisor and TS@.

    Version:
    1.0, 10/11/2020.
    • Method Detail

      • getTSLTag

        java.net.URI getTSLTag()
        Gets the URI that represents the tag attribute for the TrustServiceStatus element.
        Returns:
        URI that represents the tag attribute for the TrustServiceStatus element.
      • setTSLTag

        void setTSLTag​(java.net.URI tslTag)
                throws TSLArgumentException
        Sets the URI that represents the tag attribute for the TrustServiceStatus element.
        Parameters:
        tslTag - URI to set.
        Throws:
        TSLArgumentException - In case of the input parameter is null or not well formed.
      • getID

        java.lang.String getID()
        Gets the ID attribute from the TrustServiceStatus element.
        Returns:
        String with the ID of the TrustServiceStatus element. null if not is defined.
      • setID

        void setID​(java.lang.String tslID)
        Sets the ID attribute for the TSL.
        Parameters:
        tslID - String that represents the ID to set. It can be null.
      • getSchemeInformation

        SchemeInformation getSchemeInformation()
        Gets the scheme information of the TSL.
        Returns:
        representation object not dependent of the TSL implementation and version that represents the scheme information of this TSL.
      • setSchemeInformation

        void setSchemeInformation​(SchemeInformation si)
                           throws TSLArgumentException
        Sets the scheme information associated to this TSL.
        Parameters:
        si - Scheme information to be associated to this TSL.
        Throws:
        TSLArgumentException - In case of the input parameter is null or not well formed.
      • getTrustServiceProviderList

        java.util.List<TrustServiceProvider> getTrustServiceProviderList()
        Gets the list with all the Trust Services Providers associated to this TSL.
        Returns:
        list with all the Trust Services Providers associated to this TSL, if there is not, then null.
      • addNewTrustServiceProvider

        void addNewTrustServiceProvider​(TrustServiceProvider tsp)
                                 throws TSLArgumentException
        Adds a new trust service provider to the list associated to this TSL.
        Parameters:
        tsp - Trust Service Provider to add. It can not be null.
        Throws:
        TSLArgumentException - In case of the input parameter is null or not well formed.
      • isThereSomeTrustServiceProvider

        boolean isThereSomeTrustServiceProvider()
        Checks if exists at least one Trust Service Provider associated to this TSL.
        Returns:
        true if exists at least one, otherwise false.
      • getSignature

        org.w3.x2000.x09.xmldsig.SignatureType getSignature()
        Gets the TSL signature.
        Returns:
        TSL signature.
      • setSignature

        void setSignature​(org.w3.x2000.x09.xmldsig.SignatureType signature)
        Sets the XML Signature for the TSL.
        Parameters:
        signature - XML Signature to set for this TSL.
      • checkTSLValues

        void checkTSLValues()
                     throws TSLMalformedException
        Checks all the actual values assigned to this TSL as the concrecte specification and version requires.
        Throws:
        TSLMalformedException - In case of some data does not exist or has not a correct value.
      • buildTSLFromXMLcheckValues

        void buildTSLFromXMLcheckValues​(java.io.InputStream is)
                                 throws TSLArgumentException,
                                        TSLParsingException,
                                        TSLMalformedException
        Method that builds the TSL data from a input XML. This process overwrites the actual information of the object, but if there is some error parsing the XML, no data will be changed. When the data is parsed, then is checked if it has the correct values as the specification and version requires.
        Parameters:
        is - InputStream Input Stream of the XML (TSL representation).
        Throws:
        TSLArgumentException - In case of the input parameter is null.
        TSLParsingException - In case of some error parsing the XML input stream.
        TSLMalformedException - In case of some data does not exist or has not a correct value.
      • buildTSLFromXMLcheckValues

        void buildTSLFromXMLcheckValues​(java.io.InputStream is,
                                        boolean checkSignature)
                                 throws TSLArgumentException,
                                        TSLParsingException,
                                        TSLMalformedException
        Method that builds the TSL data from a input XML. This process overwrites the actual information of the object, but if there is some error parsing the XML, no data will be changed. When the data is parsed, then is checked if it has the correct values as the specification and version requires.
        Parameters:
        is - InputStream Input Stream of the XML (TSL representation).
        checkSignature - Flag that indicates if the TSL signature must be checked (true).
        Throws:
        TSLArgumentException - In case of the input parameter is null.
        TSLParsingException - In case of some error parsing the XML input stream.
        TSLMalformedException - In case of some data does not exist or has not a correct value.
      • checkValuesBuildXMLfromTSL

        byte[] checkValuesBuildXMLfromTSL()
                                   throws TSLMalformedException,
                                          TSLEncodingException
        Method that check that the data of the TSL is correct as the specification and version requires. After this, builds the XML representation (concrete specification and version) of the TSL.
        Returns:
        byte array that represents the XML of the TSL.
        Throws:
        TSLMalformedException - In case of some data does not exist or has not a correct value.
        TSLEncodingException - In case of some error encoding the TSL.