Parameters and Constants
One of the main features of the content provider framework is that it helps manage all the parameters that you might want to set for your service, entities and transformers.
This section summarizes the parameters and constants used in the content provider framework:
|
Parameter |
Where to Define |
Where to Access |
|---|---|---|
|
Entity Parameters Parameters appended to the URL for accessing the XML source for this entity. |
In portalapp.xml , in a <property> element named com.sap.portal.cp.PARAMETERS_LIST in the entity’s <component> element. |
From the entity’s source properties handler ( ISourcePropertiesHandler object). |
|
Entity Drag&Drop Parameter |
In portalapp.xml , in a <property> element named com.sap.portal.cp. DROP_PARAMETER_NAME in the entity’s <component> element The Drag&Drop parameter must be one of the entity parameters. |
Accessed directly by the content provider portal component. |
|
Entity Header Parameters For SOAP only. HTTP requests cannot include headers. |
In portalapp.xml , in a <property> element named com.sap.portal.cp.HEADERS_LIST in the entity’s <component> element |
Accessed directly by the content provider portal component. |
|
Other Entity Parameters |
In portalapp.xml , in <property> element in entity’s <component> element. |
From the entity’s data handler ( IDataHandler object). |
|
Content Provider Service Parameters |
In portalapp.xml , in <property> element in service’s < s ervice> element. |
|
|
Transformer Parameters(all transformers) Parameters for all transformers associated with an entity. |
Override the entity’s getGeneralParameters() method, which returns a Map object of parameter names and values. Add the required parameters to this map. |
From within the XSL transformer for this entity. For example, you can define the parameter: <xsl:param name="BaseUrl"/> and then refer to it: <xsl:value-of select="$BaseUrl"/> |
|
Transformer Parameters (specific transformer) Parameters for a specific transformer associated with an entity. |
Override the entity’s getEntityTransformerParams() method, which returns a Map object of parameter names and values. Return different key-value pairs for different transformers associated with this entity by examining the ITranformaterInformation object passed into the method. |
Same as above. |
|
Transformer Resource Bundle Constants used byall transformers for the content provider. |
In the resource bundle located in the /dist/PORTAL-INF/private/classes folder of the PAR. The name of the resource bundle is defined in the <property> element named ResourceBundleName in the transformation service’s <service‑config> element. |
From within the XSL transformer for this entity. For example: <xsl:value-of select= "resBundle:getString( $ResourceBundle, 'STORY_TITLE')" /> |