|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sap.portal.httpconnectivity.transformationservice.AbstractTransformerHolder
Abstractization of transformers holder that implemented as a service. Class provide methods to load transformers defined in the par. It assumes
that there is a file ../<par path>/xml/Transformers.xml that defines the transformers. It also assumes that the XSL transformers are
located in folder ../<par path>/xml/XSLLibrary/Transformers.
Folder view:
...
-<par name>
- xml
| Transformers.xml
- XSLLibrary
- Transformers
Transformer1.xsl
Transformer2.xsl
...
Transformers are initialized automaticlly when service is initilezed.
Loading process is:
| Field Summary | |
protected com.sapportals.portal.prt.service.IServiceContext |
m_serviceContext
The service context |
static com.sap.tc.logging.Category |
TRNS_HLDR_CATEGORY
|
static com.sap.tc.logging.Location |
TRNS_HLDR_LOCATION
|
protected static java.lang.String |
TRNS_HLDR_LOG_SUBLOC
|
| Constructor Summary | |
AbstractTransformerHolder()
|
|
| Method Summary | |
abstract ITransformerInformation |
createTransformerInformation(java.lang.String componentName,
java.lang.String transformerName,
java.lang.Float transformerVersion,
TransformerType transformerType,
java.lang.String fromUri,
java.lang.String toUri,
java.lang.String description)
Create new instance of ITransformerInformation. |
protected java.lang.String |
getSAXClassName(java.lang.String tClassName)
Get the full class name of a SAX handler. |
abstract EPSAXDefaultHandler |
getSAXHandler(ITransformerInformation tInfo)
Method that is used to get the SAX handlers. |
protected java.lang.String |
getTransformersResourcePath()
Gets the Transformer.xml file path. |
protected java.lang.String |
getXSLTransformerPath(java.lang.String tXSLPath)
Get the file location of XSL files according to the string defined in Transformers.xml. |
void |
init(com.sapportals.portal.prt.service.IServiceContext serviceContext)
Initialize the service. |
protected java.util.List |
loadTransformers()
Create a list of transformers information (ITransformerInsformation instances) from the Transformers.xml supplied by the holder implementation. |
protected abstract void |
releaseAllTransformers()
Release all the transformers of the holder |
protected void |
setTransformers(java.util.List transformers)
Sets list of transformers to 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 java.lang.String TRNS_HLDR_LOG_SUBLOC
protected com.sapportals.portal.prt.service.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(com.sapportals.portal.prt.service.IServiceContext serviceContext)
init in interface com.sapportals.portal.prt.service.IServiceserviceContext - the service context from the PRT
protected java.util.List loadTransformers()
throws TransformationServiceException
TransformationServiceException - when unable to read any transformer
protected void setTransformers(java.util.List transformers)
throws TransformationServiceException
transformers - list of transformers to set. List must hold ITransformerInformation instaces.TransformationServiceException - when cannot set a transformerprotected java.lang.String getTransformersResourcePath()
protected java.lang.String getSAXClassName(java.lang.String tClassName)
tClassName - the name of the class as it was written in the transformers.xml.protected java.lang.String getXSLTransformerPath(java.lang.String tXSLPath)
tXSLPath - the path as it was entered in the transformers.xml file
public abstract ITransformerInformation createTransformerInformation(java.lang.String componentName,
java.lang.String transformerName,
java.lang.Float transformerVersion,
TransformerType transformerType,
java.lang.String fromUri,
java.lang.String toUri,
java.lang.String description)
throws TransformationServiceException
componentName - the component nametransformerName - the transformer nametransformerVersion - the version of the transformertransformerType - type of transformerfromUri - source schemetoUri - result schemedescription - transformer descriptionTransformationServiceException - when input data is missingby the defining it's propertiesprotected abstract void releaseAllTransformers()
public abstract EPSAXDefaultHandler getSAXHandler(ITransformerInformation tInfo)
throws TransformationServiceException
tInfo - the transformer informationTransformationServiceException - when cannot instancite SAX handler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||