net.officefloor.autowire
Interface AutoWireApplication

All Known Subinterfaces:
HttpServerAutoWireApplication, WebAutoWireApplication
All Known Implementing Classes:
AutoWireOfficeFloorSource, HttpServerAutoWireOfficeFloorSource, ServletWebAutoWireApplication, WebApplicationAutoWireOfficeFloorSource, WoofOfficeFloorSource

public interface AutoWireApplication

Application which has auto-wired configuration.

Author:
Daniel Sagenschneider

Method Summary
 AutoWireGovernance addGovernance(String governanceName, String governanceSourceClassName)
          Adds Governance over the ManagedObject and object instances.
 AutoWireObject addManagedObject(String managedObjectSourceClassName, ManagedObjectSourceWirer wirer, AutoWire... autoWiring)
          Adds a ManagedObjectSource for dependency injection.
 void addObject(Object object, AutoWire... autoWiring)
          Adds a raw object for dependency injection.
 AutoWireSection addSection(String sectionName, String sectionSourceClassName, String sectionLocation)
          Adds an AutoWireSection.
<A extends AutoWireSection>
AutoWireSection
addSection(String sectionName, String sectionSourceClassName, String sectionLocation, AutoWireSectionFactory<A> sectionFactory)
          Adds an AutoWireSection with the ability to override the AutoWireSection used.
 void addSectionTransformer(AutoWireSectionTransformer transformer)
          Adds a AutoWireSectionTransformer.
 void addStartupFlow(AutoWireSection section, String inputName)
          Adds a flow to be triggered on start-up.
 AutoWireSupplier addSupplier(String supplierSourceClassName)
          Adds a SupplierSource to provide ManagedObject instances for dependency injection.
 AutoWireTeam assignDefaultTeam(String teamSourceClassName)
          Assigns a Team responsible for unassigned Task instances.
 AutoWireTeam assignTeam(String teamSourceClassName, AutoWire... autoWiring)
          Assigns a Team responsible for: Task dependent on the specified object types Governance with the extension interface object type
 OfficeFloorCompiler getOfficeFloorCompiler()
           Obtains the OfficeFloorCompiler being used.
 AutoWireSection getSection(String sectionName)
           Obtains the AutoWireSection by its name.
 boolean isLinked(AutoWireSection section, String sectionOutputName)
           Determines if the AutoWireSection output is configured for linking.
 boolean isObjectAvailable(AutoWire autoWiring)
          Indicates if the AutoWireObject is already configured for the AutoWire.
 void link(AutoWireSection sourceSection, String sourceOutputName, AutoWireSection targetSection, String targetInputName)
          Links the source SectionOutput to a target SectionInput.
 void linkEscalation(Class<? extends Throwable> escalation, AutoWireSection section, String inputName)
          Links the Escalation to be handled by the OfficeSectionInput.
 AutoWireOfficeFloor openOfficeFloor()
          Opens the AutoWireOfficeFloor.
 void setProfiler(Profiler profiler)
          Specifies the Profiler.
 

Method Detail

getOfficeFloorCompiler

OfficeFloorCompiler getOfficeFloorCompiler()

Obtains the OfficeFloorCompiler being used.

This allows manipulation of the OfficeFloorCompiler before auto-wiring to compile and open the OfficeFloor.

Returns:
OfficeFloorCompiler being used.

addSection

AutoWireSection addSection(String sectionName,
                           String sectionSourceClassName,
                           String sectionLocation)
Adds an AutoWireSection.

Parameters:
sectionName - Name of the OfficeSection.
sectionSourceClassName - Class name of the SectionSource. May be an alias.
sectionLocation - OfficeSection location.
Returns:
AutoWireSection to configure properties and link flows.

addSection

<A extends AutoWireSection> AutoWireSection addSection(String sectionName,
                                                       String sectionSourceClassName,
                                                       String sectionLocation,
                                                       AutoWireSectionFactory<A> sectionFactory)
Adds an AutoWireSection with the ability to override the AutoWireSection used.

Parameters:
sectionName - Name of the OfficeSection.
sectionSourceClassName - Class name of the SectionSource. May be an alias.
sectionLocation - OfficeSection location.
sectionFactory - AutoWireSectionFactory to allow overriding the AutoWireSection utilised.
Returns:
Overridden AutoWireSection to configure properties and link flows.

getSection

AutoWireSection getSection(String sectionName)

Obtains the AutoWireSection by its name.

This is useful to obtain an existing AutoWireSection to link to.

Parameters:
sectionName - Name of the AutoWireSection.
Returns:
AutoWireSection or null if not AutoWireSection by the name.

addSectionTransformer

void addSectionTransformer(AutoWireSectionTransformer transformer)
Adds a AutoWireSectionTransformer.

Parameters:
transformer - AutoWireSectionTransformer.

link

void link(AutoWireSection sourceSection,
          String sourceOutputName,
          AutoWireSection targetSection,
          String targetInputName)
Links the source SectionOutput to a target SectionInput.

Parameters:
sourceSection - Source section.
sourceOutputName - Name of the source SectionOutput.
targetSection - Target section.
targetInputName - Name of the target SectionInput.

isLinked

boolean isLinked(AutoWireSection section,
                 String sectionOutputName)

Determines if the AutoWireSection output is configured for linking.

This aids configuration by allowing to know if SectionOutput flows have been configured (linked).

Parameters:
section - AutoWireSection.
sectionOutputName - SectionOutput name.
Returns:
true if configured for linking, otherwise false.

linkEscalation

void linkEscalation(Class<? extends Throwable> escalation,
                    AutoWireSection section,
                    String inputName)
Links the Escalation to be handled by the OfficeSectionInput.

Parameters:
escalation - Escalation.
section - AutoWireSection.
inputName - Name of the AutoWireSection input.

addStartupFlow

void addStartupFlow(AutoWireSection section,
                    String inputName)
Adds a flow to be triggered on start-up.

Parameters:
section - AutoWireSection.
inputName - Name of the AutoWireSection input to trigger on start-up.

addObject

void addObject(Object object,
               AutoWire... autoWiring)
Adds a raw object for dependency injection.

Parameters:
object - Object implementing the type to be dependency injected.
autoWiring - AutoWire matches that the object is to provide dependency injection. Should no AutoWire instances be provided the type is defaulted from the object without a qualifier.

addManagedObject

AutoWireObject addManagedObject(String managedObjectSourceClassName,
                                ManagedObjectSourceWirer wirer,
                                AutoWire... autoWiring)
Adds a ManagedObjectSource for dependency injection.

Parameters:
managedObjectSourceClassName - Class name of the ManagedObjectSource. May be an alias.
wirer - ManagedObjectSourceWirer to assist in configuring the ManagedObjectSource. May be null if no assistance is required.
autoWiring - AutoWire matches that the ManagedObjectSource is to provide dependency injection. At least one AutoWire must be provided.
Returns:
AutoWireObject for the ManagedObjectSource.

addSupplier

AutoWireSupplier addSupplier(String supplierSourceClassName)
Adds a SupplierSource to provide ManagedObject instances for dependency injection.

Parameters:
supplierSourceClassName - Class name of the SupplierSource. May be an alias.
Returns:
AutoWireSupplier.

isObjectAvailable

boolean isObjectAvailable(AutoWire autoWiring)
Indicates if the AutoWireObject is already configured for the AutoWire.

Parameters:
autoWiring - AutoWire to determine if available (configured).
Returns:
true if an AutoWireObject has been configured for the AutoWire.

addGovernance

AutoWireGovernance addGovernance(String governanceName,
                                 String governanceSourceClassName)
Adds Governance over the ManagedObject and object instances.

Parameters:
governanceName - Name of the Governance.
governanceSourceClassName - Class name of the GovernanceSource. May be an alias.
Returns:
AutoWireGovernance.

assignTeam

AutoWireTeam assignTeam(String teamSourceClassName,
                        AutoWire... autoWiring)
Assigns a Team responsible for:
  1. Task dependent on the specified object types
  2. Governance with the extension interface object type

Parameters:
teamSourceClassName - Class name of the TeamSource. May be an alias.
autoWiring - AutoWire instances to identify dependent Task object types and Governance extension interfaces the Team is responsible for. Must have at least one AutoWire provided.
Returns:
AutoWireTeam.

assignDefaultTeam

AutoWireTeam assignDefaultTeam(String teamSourceClassName)
Assigns a Team responsible for unassigned Task instances.

Parameters:
teamSourceClassName - Class name of the TeamSource. May be an alias.
Returns:
AutoWireTeam.

setProfiler

void setProfiler(Profiler profiler)
Specifies the Profiler.

Parameters:
profiler - Profiler.

openOfficeFloor

AutoWireOfficeFloor openOfficeFloor()
                                    throws Exception
Opens the AutoWireOfficeFloor.

Returns:
AutoWireOfficeFloor.
Throws:
Exception - If fails to open the AutoWireOfficeFloor.


Copyright © 2005-2013. All Rights Reserved.