org.apache.cocoon.forms
Class DefaultFormManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.forms.DefaultFormManager
All Implemented Interfaces:
Component, Configurable, Contextualizable, Disposable, FormManager, Initializable, LogEnabled, Serviceable, ThreadSafe

public class DefaultFormManager
extends AbstractLogEnabled
implements FormManager, Contextualizable, ThreadSafe, Serviceable, Disposable, Configurable, Component, Initializable

Component implementing the FormManager role.

Version:
$Id: DefaultFormManager.java 326838 2005-10-20 06:26:53Z sylvain $

Nested Class Summary
 class DefaultFormManager.FormServiceManager
           
 
Field Summary
protected  CacheManager cacheManager
           
protected  Configuration configuration
           
protected  LibraryManagerImpl libraryManager
           
protected  ServiceManager manager
           
protected static String PREFIX
           
protected  SimpleServiceSelector widgetDefinitionBuilderSelector
           
 
Fields inherited from interface org.apache.cocoon.forms.FormManager
ROLE
 
Constructor Summary
DefaultFormManager()
           
 
Method Summary
 void configure(Configuration configuration)
          Configurable
 void contextualize(Context context)
           
 Form createForm(Element formElement)
          Creates a form instance based on the XML form definition that is supplied as a DOM tree.
 Form createForm(Source source)
          Creates a form instance based on the XML form definition that can be read from the specified source.
 Form createForm(String uri)
          Creates a form instance based on the XML form definition that can be retrieved from the specified URI.
 FormDefinition createFormDefinition(Element formElement)
          Creates a form definition based on the XML form definition that is supplied as a DOM tree.
 FormDefinition createFormDefinition(String uri)
          Creates a form definition based on the XML form definition that can be retrieved from the specified URI.
 void dispose()
          Disposable
 Context getAvalonContext()
          Temporary internal method, don't rely on it's existence!
 FormDefinition getFormDefinition(Element formElement)
           
 FormDefinition getFormDefinition(Source source)
           
 ServiceSelector getWidgetDefinitionBuilderSelector()
           
 void initialize()
           
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX

protected static final String PREFIX
See Also:
Constant Field Values

manager

protected ServiceManager manager

configuration

protected Configuration configuration

widgetDefinitionBuilderSelector

protected SimpleServiceSelector widgetDefinitionBuilderSelector

cacheManager

protected CacheManager cacheManager

libraryManager

protected LibraryManagerImpl libraryManager
Constructor Detail

DefaultFormManager

public DefaultFormManager()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

getAvalonContext

public Context getAvalonContext()
Temporary internal method, don't rely on it's existence! Needed to access the context from flowscript.


service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Configurable

Specified by:
configure in interface Configurable
Throws:
ConfigurationException

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception

getWidgetDefinitionBuilderSelector

public ServiceSelector getWidgetDefinitionBuilderSelector()

createForm

public Form createForm(Source source)
                throws Exception
Description copied from interface: FormManager
Creates a form instance based on the XML form definition that can be read from the specified source.

To avoid having to resolve the Source object yourself, use the FormManager.createForm(java.lang.String) method.

The form definition will be cached, so that future form instances can be creted quickly.

Specified by:
createForm in interface FormManager
Throws:
Exception

createForm

public Form createForm(String uri)
                throws Exception
Description copied from interface: FormManager
Creates a form instance based on the XML form definition that can be retrieved from the specified URI.

The form definition will be cached, so that future form instances can be creted quickly.

Specified by:
createForm in interface FormManager
Throws:
Exception

createForm

public Form createForm(Element formElement)
                throws Exception
Description copied from interface: FormManager
Creates a form instance based on the XML form definition that is supplied as a DOM tree.

The specified element must be a fd:form element.

The Form Definition will not be cached.

Specified by:
createForm in interface FormManager
Throws:
Exception

createFormDefinition

public FormDefinition createFormDefinition(Element formElement)
                                    throws Exception
Description copied from interface: FormManager
Creates a form definition based on the XML form definition that is supplied as a DOM tree.

The specified element must be a fd:form element.

The Form Definition will not be cached.

Specified by:
createFormDefinition in interface FormManager
Throws:
Exception

getFormDefinition

public FormDefinition getFormDefinition(Source source)
                                 throws Exception
Throws:
Exception

getFormDefinition

public FormDefinition getFormDefinition(Element formElement)
                                 throws Exception
Throws:
Exception

createFormDefinition

public FormDefinition createFormDefinition(String uri)
                                    throws Exception
Description copied from interface: FormManager
Creates a form definition based on the XML form definition that can be retrieved from the specified URI.

The specified element must be a fd:form element.

The Form Definition will not be cached.

Specified by:
createFormDefinition in interface FormManager
Throws:
Exception

dispose

public void dispose()
Disposable

Specified by:
dispose in interface Disposable


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.