net.officefloor.plugin.servlet.context.source
Class OfficeServletContextManagedObjectSource

java.lang.Object
  extended by net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource<D,F>
      extended by net.officefloor.frame.spi.managedobject.source.impl.AbstractManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
          extended by net.officefloor.plugin.servlet.context.source.OfficeServletContextManagedObjectSource
All Implemented Interfaces:
CoordinatingManagedObject<OfficeServletContextManagedObjectSource.DependencyKeys>, ManagedObject, ManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>

public class OfficeServletContextManagedObjectSource
extends AbstractManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
implements CoordinatingManagedObject<OfficeServletContextManagedObjectSource.DependencyKeys>

ManagedObjectSource for the OfficeServletContext.

Author:
Daniel Sagenschneider

Nested Class Summary
static class OfficeServletContextManagedObjectSource.DependencyKeys
          Dependency keys for the OfficeServletContextManagedObjectSource.
 
Nested classes/interfaces inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller, AbstractAsyncManagedObjectSource.Labeller, AbstractAsyncManagedObjectSource.MetaDataContext<D extends Enum<D>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
 
Field Summary
static String PROPERTY_FILTER_INSTANCE_INIT_PREFIX
          Prefix on property name to obtain Init Parameter name and its corresponding value.
static String PROPERTY_FILTER_INSTANCE_NAME_PREFIX
          Prefix on property name to obtain the Filter name and its corresponding Filter Class name.
static String PROPERTY_FILTER_MAPPING_INDEX_PREFIX
          Prefix on property name to obtain the FilterMapping index and its corresponding Filter name.
static String PROPERTY_FILTER_MAPPING_SERVLET_PREFIX
          Prefix on property name to obtain the FilterMapping Servlet name.
static String PROPERTY_FILTER_MAPPING_TYPE_PREFIX
          Prefix on property name to obtain the FilterMapping MappingType.
static String PROPERTY_FILTER_MAPPING_URL_PREFIX
          Prefix on property name to obtain the FilterMapping URL pattern.
static String PROPERTY_PREFIX_FILE_EXTENSION_TO_MIME_TYPE
          Property prefix to file extension to MIME type mapping.
static String PROPERTY_PREFIX_INIT_PARAMETER
          Property prefix to an init parameter.
static String PROPERTY_SERVLET_CONTEXT_NAME
          Property name to specify the ServletContext name.
 
Constructor Summary
OfficeServletContextManagedObjectSource()
           
 
Method Summary
protected  ManagedObject getManagedObject()
           
 Object getObject()
           
 Map<String,String> loadMappings(String prefix, ManagedObjectSourceContext<None> context, Map<String,String> mappings)
          Extracts the mapping from the ManagedObjectSourceContext.
protected  void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<OfficeServletContextManagedObjectSource.DependencyKeys,None> context)
           
 void loadObjects(ObjectRegistry<OfficeServletContextManagedObjectSource.DependencyKeys> registry)
           
protected  void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
           
 
Methods inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
 
Methods inherited from class net.officefloor.frame.spi.managedobject.source.impl.AbstractAsyncManagedObjectSource
getMetaData, getSpecification, init, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_SERVLET_CONTEXT_NAME

public static final String PROPERTY_SERVLET_CONTEXT_NAME
Property name to specify the ServletContext name.

See Also:
Constant Field Values

PROPERTY_PREFIX_INIT_PARAMETER

public static final String PROPERTY_PREFIX_INIT_PARAMETER
Property prefix to an init parameter.

See Also:
Constant Field Values

PROPERTY_PREFIX_FILE_EXTENSION_TO_MIME_TYPE

public static final String PROPERTY_PREFIX_FILE_EXTENSION_TO_MIME_TYPE
Property prefix to file extension to MIME type mapping.

See Also:
Constant Field Values

PROPERTY_FILTER_INSTANCE_NAME_PREFIX

public static final String PROPERTY_FILTER_INSTANCE_NAME_PREFIX
Prefix on property name to obtain the Filter name and its corresponding Filter Class name.

See Also:
Constant Field Values

PROPERTY_FILTER_INSTANCE_INIT_PREFIX

public static final String PROPERTY_FILTER_INSTANCE_INIT_PREFIX
Prefix on property name to obtain Init Parameter name and its corresponding value.

See Also:
Constant Field Values

PROPERTY_FILTER_MAPPING_INDEX_PREFIX

public static final String PROPERTY_FILTER_MAPPING_INDEX_PREFIX
Prefix on property name to obtain the FilterMapping index and its corresponding Filter name.

See Also:
Constant Field Values

PROPERTY_FILTER_MAPPING_URL_PREFIX

public static final String PROPERTY_FILTER_MAPPING_URL_PREFIX
Prefix on property name to obtain the FilterMapping URL pattern.

See Also:
Constant Field Values

PROPERTY_FILTER_MAPPING_SERVLET_PREFIX

public static final String PROPERTY_FILTER_MAPPING_SERVLET_PREFIX
Prefix on property name to obtain the FilterMapping Servlet name.

See Also:
Constant Field Values

PROPERTY_FILTER_MAPPING_TYPE_PREFIX

public static final String PROPERTY_FILTER_MAPPING_TYPE_PREFIX
Prefix on property name to obtain the FilterMapping MappingType.

See Also:
Constant Field Values
Constructor Detail

OfficeServletContextManagedObjectSource

public OfficeServletContextManagedObjectSource()
Method Detail

loadMappings

public Map<String,String> loadMappings(String prefix,
                                       ManagedObjectSourceContext<None> context,
                                       Map<String,String> mappings)
Extracts the mapping from the ManagedObjectSourceContext.

Parameters:
prefix - Prefix of properties with remaining being the key.
context - ManagedObjectSourceContext.
mappings - Mappings to be loaded..
Returns:
Mapping.

loadSpecification

protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Specified by:
loadSpecification in class AbstractAsyncManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>

loadMetaData

protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<OfficeServletContextManagedObjectSource.DependencyKeys,None> context)
                     throws Exception
Specified by:
loadMetaData in class AbstractAsyncManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
Throws:
Exception

getManagedObject

protected ManagedObject getManagedObject()
                                  throws Throwable
Specified by:
getManagedObject in class AbstractManagedObjectSource<OfficeServletContextManagedObjectSource.DependencyKeys,None>
Throws:
Throwable

loadObjects

public void loadObjects(ObjectRegistry<OfficeServletContextManagedObjectSource.DependencyKeys> registry)
                 throws Throwable
Specified by:
loadObjects in interface CoordinatingManagedObject<OfficeServletContextManagedObjectSource.DependencyKeys>
Throws:
Throwable

getObject

public Object getObject()
                 throws Throwable
Specified by:
getObject in interface ManagedObject
Throws:
Throwable


Copyright © 2005-2012. All Rights Reserved.