public abstract class AbstractTransformerHolder extends Object implements IService
<par path>/xml/Transformers.xml defines the
transformers. The XSL transformers must be located in the folder
<par path>/xml/XSLLibrary/Transformers.
...
-<par name>
- xml
| Transformers.xml
- XSLLibrary
- Transformers
Transformer1.xsl
Transformer2.xsl
...
ITransformerInformation objects from
the Transformers.xml file.| Modifier and Type | Field and Description |
|---|---|
protected IServiceContext |
m_serviceContext
A constant that defines the service context.
|
static com.sap.tc.logging.Category |
TRNS_HLDR_CATEGORY
A constant that defines the log category.
|
static com.sap.tc.logging.Location |
TRNS_HLDR_LOCATION
A constant that defines the log location.
|
protected static String |
TRNS_HLDR_LOG_SUBLOC
A constant that defines the sublocation.
|
| Constructor and Description |
|---|
AbstractTransformerHolder() |
| Modifier and Type | Method and Description |
|---|---|
abstract ITransformerInformation |
createTransformerInformation(String componentName,
String transformerName,
Float transformerVersion,
TransformerType transformerType,
String fromUri,
String toUri,
String description)
Creates a new instance of
ITransformerInformation. |
protected String |
getSAXClassName(String tClassName)
Gets the full class name of a SAX handler.
|
abstract EPSAXDefaultHandler |
getSAXHandler(ITransformerInformation tInfo)
Gets the SAX handlers.
|
protected String |
getTransformersResourcePath()
Gets the path for the
Transformer.xml file. |
protected String |
getXSLTransformerPath(String tXSLPath)
Gets the location of the XSL files as defined in
Transformers.xml. |
void |
init(IServiceContext serviceContext)
Loads the service transformers.
|
protected List |
loadTransformers()
Creates a list of transformers from
Transformers.xml. |
protected abstract void |
releaseAllTransformers()
Releases all the transformers from the holder.
|
protected void |
setTransformers(List transformers)
Registers the list of transformers with the transformation service.
|
protected static final String TRNS_HLDR_LOG_SUBLOC
protected IServiceContext m_serviceContext
public static com.sap.tc.logging.Location TRNS_HLDR_LOCATION
public static com.sap.tc.logging.Category TRNS_HLDR_CATEGORY
public void init(IServiceContext serviceContext)
init in interface IServiceserviceContext - the service context from the PRTIServiceContextprotected List loadTransformers() throws TransformationServiceException
Transformers.xml.
The Transformers.xml file must be in
/root/portalapps/<par name>/xml/Transformers.xml.
Transformers.xml file,
overwrite the #getTransformersResourcePath() method.TransformationServiceException - if the source data is corrupt,
if it cannot write to the result,
if one of the transformers doesn't
exist or if an error occurs
during the transformationprotected void setTransformers(List transformers) throws TransformationServiceException
ITransformerInformation instances.transformers - the list of transformersTransformationServiceException - if the source data is corrupt,
if it cannot write to the result,
if one of the transformers doesn't
exist or if an error occurs
during the transformationprotected String getTransformersResourcePath()
Transformer.xml file. Assumes the
Transformer.xml file is in
/root/portalapps/<par name>/xml/Transformers.xml.
Transformer.xml file.protected String getSAXClassName(String tClassName)
EPSAXDefaultHandler.tClassName - the name of the class in the
Transformers.xml fileprotected String getXSLTransformerPath(String tXSLPath)
Transformers.xml. Assumes that the XSL files are in the
folder:
<par path>/xml/XSLLibrary/Transformers.
tXSLPath - the path as defined in the Transformers.xml
filepublic abstract ITransformerInformation createTransformerInformation(String componentName, String transformerName, Float transformerVersion, TransformerType transformerType, String fromUri, String toUri, String description) throws TransformationServiceException
ITransformerInformation.
This method is used mainly when registering new transformers.componentName - the component nametransformerName - the transformer nametransformerVersion - the transformer versiontransformerType - the transformer typefromUri - the source schemetoUri - the result schemedescription - the transformer descriptionTransformationServiceException - if the source data is corrupt,
if it cannot write to the result,
if one of the transformers doesn't
exist or if an error occurs
during the transformationprotected abstract void releaseAllTransformers()
public abstract EPSAXDefaultHandler getSAXHandler(ITransformerInformation tInfo) throws TransformationServiceException
tInfo - transformer informationTransformationServiceException - if the source data is corrupt,
if it cannot write to the result,
if one of the transformers doesn't
exist or if an error occurs
during the transformation| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-ADMIN
|
[sap.com] tc/ep/admin/api/extd
|
api
|
EP-PIN
|
Copyright 2021 SAP SE Complete Copyright Notice