org.apache.cocoon.forms
Class DefaultFormManager

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

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

Component implementing the FormManager role.

Version:
$Id: DefaultFormManager.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
protected  CacheManager cacheManager
           
protected  LibraryManager libraryManager
           
protected  ServiceManager manager
           
protected  SimpleServiceSelector widgetDefinitionBuilderSelector
           
 
Fields inherited from interface org.apache.cocoon.forms.FormManager
ROLE
 
Constructor Summary
DefaultFormManager()
           
 
Method Summary
 void configure(Configuration configuration)
           
 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(Source source)
          Creates a form definition based on the XML form definition that can be retrieved from the specified source.
 FormDefinition createFormDefinition(String uri)
          Creates a form definition based on the XML form definition that can be retrieved from the specified URI.
 void dispose()
           
 void enableLogging(Logger logger)
           
 Context getAvalonContext()
          Temporary internal method, don't rely on it's existence!
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected ServiceManager manager

widgetDefinitionBuilderSelector

protected SimpleServiceSelector widgetDefinitionBuilderSelector

cacheManager

protected CacheManager cacheManager

libraryManager

protected LibraryManager libraryManager
Constructor Detail

DefaultFormManager

public DefaultFormManager()
Method Detail

enableLogging

public void enableLogging(Logger logger)
Specified by:
enableLogging in interface LogEnabled
Overrides:
enableLogging in class AbstractLogEnabled
See Also:
AbstractLogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

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
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

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 created quickly.

Specified by:
createForm in interface FormManager
Throws:
Exception

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(String) method.

The form definition will be cached, so that future form instances can be created 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(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 root element must be a <fd:form> element.

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

Specified by:
createFormDefinition in interface FormManager
Throws:
Exception

createFormDefinition

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

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

The root element must be a <fd:form> element.

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

Specified by:
createFormDefinition 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


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.