Class DependencyMappingBuilderImpl<O extends java.lang.Enum<O>>
- java.lang.Object
-
- net.officefloor.frame.impl.construct.managedobject.DependencyMappingBuilderImpl<O>
-
- All Implemented Interfaces:
DependencyMappingBuilder
,ThreadDependencyMappingBuilder
,InputManagedObjectConfiguration<O>
,ManagedObjectConfiguration<O>
public class DependencyMappingBuilderImpl<O extends java.lang.Enum<O>> extends java.lang.Object implements DependencyMappingBuilder, ThreadDependencyMappingBuilder, ManagedObjectConfiguration<O>, InputManagedObjectConfiguration<O>
DependencyMappingBuilder
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description DependencyMappingBuilderImpl(java.lang.String boundManagedObjectName)
Initiate as anInputManagedObjectConfiguration
.DependencyMappingBuilderImpl(java.lang.String boundManagedObjectName, java.lang.String officeManagedObjectName)
Initiate as aManagedObjectConfiguration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBoundManagedObjectName()
ManagedObjectDependencyConfiguration<O>[]
getDependencyConfiguration()
Obtains the listing ofManagedObjectDependencyConfiguration
instances.ManagedObjectGovernanceConfiguration[]
getGovernanceConfiguration()
Obtains the listing ofManagedObjectGovernanceConfiguration
instances.java.lang.String
getOfficeManagedObjectName()
Obtains the name of theManagedObject
registered within theOffice
.<T> OptionalThreadLocal<T>
getOptionalThreadLocal()
Obtains theOptionalThreadLocal
for theManagedObject
.AdministrationConfiguration<?,?,?>[]
getPreLoadAdministration()
Obtains the listing of theAdministration
to be done before theManagedObject
is loaded.ThreadLocalConfiguration
getThreadLocalConfiguration()
Obtains theThreadLocalConfiguration
.void
mapDependency(int index, java.lang.String scopeManagedObjectName)
Specifies theManagedObject
for the index identifying the dependency.<d extends java.lang.Enum<d>>
voidmapDependency(d key, java.lang.String scopeManagedObjectName)
Specifies theManagedObject
for the dependency key.void
mapGovernance(java.lang.String governanceName)
Specifies theGovernance
for theManagedObject
.<E,f extends java.lang.Enum<f>,G extends java.lang.Enum<G>>
AdministrationBuilder<f,G>preLoadAdminister(java.lang.String administrationName, java.lang.Class<E> extension, AdministrationFactory<E,f,G> administrationFactory)
AddsAdministration
to be undertaken before thisManagedObject
is loaded.
-
-
-
Constructor Detail
-
DependencyMappingBuilderImpl
public DependencyMappingBuilderImpl(java.lang.String boundManagedObjectName, java.lang.String officeManagedObjectName)
Initiate as aManagedObjectConfiguration
.- Parameters:
boundManagedObjectName
- Name of theManagedObject
is being bound.officeManagedObjectName
- Name of theManagedObject
within theOffice
.
-
DependencyMappingBuilderImpl
public DependencyMappingBuilderImpl(java.lang.String boundManagedObjectName)
Initiate as anInputManagedObjectConfiguration
.- Parameters:
boundManagedObjectName
- Name of theManagedObject
is being bound.
-
-
Method Detail
-
mapDependency
public <d extends java.lang.Enum<d>> void mapDependency(d key, java.lang.String scopeManagedObjectName)
Description copied from interface:DependencyMappingBuilder
Specifies theManagedObject
for the dependency key.- Specified by:
mapDependency
in interfaceDependencyMappingBuilder
- Type Parameters:
d
- Dependency key type.- Parameters:
key
- Key of the dependency.scopeManagedObjectName
- Name of theManagedObject
within the scope that thisDependencyMappingBuilder
was created.
-
mapDependency
public void mapDependency(int index, java.lang.String scopeManagedObjectName)
Description copied from interface:DependencyMappingBuilder
Specifies theManagedObject
for the index identifying the dependency.- Specified by:
mapDependency
in interfaceDependencyMappingBuilder
- Parameters:
index
- Index identifying the dependency.scopeManagedObjectName
- Name of theManagedObject
within the scope that thisDependencyMappingBuilder
was created.
-
mapGovernance
public void mapGovernance(java.lang.String governanceName)
Description copied from interface:DependencyMappingBuilder
Specifies theGovernance
for theManagedObject
.- Specified by:
mapGovernance
in interfaceDependencyMappingBuilder
- Parameters:
governanceName
- Name of theGovernance
within theOffice
.
-
preLoadAdminister
public <E,f extends java.lang.Enum<f>,G extends java.lang.Enum<G>> AdministrationBuilder<f,G> preLoadAdminister(java.lang.String administrationName, java.lang.Class<E> extension, AdministrationFactory<E,f,G> administrationFactory)
Description copied from interface:DependencyMappingBuilder
AddsAdministration
to be undertaken before thisManagedObject
is loaded.- Specified by:
preLoadAdminister
in interfaceDependencyMappingBuilder
- Type Parameters:
E
- Extension type.f
-Flow
key type.G
-Governance
key type.- Parameters:
administrationName
- Name of theAdministration
.extension
- Extension type forAdministration
.administrationFactory
-AdministrationFactory
.- Returns:
AdministrationBuilder
to build theAdministration
.
-
getOptionalThreadLocal
public <T> OptionalThreadLocal<T> getOptionalThreadLocal()
Description copied from interface:ThreadDependencyMappingBuilder
Obtains theOptionalThreadLocal
for theManagedObject
.- Specified by:
getOptionalThreadLocal
in interfaceThreadDependencyMappingBuilder
- Type Parameters:
T
- Type of object.- Returns:
OptionalThreadLocal
for theManagedObject
.
-
getBoundManagedObjectName
public java.lang.String getBoundManagedObjectName()
Description copied from interface:ManagedObjectConfiguration
- Specified by:
getBoundManagedObjectName
in interfaceInputManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Specified by:
getBoundManagedObjectName
in interfaceManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Returns:
- Name of the
ManagedObject
bound to eitherProcessState
orThreadState
.
-
getOfficeManagedObjectName
public java.lang.String getOfficeManagedObjectName()
Description copied from interface:ManagedObjectConfiguration
Obtains the name of theManagedObject
registered within theOffice
.- Specified by:
getOfficeManagedObjectName
in interfaceManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Returns:
- Name of the
ManagedObject
registered within theOffice
.
-
getDependencyConfiguration
public ManagedObjectDependencyConfiguration<O>[] getDependencyConfiguration()
Description copied from interface:ManagedObjectConfiguration
Obtains the listing ofManagedObjectDependencyConfiguration
instances.- Specified by:
getDependencyConfiguration
in interfaceInputManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Specified by:
getDependencyConfiguration
in interfaceManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Returns:
ManagedObjectDependencyConfiguration
instances.
-
getGovernanceConfiguration
public ManagedObjectGovernanceConfiguration[] getGovernanceConfiguration()
Description copied from interface:ManagedObjectConfiguration
Obtains the listing ofManagedObjectGovernanceConfiguration
instances.- Specified by:
getGovernanceConfiguration
in interfaceInputManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Specified by:
getGovernanceConfiguration
in interfaceManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Returns:
ManagedObjectGovernanceConfiguration
instances.
-
getPreLoadAdministration
public AdministrationConfiguration<?,?,?>[] getPreLoadAdministration()
Description copied from interface:ManagedObjectConfiguration
Obtains the listing of theAdministration
to be done before theManagedObject
is loaded.- Specified by:
getPreLoadAdministration
in interfaceInputManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Specified by:
getPreLoadAdministration
in interfaceManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Returns:
- Listing of the
Administration
to be done before theManagedObject
is loaded.
-
getThreadLocalConfiguration
public ThreadLocalConfiguration getThreadLocalConfiguration()
Description copied from interface:ManagedObjectConfiguration
Obtains theThreadLocalConfiguration
.- Specified by:
getThreadLocalConfiguration
in interfaceInputManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Specified by:
getThreadLocalConfiguration
in interfaceManagedObjectConfiguration<O extends java.lang.Enum<O>>
- Returns:
ThreadLocalConfiguration
ornull
if not bound toThread
.
-
-