public class WoofOfficeFloorSource extends HttpServerAutoWireOfficeFloorSource implements WoofContextConfigurable
AbstractOfficeFloorSource.SpecificationContext
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_OBJECTS_CONFIGURATION_LOCATION
Default Objects configuration location.
|
static String |
DEFAULT_TEAMS_CONFIGURATION_LOCATION
Default Teams configuration location.
|
static String |
DEFAULT_WOOF_CONFIGUARTION_LOCATION
Default WoOF configuration location.
|
static String |
PROPERTY_HTTP_PORT
Property to specify the HTTP port.
|
static String |
PROPERTY_OBJECTS_CONFIGURATION_LOCATION
Property for the location of the Objects configuration for the
application.
|
static String |
PROPERTY_TEAMS_CONFIGURATION_LOCATION
Property for the location of the Teams configuration for the application.
|
static String |
PROPERTY_WEBAPP_LOCATION
Property to override the default location of the
webapp
directory within a Maven project. |
static String |
PROPERTY_WOOF_CONFIGURATION_LOCATION
Property for the location of the WoOF configuration for the application.
|
static String |
WEBAPP_PATH
Default path within a Maven project to the
webapp directory. |
static String |
WEBXML_FILE_PATH
Path within
WEBAPP_PATH for the web.xml file. |
static String |
WOOF_TEMPLATE_URI_SUFFIX
WoOF
HttpTemplate URI suffix. |
processScopeWirer
HANDLER_INPUT_NAME, HANDLER_SECTION_NAME, WEB_PUBLIC_RESOURCES_CLASS_PATH_PREFIX
Constructor and Description |
---|
WoofOfficeFloorSource()
Initiate.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(String name,
String value)
Adds a
Property to configure the item. |
void |
addResources(ResourceSource resourceSource)
Adds a
ResourceSource . |
protected void |
configure(HttpServerAutoWireOfficeFloorSource application)
Allows overriding to provide additional configuration.
|
protected void |
initOfficeFloor(OfficeFloorDeployer deployer,
OfficeFloorSourceContext context)
Allows overriding for initialising the
OfficeFloor before
auto-wiring. |
static void |
loadOptionalConfiguration(AutoWireApplication application,
String objectsLocation,
String teamsLocation,
ConfigurationContext configurationContext,
OfficeFloorDeployer deployer)
Loads the optional configuration.
|
static void |
loadWebApplicationExtensions(WebAutoWireApplication application,
SourceProperties properties,
ClassLoader classLoader,
ResourceSource... resourceSources)
Loads extension functionality from the
WoofApplicationExtensionService instances. |
static void |
loadWebResources(WoofContextConfigurable contextConfigurable,
File webAppDir,
File... resourceDirectories)
Loads the web application resources for WoOF within a Maven project.
|
static void |
loadWebResourcesFromMavenProject(WoofContextConfigurable contextConfigurable,
File projectDirectory)
Loads the web application resources for WoOF within a Maven project.
|
static void |
main(String... args)
main to run the WoofModel . |
static void |
run(WoofOfficeFloorSource application)
Configures and runs the
HttpServerAutoWireApplication . |
void |
setWebAppDirectory(File webappDirectory)
Provides location of the
webapp directory. |
static void |
start(String... args)
Starts the
WoofOfficeFloorSource for unit testing. |
static void |
stop()
Stops the
WoofOfficeFloorSource for unit testing. |
addHttpServerSocket, addHttpsServerSocket, getHttpSessionAutoWireObject
addHttpApplicationObject, addHttpApplicationObject, addHttpRequestObject, addHttpRequestObject, addHttpSessionObject, addHttpSessionObject, addHttpTemplate, chainServicer, getHttpSecurity, getTemplateSectionName, getURIs, linkEscalation, linkEscalation, linkToHttpTemplate, linkToResource, linkToSendResponse, linkUri, setDefaultHttpTemplateUriSuffix, setHttpSecurity
addGovernance, addManagedObject, addObject, addSection, addSection, addSectionTransformer, addStartupFlow, addSupplier, assignDefaultTeam, assignTeam, getAppropriateAutoWire, getOfficeFloorCompiler, getSection, isLinked, isObjectAvailable, link, linkEscalation, loadSpecification, openOfficeFloor, setProfiler, sourceOfficeFloor, specifyConfigurationProperties
getSpecification
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addHttpApplicationObject, addHttpApplicationObject, addHttpRequestObject, addHttpRequestObject, addHttpSessionObject, addHttpSessionObject, addHttpTemplate, chainServicer, getHttpSecurity, getURIs, linkEscalation, linkEscalation, linkToHttpTemplate, linkToResource, linkToSendResponse, linkUri, setDefaultHttpTemplateUriSuffix, setHttpSecurity
addGovernance, addManagedObject, addObject, addSection, addSection, addSectionTransformer, addStartupFlow, addSupplier, assignDefaultTeam, assignTeam, getOfficeFloorCompiler, getSection, isLinked, isObjectAvailable, link, linkEscalation, openOfficeFloor, setProfiler
public static final String PROPERTY_WOOF_CONFIGURATION_LOCATION
public static final String DEFAULT_WOOF_CONFIGUARTION_LOCATION
public static final String PROPERTY_OBJECTS_CONFIGURATION_LOCATION
public static final String DEFAULT_OBJECTS_CONFIGURATION_LOCATION
public static final String PROPERTY_TEAMS_CONFIGURATION_LOCATION
public static final String DEFAULT_TEAMS_CONFIGURATION_LOCATION
public static final String PROPERTY_WEBAPP_LOCATION
webapp
directory within a Maven project.public static final String WEBAPP_PATH
webapp
directory.public static final String WEBXML_FILE_PATH
WEBAPP_PATH
for the web.xml
file.public static final String PROPERTY_HTTP_PORT
public static final String WOOF_TEMPLATE_URI_SUFFIX
HttpTemplate
URI suffix.public static void start(String... args) throws Exception
Starts the WoofOfficeFloorSource
for unit testing.
This will attempt to close all existing OfficeFloor
instances to
have a clean start.
args
- Command line arguments which are paired name/values for the
Property
loaded to the OfficeFloorCompiler
for
compiling and running.Exception
- If fails to start.public static void stop() throws Exception
WoofOfficeFloorSource
for unit testing.Exception
- If fails to stop.public static void main(String... args) throws Exception
main
to run the WoofModel
.args
- Command line arguments which are paired name/values for the
Property
loaded to the OfficeFloorCompiler
for
compiling and running.Exception
- If fails to run.public static void run(WoofOfficeFloorSource application) throws Exception
HttpServerAutoWireApplication
.application
- WoofOfficeFloorSource
.Exception
- If fails to run.public static void loadWebResourcesFromMavenProject(WoofContextConfigurable contextConfigurable, File projectDirectory)
contextConfigurable
- WoofContextConfigurable
.projectDirectory
- Maven project directory.public static void loadWebResources(WoofContextConfigurable contextConfigurable, File webAppDir, File... resourceDirectories)
contextConfigurable
- WoofContextConfigurable
.webAppDir
- webapp
directory.resourceDirectories
- Directories to source public resources.public static void loadWebApplicationExtensions(WebAutoWireApplication application, SourceProperties properties, ClassLoader classLoader, ResourceSource... resourceSources) throws Exception
WoofApplicationExtensionService
instances.application
- WebAutoWireApplication
.properties
- SourceProperties
.classLoader
- ClassLoader
.resourceSources
- ResourceSource
instances.Exception
- If fails to load the extension functionality.public static void loadOptionalConfiguration(AutoWireApplication application, String objectsLocation, String teamsLocation, ConfigurationContext configurationContext, OfficeFloorDeployer deployer) throws Exception
application
- AutoWireApplication
.objectsLocation
- Location of the Objects ConfigurationItem
.teamsLocation
- Location of the Teams ConfigurationItem
.configurationContext
- ConfigurationContext
.deployer
- OfficeFloorDeployer
. May be null
.Exception
- If fails to load the optional configuration.protected void configure(HttpServerAutoWireOfficeFloorSource application)
application
- HttpServerAutoWireOfficeFloorSource
.public void addProperty(String name, String value)
PropertyConfigurable
Property
to configure the item.addProperty
in interface PropertyConfigurable
name
- Name of Property
.value
- Value of Property
.public void setWebAppDirectory(File webappDirectory)
WoofContextConfigurable
Provides location of the webapp
directory.
Note that this may not be called if the webapp
directory is
not available.
setWebAppDirectory
in interface WoofContextConfigurable
webappDirectory
- Location of the webapp
directory.public void addResources(ResourceSource resourceSource)
WoofContextConfigurable
ResourceSource
.addResources
in interface WoofContextConfigurable
resourceSource
- ResourceSource
.protected void initOfficeFloor(OfficeFloorDeployer deployer, OfficeFloorSourceContext context) throws Exception
AutoWireOfficeFloorSource
OfficeFloor
before
auto-wiring.initOfficeFloor
in class HttpServerAutoWireOfficeFloorSource
deployer
- OfficeFloorDeployer
.context
- OfficeFloorSourceContext
.Exception
- If fails to initialise.Copyright © 2005–2016. All rights reserved.