public class CustConfig
extends java.lang.Object
This class maintains an ordered list of customization class lists. These are keyed by 3 parameters:
At runtime, the customization subsystem will search through the list in order of registration until a matching entry is found. Note that a null key in the mapping is considered to match anything as is a null key in the lookup.
A typical declarative configuration will be as shown below
<cust-config> <match path="/"> <!-- Configure customization layers in the order they should be applied. Last one is treated as the tip layer. Any changes to metadata matching the condition will be saved as customizations at the tip layer --> <customization-class name="myproduct.SiteCC"/> <customization-class name="myproduct.UserCC"/> </match> </cust-config>
CustomizationClass
,
CustClassList
,
MDSConfig
Modifier and Type | Field and Description |
---|---|
static CustConfig |
NO_CUSTOMIZATIONS |
Constructor and Description |
---|
CustConfig(CustClassListMapping[] mappings)
Create a customization configuration object with programmatically created
configuration information.
|
CustConfig(org.w3c.dom.Element configXML)
Create a customization configuration object based on the MDS XML
customization configuration information contained in the
given DOM XML Element.
|
Modifier and Type | Method and Description |
---|---|
CustClassList |
findMapping(java.lang.String path,
java.lang.String namespace,
java.lang.String localName)
Find a mapping entry which matches the gven criteria.
|
CustClassListMapping[] |
getMappings()
Returns all the customization class list mappings for this configuration.
|
public static final CustConfig NO_CUSTOMIZATIONS
public CustConfig(CustClassListMapping[] mappings) throws oracle.mds.config.MDSConfigurationException
mappings
- A list of mappings which will be applied in order to
determine which customization class list is used to
work out the customization layers to apply.oracle.mds.config.MDSConfigurationException
- if an invalid mapping is found or the list has
duplicate keyspublic CustConfig(org.w3c.dom.Element configXML) throws oracle.mds.config.MDSConfigurationException
configXML
- - an element containing customization configuration
information. Must have a value.oracle.mds.config.MDSConfigurationException
- If an invalid Customization configuration
is specified.public CustClassList findMapping(java.lang.String path, java.lang.String namespace, java.lang.String localName)
A null parameter is assumed to match anything. A non-null namespace or local name will have to match exactly, or will match an entry with a null value. Path keys will match null values or a mapping which matches exactly or matches any parent package.
path
- - an MDS package name or metadata object namenamespace
- - the XML namespace (optional)localName
- - the local name of the top level element (optional)public CustClassListMapping[] getMappings()