|
SAP NetWeaver 7.30 SP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.portal.httpconnectivity.transformationservice.AbstractTransformerHolder
public abstract class AbstractTransformerHolder
An abstract class for creating a transformer holder. Provides methods to
load transformers defined in the PAR file.
<par path>/xml/Transformers.xml defines the
transformers. The XSL transformers must be located in the folder
<par path>/xml/XSLLibrary/Transformers.
The following shows the required folder structure:
...
-<par name>
- xml
| Transformers.xml
- XSLLibrary
- Transformers
Transformer1.xsl
Transformer2.xsl
...
Transformers are initialized automatically when the service is initialized.
The loading process is:
ITransformerInformation objects from
the Transformers.xml file.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
AbstractTransformerHolder()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sapportals.portal.prt.service.IService |
|---|
afterInit, configure, destroy, getContext, getKey, release |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public AbstractTransformerHolder()
| Method Detail |
|---|
public void init(IServiceContext serviceContext)
init in interface IServiceserviceContext - the service context from the PRTIServiceContext
protected 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 transformation
protected void setTransformers(List transformers)
throws TransformationServiceException
ITransformerInformation instances.
transformers - the list of transformers
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 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 file
protected 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
file
public 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 description
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 abstract void releaseAllTransformers()
public abstract EPSAXDefaultHandler getSAXHandler(ITransformerInformation tInfo)
throws TransformationServiceException
tInfo - transformer information
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 transformation| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-ADMIN
|
[sap.com] tc/ep/admin/api/extd
|
api
|
EP-PIN
|
|
SAP NetWeaver 7.30 SP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||