Class Extension
- java.lang.Object
-
- es.gob.afirma.tsl.parsing.impl.common.extensions.Extension
-
- All Implemented Interfaces:
IAnyTypeExtension,java.io.Serializable
- Direct Known Subclasses:
AdditionalServiceInformation,ExpiredCertsRevocationInfo,Qualifications,TakenOverBy,UnknownExtension
public abstract class Extension extends java.lang.Object implements IAnyTypeExtension
Abstract class that represents a TSL Extension with could contains differents elements regardless it implementation.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.0, 11/11/2020.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface es.gob.afirma.tsl.parsing.ifaces.IAnyTypeExtension
IMPL_ADDITIONAL_SERVICE_INFORMATION, IMPL_EXPIRED_CERTS_REVOCATION_INFO, IMPL_QUALIFICATIONS, IMPL_TAKENOVERBY, IMPL_UNKNOWN_EXTENSION, TYPE_SCHEME, TYPE_SERVICE_INFORMATION, TYPE_TSP_INFORMATION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckExtensionValue(ITSLObject tsl, ServiceHistoryInstance shi)Checks if the extension has an appropiate value in the TSL.java.lang.StringextensionTypeToString(int extensionType)Gets a string name representation of the specified extension type.intgetExtensionType()Gets the value of the attributetype.intgetImplementationExtension()Gets the implementation for the extension.booleanisCritical()Checks if the extension is critical or not.
-
-
-
Method Detail
-
isCritical
public final boolean isCritical()
Checks if the extension is critical or not.- Specified by:
isCriticalin interfaceIAnyTypeExtension- Returns:
trueif the extension is critical, otherwisefalse.- See Also:
IAnyTypeExtension.isCritical()
-
getExtensionType
public final int getExtensionType()
Gets the value of the attributetype.- Returns:
- the value of the attribute
type.
-
getImplementationExtension
public final int getImplementationExtension()
Gets the implementation for the extension.- Specified by:
getImplementationExtensionin interfaceIAnyTypeExtension- Returns:
- Implementation for the extension.
- See Also:
IAnyTypeExtension.getImplementationExtension()
-
extensionTypeToString
public final java.lang.String extensionTypeToString(int extensionType)
Gets a string name representation of the specified extension type.- Parameters:
extensionType- Extension type. Refer to its location inside the XML. It could be one of the following:- Scheme Extension:
IAnyTypeExtension.TYPE_SCHEME - Scheme Extension:
IAnyTypeExtension.TYPE_TSP_INFORMATION - Scheme Extension:
IAnyTypeExtension.TYPE_SERVICE_INFORMATION
- Scheme Extension:
- Returns:
- string name representation of the specified extension type.
-
checkExtensionValue
public final void checkExtensionValue(ITSLObject tsl, ServiceHistoryInstance shi) throws TSLMalformedException
Checks if the extension has an appropiate value in the TSL.- Specified by:
checkExtensionValuein interfaceIAnyTypeExtension- Parameters:
tsl- TSL Object representation that contains the service and the extension.shi- Service Information (or service history information) in which is declared the extension.- Throws:
TSLMalformedException- In case of the extension has not a correct value.- See Also:
IAnyTypeExtension.checkExtensionValue(es.gob.afirma.tsl.parsing.ifaces.ITSLObject, es.gob.afirma.tsl.parsing.impl.common.ServiceHistoryInstance)
-
-