oracle.cabo.ui.composite
Class TemplateLibrary
java.lang.Object
|
+--oracle.cabo.ui.composite.TemplateLibrary
- public class TemplateLibrary
- extends java.lang.Object
The TemplateLibrary class allows the loading of a "template library" UIX file. These XML files will (usually) have <templateLibrary>
as a root element. Once loaded, the library can be used, for instance, to form a TemplateUIExtension.
A major limitation (at this time) is that a template library can only consist of templates in a single namespace.
- See Also:
TemplateUIExtension
Method Summary |
java.lang.String[] |
getNamespaceURIs()
Gets the single namespace of the templates. |
RendererFactoryImpl |
getRenderers(RendererFactoryImpl factory, java.lang.String namespaceURI)
Registers the renderers of this template library from one namespace onto a renderer factory. |
Template[] |
getTemplates()
Returns all the templates. |
java.util.Dictionary |
getUINodeTypes(java.util.Dictionary in, java.lang.String namespaceURI)
Creates a Dictionary of UINodeType objects, suitable for use in parsing UIX. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateLibrary
public TemplateLibrary(NameResolver resolver,
java.lang.String name,
ParserManager manager,
XMLProvider provider,
ErrorLog log,
java.lang.String expressionLanguage)
- Create a TemplateLibrary.
-
- Parameters:
resolver
- NameResolver implementation for finding the template library
name
- name of the template library file
manager
- ParserManager to be used for loading the template library
provider
- an XMLProvider implementation; if null, defaults to the Oracle XML parser
log
- an ErrorLog
expressionLanguage
- the expressionLanguage to use when parsing the templates in this library
TemplateLibrary
public TemplateLibrary(NameResolver resolver,
java.lang.String name,
ParserManager manager,
XMLProvider provider,
ErrorLog log)
- use the
ExpressionParser.DATA_EXPRESSION_PARSER_NAME
as the expressionLanguage
getNamespaceURIs
public java.lang.String[] getNamespaceURIs()
- Gets the single namespace of the templates.
getRenderers
public RendererFactoryImpl getRenderers(RendererFactoryImpl factory,
java.lang.String namespaceURI)
- Registers the renderers of this template library from one namespace onto a renderer factory.
-
- Parameters:
factory
- a pre-created RendererFactoryImpl instance; if null, an empty factory will be created
namespaceURI
- the namespace of the desired templates
- Returns:
- the factory, with registered renderers
getUINodeTypes
public java.util.Dictionary getUINodeTypes(java.util.Dictionary in,
java.lang.String namespaceURI)
- Creates a Dictionary of UINodeType objects, suitable for use in parsing UIX.
-
- Parameters:
in
- a dictionary; if null, one will be created
namespaceURI
- the namespace of the desired templates
- Returns:
- the dictionary, with registered types
- See Also:
UINodeParserFactory
getTemplates
public Template[] getTemplates()
- Returns all the templates.