org.zkoss.zk.ui.metainfo
Class PageDefinitions

java.lang.Object
  extended by org.zkoss.zk.ui.metainfo.PageDefinitions

public class PageDefinitions
extends java.lang.Object

Utilities to retrieve page definitions.

Author:
tomyeh

Constructor Summary
PageDefinitions()
           
 
Method Summary
static Locator getLocator(WebApp wapp, java.lang.String path)
          Returns the locator for the specified context.
static PageDefinition getPageDefinition(WebApp wapp, Locator locator, java.lang.String path)
          Returns the page definition of the specified path, or null if not found or failed to parse.
static PageDefinition getPageDefinitionDirectly(WebApp wapp, Locator locator, Document doc, java.lang.String extension)
          Returns the page definition of the specified raw content in DOM; never null.
static PageDefinition getPageDefinitionDirectly(WebApp wapp, Locator locator, java.io.Reader reader, java.lang.String extension)
          Returns the page definition of the raw content from the specified reader; never null.
static PageDefinition getPageDefinitionDirectly(WebApp wapp, Locator locator, java.lang.String content, java.lang.String extension)
          Returns the page definition of the specified raw content; never null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageDefinitions

public PageDefinitions()
Method Detail

getPageDefinitionDirectly

public static final PageDefinition getPageDefinitionDirectly(WebApp wapp,
                                                             Locator locator,
                                                             java.lang.String content,
                                                             java.lang.String extension)
Returns the page definition of the specified raw content; never null.

This is the lowest method that other getPageDefinitionDirectly depends.

Dependency: Execution.createComponentsDirectly -& Execution.getPageDefinitionDirectly -& UiFactory.getPageDefiitionDirectly -& PageDefintions.getPageDefinitionDirectly

Parameters:
locator - the locator used to locate taglib and other resources. If null, wapp is assumed (WebApp is also assumed).
extension - the default extension if the content doesn't specify an language. In other words, if the content doesn't specify an language, LanguageDefinition.getByExtension(java.lang.String) is called. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
Throws:
UiException - if failed to parse

getPageDefinitionDirectly

public static final PageDefinition getPageDefinitionDirectly(WebApp wapp,
                                                             Locator locator,
                                                             java.io.Reader reader,
                                                             java.lang.String extension)
                                                      throws java.io.IOException
Returns the page definition of the raw content from the specified reader; never null.

Parameters:
locator - the locator used to locate taglib and other resources. If null, wapp is assumed (WebApp is also assumed).
extension - the default extension if the content doesn't specify an language. In other words, if the content doesn't specify an language, LanguageDefinition.getByExtension(java.lang.String) is called. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
Throws:
UiException - if failed to parse
java.io.IOException

getPageDefinitionDirectly

public static final PageDefinition getPageDefinitionDirectly(WebApp wapp,
                                                             Locator locator,
                                                             Document doc,
                                                             java.lang.String extension)
Returns the page definition of the specified raw content in DOM; never null.

Parameters:
locator - the locator used to locate taglib and other resources. If null, wapp is assumed (WebApp is also assumed).
extension - the default extension if the content doesn't specify an language. In other words, if the content doesn't specify an language, LanguageDefinition.getByExtension(java.lang.String) is called. If extension is null and the content doesn't specify a language, the language called "xul/html" is assumed.
Throws:
UiException - if failed to parse

getPageDefinition

public static final PageDefinition getPageDefinition(WebApp wapp,
                                                     Locator locator,
                                                     java.lang.String path)
Returns the page definition of the specified path, or null if not found or failed to parse.

This is the lowest method that other getPageDefinition depends.

Dependency: Execution.createComponents -& Execution.getPageDefinition -& UiFactory.getPageDefiition -& PageDefintions.getPageDefinition

Parameters:
locator - the locator used to locate taglib and other resources. If null, wapp is assumed (WebApp is also assumed).

getLocator

public static final Locator getLocator(WebApp wapp,
                                       java.lang.String path)
Returns the locator for the specified context.

Parameters:
path - the original path, or null if not available. The original path is used to resolve a relative path. If not specified, Desktop.getCurrentDirectory() is used.


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo