WebObjects 5.4.2

com.webobjects.appserver.parser
Class WOComponentTemplateParser.Factory

java.lang.Object
  extended by com.webobjects.appserver.parser.WOComponentTemplateParser.Factory
Enclosing class:
WOComponentTemplateParser

public static class WOComponentTemplateParser.Factory
extends Object

Factory method for new parser.

Since:
5.4

Nested Class Summary
static interface WOComponentTemplateParser.Factory.ClassDelegate
          This interface defines a delegate to enable subclassing.
 
Constructor Summary
protected WOComponentTemplateParser.Factory()
           
 
Method Summary
protected static WOComponentTemplateParser.Factory.ClassDelegate getClassDelegate()
          Returns the class delegate.
static WOComponentTemplateParser.Factory getInstance()
          Returns the singleton, creating the instance if necessary.
static boolean hasClassDelegate()
          Checks if the class has a class delegate.
 WOComponentTemplateParser newParserWithHTMLAndDeclaration(String frameworkName, String referenceName, String someHTML, String declarations, NSArray languages, WOAssociationFactory associationFactory, WOMLNamespaceProvider namespaceProvider)
          Creates a new instance of the component parser.
static void setClassDelegate(WOComponentTemplateParser.Factory.ClassDelegate delegate)
          Assigns delegate as the class delegate.
 void setWOHTMLTemplateParserClassName(String className)
          Sets the parser class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WOComponentTemplateParser.Factory

protected WOComponentTemplateParser.Factory()
Method Detail

getInstance

public static WOComponentTemplateParser.Factory getInstance()
Returns the singleton, creating the instance if necessary. If the instance need to be created the delegate is given the opportunity before falling back on the class constructor.

Returns:
local host monitor instance

hasClassDelegate

public static boolean hasClassDelegate()
Checks if the class has a class delegate.

Returns:
true if the class has a class delegate, false otherwise.
See Also:
WOComponentTemplateParser.Factory.getClassDelegate(), WOComponentTemplateParser.Factory.setClassDelegate(ClassDelegate anObject), WOComponentTemplateParser.Factory.ClassDelegate

getClassDelegate

protected static WOComponentTemplateParser.Factory.ClassDelegate getClassDelegate()
Returns the class delegate.

Returns:
class delegate.
See Also:
WOComponentTemplateParser.Factory.setClassDelegate(ClassDelegate anObject), WOComponentTemplateParser.Factory.hasClassDelegate(), WOComponentTemplateParser.Factory.ClassDelegate

setClassDelegate

public static void setClassDelegate(WOComponentTemplateParser.Factory.ClassDelegate delegate)
Assigns delegate as the class delegate. The class delegate is optional.

Parameters:
delegate - The object to set as the class delegate.
See Also:
WOComponentTemplateParser.Factory.getClassDelegate(), WOComponentTemplateParser.Factory.hasClassDelegate(), WOComponentTemplateParser.Factory.ClassDelegate

setWOHTMLTemplateParserClassName

public void setWOHTMLTemplateParserClassName(String className)
Sets the parser class. This must be a subclass of WOComponentTemplateParser.

Parameters:
className - parser class name

newParserWithHTMLAndDeclaration

public WOComponentTemplateParser newParserWithHTMLAndDeclaration(String frameworkName,
                                                                 String referenceName,
                                                                 String someHTML,
                                                                 String declarations,
                                                                 NSArray languages,
                                                                 WOAssociationFactory associationFactory,
                                                                 WOMLNamespaceProvider namespaceProvider)
                                                          throws ClassNotFoundException
Creates a new instance of the component parser.

Parameters:
frameworkName - framework name of the component to parse
referenceName - component name (used for error handling)
someHTML - HTML template
declarations - declaration file (optional)
languages - list of languages
associationFactory - association factory
namespaceProvider - namespace provider
Returns:
new parser for the component
Throws:
ClassNotFoundException

Last updated June 2008

Copyright © 2000-2008 Apple Inc.