Class CommonXmlTransformer
- java.lang.Object
-
- es.gob.afirma.transformers.xmlTransformers.CommonXmlTransformer
-
- All Implemented Interfaces:
IXmlTransformer
public class CommonXmlTransformer extends java.lang.Object implements IXmlTransformer
Class that transforms input parameters to a XML request for the native web services of @Firma.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.1, 18/04/2022.
-
-
Constructor Summary
Constructors Constructor Description CommonXmlTransformer()Constructor method for the class CommonXmlTransformer.java.CommonXmlTransformer(java.lang.String svc, java.lang.String methodParam, java.lang.String typ, java.lang.String msgVersion)Constructor method for the class CommonXmlTransformer.java.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMessageVersion()Method that obtains the version of the parameter used to configure the generator.java.lang.StringgetMethod()Method that obtains the name of the method to invoke.java.lang.StringgetService()Method that obtains the name of the service used to configure the generator.java.lang.StringgetType()Method that obtains the type of the parameter to generate (input or output).voidsetMessageVersion(java.lang.String msgVersion)Sets the value of the attributemessageVersion.voidsetService(java.lang.String svc)Sets the value of the attributeservice.voidsetType(java.lang.String typ)Sets the value of the attributetype.java.lang.Objecttransform(java.lang.Object params)Method that transforms a structure to an input or output parameter of a web service.
-
-
-
Constructor Detail
-
CommonXmlTransformer
public CommonXmlTransformer()
Constructor method for the class CommonXmlTransformer.java.
-
CommonXmlTransformer
public CommonXmlTransformer(java.lang.String svc, java.lang.String methodParam, java.lang.String typ, java.lang.String msgVersion)Constructor method for the class CommonXmlTransformer.java.- Parameters:
svc- Parameter that represents the native service name.methodParam- Parameter that represents the method of web service.typ- Parameter that represents the type.msgVersion- Parameter that represents the message version.
-
-
Method Detail
-
getService
public final java.lang.String getService()
Method that obtains the name of the service used to configure the generator.- Specified by:
getServicein interfaceIXmlTransformer- Returns:
- the name of the service used to configure the generator.
- See Also:
IXmlTransformer.getService()
-
getType
public final java.lang.String getType()
Method that obtains the type of the parameter to generate (input or output). The allowed values are:- request: For input parameter.
- response: For output parameter.
- Specified by:
getTypein interfaceIXmlTransformer- Returns:
- the type of the parameter to generate (request or response).
- See Also:
IXmlTransformer.getType()
-
getMessageVersion
public final java.lang.String getMessageVersion()
Method that obtains the version of the parameter used to configure the generator.- Specified by:
getMessageVersionin interfaceIXmlTransformer- Returns:
- the version of the parameter used to configure the generator.
- See Also:
IXmlTransformer.getMessageVersion()
-
transform
public final java.lang.Object transform(java.lang.Object params) throws TransformersExceptionMethod that transforms a structure to an input or output parameter of a web service.- Specified by:
transformin interfaceIXmlTransformer- Parameters:
params- Values of the input or output parameters on XML format.- Returns:
- a String that represents the input or output parameter on XML format.
- Throws:
TransformersException- If the method fails.- See Also:
IXmlTransformer.transform(java.lang.Object)
-
setMessageVersion
public final void setMessageVersion(java.lang.String msgVersion)
Sets the value of the attributemessageVersion.- Parameters:
msgVersion- The value for the attributemessageVersion.
-
setService
public final void setService(java.lang.String svc)
Sets the value of the attributeservice.- Parameters:
svc- The value for the attributeservice.
-
setType
public final void setType(java.lang.String typ)
Sets the value of the attributetype.- Parameters:
typ- The value for the attributetype.
-
getMethod
public final java.lang.String getMethod()
Method that obtains the name of the method to invoke.- Specified by:
getMethodin interfaceIXmlTransformer- Returns:
- the name of the method to invoke.
- See Also:
IXmlTransformer.getMethod()
-
-