Property aliasing allows you to create virtual components with properties that assemble values from a variety of sources. Use virtual components to gather data from a variety of sources and return it in a single Legacy REST Web Services request.
To create a virtual component with property aliasing:
Add a
component
element to the/atg/rest/filtering/filteringConfiguration.xml
configuration file for your Oracle ATG Web Commerce platform server. Specify the Nucleus path for the virtual component in thename
attribute of that element.Include one or more
property
elements in thecomponent
element. Either draw the value of the component from another component property using thecomponent
andtarget
attributes or from a custom class using theproperty-customizer
attribute.
The following example configuration creates a virtual component. It specifies the name of a component that does not exist in the name attribute of the component tag, thus creating a virtual component. When creating virtual components in this way, do not use the item-descripto
r element.
When a REST client requests this component, the list of properties that are specified inside the component
element will be rendered.
<rest-filtering> <component name="/some/nonexisting/Component"> <property name="property1" component="/some/other/Component" target="aProperty"/> <property name="property2" property-customizer="some.class.Here"/> </component> <rest-filtering>