net.officefloor.plugin.servlet.webxml
Class WebXmlSectionSource

java.lang.Object
  extended by net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
      extended by net.officefloor.plugin.servlet.webxml.WebXmlSectionSource
All Implemented Interfaces:
SectionSource

public class WebXmlSectionSource
extends AbstractSectionSource

SectionSource to load HttpServlet functionality from a web.xml file (as per Servlet specification).

Author:
Daniel Sagenschneider

Nested Class Summary
 
Nested classes/interfaces inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
AbstractSectionSource.SpecificationContext
 
Field Summary
static String PROPERTY_WEB_XML_CONFIGURATION
          Name of property optionally containing the web.xml configuration (should a section location not be provided).
static String SERVICE_INPUT
          Name of the SectionInput that services the HttpRequest.
static String UNHANDLED_OUTPUT
          Name of the SectionOutput should the HttpRequest not be handled.
 
Constructor Summary
WebXmlSectionSource()
           
 
Method Summary
protected  void loadSpecification(AbstractSectionSource.SpecificationContext context)
          Loads the SectionSourceSpecification.
 void sourceSection(SectionDesigner designer, SectionSourceContext context)
          Sources the OfficeSection by constructing it via the input SectionDesigner.
static void validateWebXmlConfiguration(InputStream webXmlContents, SourceContext context)
          Validates the web.xml configuration.
 
Methods inherited from class net.officefloor.compile.spi.section.source.impl.AbstractSectionSource
getSpecification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_WEB_XML_CONFIGURATION

public static final String PROPERTY_WEB_XML_CONFIGURATION
Name of property optionally containing the web.xml configuration (should a section location not be provided).

See Also:
Constant Field Values

SERVICE_INPUT

public static final String SERVICE_INPUT
Name of the SectionInput that services the HttpRequest.

See Also:
Constant Field Values

UNHANDLED_OUTPUT

public static final String UNHANDLED_OUTPUT
Name of the SectionOutput should the HttpRequest not be handled.

See Also:
Constant Field Values
Constructor Detail

WebXmlSectionSource

public WebXmlSectionSource()
Method Detail

validateWebXmlConfiguration

public static void validateWebXmlConfiguration(InputStream webXmlContents,
                                               SourceContext context)
                                        throws InvalidServletConfigurationException
Validates the web.xml configuration.

Parameters:
webXmlContents - Contents of the web.xml.
context - SourceContext.
Throws:
InvalidServletConfigurationException - Should the web.xml not be valid.

loadSpecification

protected void loadSpecification(AbstractSectionSource.SpecificationContext context)
Description copied from class: AbstractSectionSource
Loads the SectionSourceSpecification.

Specified by:
loadSpecification in class AbstractSectionSource
Parameters:
context - AbstractSectionSource.SpecificationContext.

sourceSection

public void sourceSection(SectionDesigner designer,
                          SectionSourceContext context)
                   throws Exception
Description copied from interface: SectionSource
Sources the OfficeSection by constructing it via the input SectionDesigner.

Parameters:
designer - SectionDesigner to construct the structure of the OfficeSection.
context - SectionSourceContext to source details to construct the OfficeSection.
Throws:
Exception - If fails to construct the OfficeSection.


Copyright © 2005-2013. All Rights Reserved.