public class TransformersProvider extends AbstractTransformerHolder
TransformersProvider as its class
name property in portalapp.xml (see the example below).
AbstractTransformerHolder.getSAXHandler(com.sap.portal.httpconnectivity.transformationservice.ITransformerInformation).
getResourceBundle(java.util.Locale).
portalapp.xml.
com.sap.portal.SimpleTransformerProvider:
portalapp.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<application>
<registry>
<entry path="runtime/transformers/com.sap.portal.SimpleTransformerProvider"
name="TransformersProvider"
type="service"/>
</registry>
<application-config>
<property name="ServicesReference" value="com.sap.portal.htmlb,com.sap.portal.transformationservice"/>
<property name="releasable" value="false"/>
<property name="startup" value="true"/>
</application-config>
<components/>
<services>
<service name="TransformersProvider">
<service-config>
<property name="className" value="com.sap.portal.httpconnectivity.transformationservice.TransformersProvider"/>
<property name="classNameFactory" value=""/>
<property name="classNameManager" value=""/>
<property name="SecurityZone" value="com.sap.portal/no_safety" />
</service-config>
</service>
</services>
</application>
Transformers.xml
<?xml version="1.0" encoding="utf-8"?>
<transformation-resources>
<transformers type="XSL"><!-- Holder of XSL transformers -->
<transformer> <!-- Represent single transformer -->
<property name="Name" value="SIMPLE_TRANSFORMER"/> <!-- Name of the transformer-->
<property name="Description" value="Transform from my scheme to XHTMLB"/>
<property name="FromURI" value="MY_SCHEME"/> <!-- Source scheme URI -->
<property name="ToURI" value="XHTMLB"/> <!-- result scheme URI -->
<property name="SourceName" value="MY_SCHEME_TO_XHTMLB.xsl"/><!-- XSL file name -->
<!-- Transformer version, allows you to add new versions of transformers without the need to
change the code that use these transformers -->
<property name="Version" value="1.0"/>
</transformer>
<!-- You can add more transformers here -->
</transformers>
</transformation-resources>
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY
The service key.
|
static String |
PROVIDER_RESOURCE_BUNDLE_NAME
A constant that defines the default name for the resource bundle.
|
m_serviceContext, TRNS_HLDR_CATEGORY, TRNS_HLDR_LOCATION, TRNS_HLDR_LOG_SUBLOC| Constructor and Description |
|---|
TransformersProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterInit()
If the service is defined as a startup service, this method is called during server startup after all other
services have been initialized (that is, after the init methods of all other services have been called).
|
void |
configure(IServiceConfiguration configuration)
Configures the service.
|
ITransformerInformation |
createTransformerInformation(String componentName,
String transformerName,
Float transformerVersion,
TransformerType transformerType,
String fromUri,
String toUri,
String description)
Creates a new instance of
ITransformerInformation. |
void |
destroy()
Destroys the service.
|
IServiceContext |
getContext()
Gets the context of the provider service set by the Portal Runtime (PRT).
|
String |
getKey()
Gets a unique key.
|
ResourceBundle |
getResourceBundle(Locale locale)
Gets the resource bundle for the provider according to the specified
locale.
|
EPSAXDefaultHandler |
getSAXHandler(ITransformerInformation tInfo)
Gets the SAX handlers.
|
void |
release()
Releases the service.
|
protected void |
releaseAllTransformers()
Releases all the transformers from the holder.
|
getSAXClassName, getTransformersResourcePath, getXSLTransformerPath, init, loadTransformers, setTransformerspublic static String PROVIDER_RESOURCE_BUNDLE_NAME
public static final String KEY
public final void configure(IServiceConfiguration configuration)
configuration - a configuration key and valueIServicepublic final void destroy()
IServicepublic final void release()
IServicepublic final IServiceContext getContext()
IServicepublic final String getKey()
IServicepublic final void afterInit()
IServicepublic ITransformerInformation createTransformerInformation(String componentName, String transformerName, Float transformerVersion, TransformerType transformerType, String fromUri, String toUri, String description) throws TransformationServiceException
AbstractTransformerHolderITransformerInformation.
This method is used mainly when registering new transformers.createTransformerInformation in class AbstractTransformerHoldercomponentName - 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 void releaseAllTransformers()
AbstractTransformerHolderreleaseAllTransformers in class AbstractTransformerHolderpublic EPSAXDefaultHandler getSAXHandler(ITransformerInformation tInfo) throws TransformationServiceException
AbstractTransformerHoldergetSAXHandler in class AbstractTransformerHoldertInfo - 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 transformationpublic ResourceBundle getResourceBundle(Locale locale)
locale - the locale of the current call to the provider| 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