public class TSLObject extends java.lang.Object implements ITSLObject
Class that represents a TSL object with the principal functions (access information) regardless it implementation.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
| Constructor and Description |
|---|
TSLObject()
Constructor method for the class TSLObject.java.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNewTrustServiceProvider(TrustServiceProvider tsp)
Adds a new trust service provider to the list associated to this TSL.
|
void |
buildTSLFromXMLcheckValues(java.io.InputStream isParam)
Method that builds the TSL data from a input XML.
|
void |
buildTSLFromXMLcheckValues(java.io.InputStream is,
boolean checkSignature)
Method that builds the TSL data from a input XML.
|
void |
checkTSLValues()
Checks all the actual values assigned to this TSL as the concrecte specification and version
requires.
|
byte[] |
checkValuesBuildXMLfromTSL()
Method that check that the data of the TSL is correct as the specification and version requires.
|
java.lang.String |
getID()
Gets the ID attribute from the TrustServiceStatus element.
|
SchemeInformation |
getSchemeInformation()
Gets the scheme information of the TSL.
|
org.w3.x2000.x09.xmldsig.SignatureType |
getSignature()
Gets the TSL signature.
|
java.util.List<TrustServiceProvider> |
getTrustServiceProviderList()
Gets the list with all the Trust Services Providers associated to this TSL.
|
java.lang.String |
getTslSpecification()
Gets the value of the attribute
tslSpecification. |
java.lang.String |
getTslSpecificationVersion()
Gets the value of the attribute
tslSpecificationVersion. |
java.net.URI |
getTSLTag()
Gets the URI that represents the tag attribute for the TrustServiceStatus element.
|
boolean |
isThereSomeTrustServiceProvider()
Checks if exists at least one Trust Service Provider associated to this TSL.
|
void |
setID(java.lang.String id)
Sets the ID attribute for the TSL.
|
void |
setSchemeInformation(SchemeInformation si)
Sets the scheme information associated to this TSL.
|
void |
setSignature(org.w3.x2000.x09.xmldsig.SignatureType dsSignature)
Sets the XML Signature for the TSL.
|
void |
setTslSpecification(java.lang.String tslSpecification)
Sets the value of the attribute
tslSpecification. |
void |
setTslSpecificationVersion(java.lang.String tslSpecificationVersion)
Sets the value of the attribute
tslSpecificationVersion. |
void |
setTSLTag(java.net.URI tag)
Sets the URI that represents the tag attribute for the TrustServiceStatus element.
|
public final java.net.URI getTSLTag()
getTSLTag in interface ITSLObjectITSLObject.getTSLTag()public java.lang.String getTslSpecification()
tslSpecification.tslSpecification.public void setTslSpecification(java.lang.String tslSpecification)
tslSpecification.tslSpecification - The value for the attribute tslSpecification.public java.lang.String getTslSpecificationVersion()
tslSpecificationVersion.tslSpecificationVersion.public void setTslSpecificationVersion(java.lang.String tslSpecificationVersion)
tslSpecificationVersion.tslSpecificationVersion - The value for the attribute tslSpecificationVersion.public final void setTSLTag(java.net.URI tag)
throws TSLArgumentException
setTSLTag in interface ITSLObjecttag - URI to set.TSLArgumentException - In case of the input parameter is null or not well formed.ITSLObject.setTSLTag(java.net.URI)public final java.lang.String getID()
getID in interface ITSLObjectnull if not
is defined.ITSLObject.getID()public final void setID(java.lang.String id)
setID in interface ITSLObjectid - String that represents the ID to set. It can be null.ITSLObject.setID(java.lang.String)public final SchemeInformation getSchemeInformation()
getSchemeInformation in interface ITSLObjectITSLObject.getSchemeInformation()public final void setSchemeInformation(SchemeInformation si) throws TSLArgumentException
setSchemeInformation in interface ITSLObjectsi - Scheme information to be associated to this TSL.TSLArgumentException - In case of the input parameter is null or not well formed.ITSLObject.setSchemeInformation(es.gob.afirma.tsl.parsing.impl.common.SchemeInformation)public final java.util.List<TrustServiceProvider> getTrustServiceProviderList()
getTrustServiceProviderList in interface ITSLObjectnull.ITSLObject.getTrustServiceProviderList()public final void addNewTrustServiceProvider(TrustServiceProvider tsp) throws TSLArgumentException
addNewTrustServiceProvider in interface ITSLObjecttsp - Trust Service Provider to add. It can not be null.TSLArgumentException - In case of the input parameter is null or not well formed.ITSLObject.addNewTrustServiceProvider(es.gob.afirma.tsl.parsing.impl.common.TrustServiceProvider)public final boolean isThereSomeTrustServiceProvider()
isThereSomeTrustServiceProvider in interface ITSLObjecttrue if exists at least one, otherwise false.ITSLObject.isThereSomeTrustServiceProvider()public final org.w3.x2000.x09.xmldsig.SignatureType getSignature()
getSignature in interface ITSLObjectITSLObject.getSignature()public final void setSignature(org.w3.x2000.x09.xmldsig.SignatureType dsSignature)
setSignature in interface ITSLObjectdsSignature - XML Signature to set for this TSL.ITSLObject.setSignature(org.w3.x2000.x09.xmldsig.SignatureType)public final void checkTSLValues()
throws TSLMalformedException
checkTSLValues in interface ITSLObjectTSLMalformedException - In case of some data does not exist or has not a correct value.ITSLObject.checkTSLValues()public final void buildTSLFromXMLcheckValues(java.io.InputStream isParam)
throws TSLArgumentException,
TSLParsingException,
TSLMalformedException
buildTSLFromXMLcheckValues in interface ITSLObjectisParam - InputStream Input Stream of the XML (TSL representation).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.ITSLObject.buildTSLFromXMLcheckValues(java.io.InputStream)public final void buildTSLFromXMLcheckValues(java.io.InputStream is,
boolean checkSignature)
throws TSLArgumentException,
TSLParsingException,
TSLMalformedException
buildTSLFromXMLcheckValues in interface ITSLObjectis - InputStream Input Stream of the XML (TSL representation).checkSignature - Flag that indicates if the TSL signature must be checked (true).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.ITSLObject.buildTSLFromXMLcheckValues(java.io.InputStream, boolean)public final byte[] checkValuesBuildXMLfromTSL()
throws TSLMalformedException,
TSLEncodingException
checkValuesBuildXMLfromTSL in interface ITSLObjectTSLMalformedException - In case of some data does not exist or has not a correct value.TSLEncodingException - In case of some error encoding the TSL.ITSLObject.checkValuesBuildXMLfromTSL()