| java.lang.Object com.sun.portal.desktop.dp.xml.XMLDPFactory
XMLDPFactory | public class XMLDPFactory implements DPFactory,DPTypes,XMLDPTags(Code) | | This class gets and creates instances of DP objects.
All XMLDP* objects are backed by a DOM element; they are simply
wrappers for the DOM that impose certain semantics on particular
types of DOM nodes.
The get* methods add a wrapper around an already existing DOM node.
They all require the DOM element to be passed in as an argument. If the
DOM element does not match the type of the DP object being returned,
then an exception is thrown.
The create* methods create a new DOM element and add the wrapper.
|
Method Summary | |
public DPRoot | addMergers(DPContext dpc, DPRoot dpr, Set names, Map dpRoots) Adds merger root objects to the given DP root. | public DPAvailable | createAvailable(DPContext dpc, DPRoot r, Document d) Create a new, empty DP available object. | public DPChannel | createChannel(DPContext dpc, DPRoot r, Document d, String name, String providerName) Create a new DP channel object. | public DPConditionalProperties | createConditionalProperties(DPContext dpc, DPRoot r, Document d, String type, String value) Create a new, empty DP conditional properties object. | public DPConditionalProperties | createConditionalProperties(DPContext dpc, DPRoot r, Document d, String type, String value, Map m) Create a new DP conditional properties object. | public DPContainerChannel | createContainerChannel(DPContext dpc, DPRoot r, Document d, String name, String providerName) Create a new DP container channel object. | public DPLocale | createLocale(DPContext dpc, DPRoot r, Document d, String lang, String country, String variant) Create a new, empty DP locale object. | public DPLocale | createLocale(DPContext dpc, DPRoot r, Document d, String lang, String country, String variant, Map m) Create a new DP locale object. | public DPProperties | createProperties(DPContext dpc, DPRoot r, Document d) Create a new, empty DP properties object. | public DPProperty | createProperty(DPContext dpc, DPRoot r, Document d, String name, Object o) Create a new DP property object. | public DPProperty | createProperty(DPContext dpc, DPRoot r, Document d, Object o) Create a new unnamed DP property object. | public DPProvider | createProvider(DPContext dpc, DPRoot r, Document d, String name, String className, int providerVersion) Create a new DP provider object. | public DPReference | createReference(DPContext dpc, DPRoot r, Document d, String ref) Create a new DP reference object. | public DPRoot | createRoot(DPContext dpc, DPUserContext dpuc, Map dpRoots, boolean merge) Create a new DP root object and optionally add merger root objects. | public DPRoot | createRoot(DPContext dpc) Create a new, empty DP root object. | public DPRoot | createRoot(DPContext dpc, String doc) Create a DP root object based on the given string. | public DPRoot | createRoot(DPContext dpc, InputStream xmlByteStream) Create a DP root object based on the given stream. | public DPRoot | createRoot(DPContext dpc, String baseName, Map dpRoots) | public DPSelected | createSelected(DPContext dpc, DPRoot r, Document d) Create a new, empty DP selected object. | public DPString | createString(DPContext dpc, DPRoot r, Document d, String name, String value) | public DPAvailable | getAvailable(DPContext dpc, DPRoot r, Element e) Get a DP selected wrapper for the given Element. | public DPChannel | getChannel(DPContext dpc, DPRoot r, Element e) Get a new DP channel wrapper for the given Element. | public DPCollection | getCollectionProperty(DPContext dpc, DPRoot r, Element e) Get a DP collection property wrapper for the given Element. | public DPConditionalProperties | getConditionalProperties(DPContext dpc, DPRoot r, Element e) Get a DP conditionalproperties wrapper for the given Element. | public static XMLDPFactory | getInstance() | public DPNode | getNode(DPContext dpc, DPRoot r, Element e) Get a DP node object wrapper for the given Element. | public DPProperties | getProperties(DPContext dpc, DPRoot r, Element e) Get a DP properties wrapper for the given Element. | public DPProperty | getProperty(DPContext dpc, DPRoot r, Element e) Get a DP property wrapper for the given Element. | public DPPropertyHolder | getPropertyHolder(DPContext dpc, DPRoot r, Element e) Get a DP property holder wrapper for the given Element. | public DPProvider | getProvider(DPContext dpc, DPRoot r, Element e) Get a new DP provider wrapper for the given Element. | public DPReference | getReference(DPContext dpc, DPRoot r, Element e) Get a DP reference wrapper for the given Element. | public DPRoot | getRoot(DPContext dpc, Element e) Get a DP root object wrapper for the given Element. | public DPSelected | getSelected(DPContext dpc, DPRoot r, Element e) Get a DP selected wrapper for the given Element. |
CHANNEL_NAME_SEPARATOR | final protected static char CHANNEL_NAME_SEPARATOR(Code) | | |
createLocale | public DPLocale createLocale(DPContext dpc, DPRoot r, Document d, String lang, String country, String variant)(Code) | | Create a new, empty DP locale object.
See Also: XMLDPFactory.createConditionalProperties(DPContext,DPRoot,Document,String,String) |
createLocale | public DPLocale createLocale(DPContext dpc, DPRoot r, Document d, String lang, String country, String variant, Map m)(Code) | | Create a new DP locale object.
See Also: XMLDPFactory.createConditionalProperties(DPContext,DPRoot,Document,String,String,Map) |
createProperty | public DPProperty createProperty(DPContext dpc, DPRoot r, Document d, String name, Object o)(Code) | | Create a new DP property object.
While the interface returned by this method is a DPProperty, the actual
object instance returned depend on the type of the Object argument.
- Object type String returns an instance of DPString
- Object type Integer returns an instance of DPInteger
- Object type Boolean returns an instance of DPBoolean
- Object type List or Map returns an instance of DPCollection
If the type of Object o is not a String, Integer, or Boolean
then a DPString is returned, where the value is the value
return from the object's toString() method.
|
createProperty | public DPProperty createProperty(DPContext dpc, DPRoot r, Document d, Object o)(Code) | | Create a new unnamed DP property object.
While the interface returned by this method is a DPProperty, the actual
object instance returned depend on the type of the Object argument.
- Object type String returns an instance of DPString
- Object type Integer returns an instance of DPInteger
- Object type Boolean returns an instance of DPBoolean
If the type of Object o is not a String, Integer, or Boolean
then a DPString is returned, where the value is the value
return from the object's toString() method.
|
createRoot | public DPRoot createRoot(DPContext dpc, DPUserContext dpuc, Map dpRoots, boolean merge)(Code) | | Create a new DP root object and optionally add merger root objects.
The DP root object is created based on the user document read from
the DPContext object (DPContext.getUserDocument()).
If the merge argument is true, merger obejcts are added.
The merger objects are based on the non-user documents
read from DPContext object (DPContext.getDPDocuments()).
|
createRoot | public DPRoot createRoot(DPContext dpc)(Code) | | Create a new, empty DP root object.
No merge objects are added to the rturned DP root object.
|
createRoot | public DPRoot createRoot(DPContext dpc, String doc)(Code) | | Create a DP root object based on the given string.
This method can be called only if the encoding in the xml header is "UTF-8"
No merge objects are added to the returned DP root object.
Parameters: dpc - The DPContext Parameters: doc - xml String |
createRoot | public DPRoot createRoot(DPContext dpc, InputStream xmlByteStream)(Code) | | Create a DP root object based on the given stream.
No merge objects are added to the returned DP root object.
|
getChannel | public DPChannel getChannel(DPContext dpc, DPRoot r, Element e)(Code) | | Get a new DP channel wrapper for the given Element.
Whiel the interface returned by this method is a DPChannel, the actual
object instance returned is either a DPChannel or a DPContainerChannel.
|
getCollectionProperty | public DPCollection getCollectionProperty(DPContext dpc, DPRoot r, Element e)(Code) | | Get a DP collection property wrapper for the given Element.
This method with accept element types of Colletion, Selected, Available,
Locale, Properties, or ConditionalProperties and will return an instance of
DPCollection.
|
getNode | public DPNode getNode(DPContext dpc, DPRoot r, Element e)(Code) | | Get a DP node object wrapper for the given Element.
While the interface returned by this method is DPNode, the actual
object is an instance of either DPRoot, DPChannel, or DPContainerChannel.
|
getProperty | public DPProperty getProperty(DPContext dpc, DPRoot r, Element e)(Code) | | Get a DP property wrapper for the given Element.
While the interface returned by this method is a DPProperty, the actual
object instance returned is either a DPString, DPInteger, DPBoolean,
DPLocale, DPProperties, DPConditionalProperties, or DPCollection.
|
getPropertyHolder | public DPPropertyHolder getPropertyHolder(DPContext dpc, DPRoot r, Element e)(Code) | | Get a DP property holder wrapper for the given Element.
While the interface returned by this method is a DPPropertyHolder,
the actual object instance is either a DPRoot, DPChannel,
DPContainerChannel, or a DPProvider.
|
|
|