Class RawBoundManagedObjectMetaData
- java.lang.Object
-
- net.officefloor.frame.impl.construct.managedobject.RawBoundManagedObjectMetaData
-
public class RawBoundManagedObjectMetaData extends java.lang.Object
Raw meta-data for a boundManagedObject
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description RawBoundManagedObjectMetaData(java.lang.String boundManagedObjectName, boolean isInput, ThreadLocalConfiguration threadLocalConfiguration)
Initiate.
-
Method Summary
-
-
-
Constructor Detail
-
RawBoundManagedObjectMetaData
public RawBoundManagedObjectMetaData(java.lang.String boundManagedObjectName, boolean isInput, ThreadLocalConfiguration threadLocalConfiguration)
Initiate.- Parameters:
boundManagedObjectName
- Name that theManagedObject
is bound under.isInput
- Indicates if an InputManagedObject
.threadLocalConfiguration
-ThreadLocalConfiguration
. May benull
.
-
-
Method Detail
-
loadRequiredManagedObjects
public static ManagedObjectIndex loadRequiredManagedObjects(RawBoundManagedObjectMetaData boundMo, java.util.Map<ManagedObjectIndex,RawBoundManagedObjectMetaData> requiredManagedObjects)
Recursively loads all theManagedObjectIndex
instances for theRawBoundManagedObjectMetaData
.- Parameters:
boundMo
-RawBoundManagedObjectMetaData
.requiredManagedObjects
- Mapping of the requiredManagedObjectIndex
instances by theManagedFunction
to their respectiveRawBoundManagedObjectMetaData
.- Returns:
ManagedObjectIndex
of the inputRawBoundManagedObjectMetaData
.
-
createSortedRequiredManagedObjects
public static ManagedObjectIndex[] createSortedRequiredManagedObjects(java.util.Map<ManagedObjectIndex,RawBoundManagedObjectMetaData> requiredManagedObjects, OfficeFloorIssues.AssetType assetType, java.lang.String assetName, OfficeFloorIssues issues)
Sorts the required
ManagedObjectIndex
instances for theManagedFunction
so that dependencyManagedObject
instances are before theManagedObject
instances using them. In essence this is a topological sort so that dependencies are first.This is necessary for coordinating so that dependencies are coordinated before the
ManagedObject
instances using them are coordinated.- Parameters:
requiredManagedObjects
- Mapping of theManagedObjectIndex
to itsRawBoundManagedObjectMetaData
.assetType
-OfficeFloorIssues.AssetType
.assetName
- Name of asset to issues.issues
-OfficeFloorIssues
.- Returns:
- Listing of required
ManagedObject
instances to be sorted, ornull
indicating unable to sort, possible because of cyclic dependencies.
-
isInput
public boolean isInput()
Indicates if input.- Returns:
true
if input.
-
setManagedObjectIndex
public void setManagedObjectIndex(ManagedObjectScope managedObjectScope, int indexOfManagedObjectWithinScope)
Specifies theManagedObjectIndex
.- Parameters:
managedObjectScope
-ManagedObjectScope
.indexOfManagedObjectWithinScope
- Index of theManagedObject
within theManagedObjectScope
.
-
addInstance
public RawBoundManagedObjectInstanceMetaData<?> addInstance(java.lang.String boundManagedObjectName, RawManagedObjectMetaData<?,?> rawMoMetaData, ManagedObjectDependencyConfiguration<?>[] dependenciesConfiguration, ManagedObjectGovernanceConfiguration[] governanceConfiguration, AdministrationConfiguration<?,?,?>[] preloadAdministration)
Adds aRawBoundManagedObjectInstanceMetaData
to thisRawBoundManagedObjectMetaData
.- Parameters:
boundManagedObjectName
- Name that theManagedObject
is bound under.rawMoMetaData
-RawManagedObjectMetaData
.dependenciesConfiguration
- Listing of theManagedObjectDependencyConfiguration
for theRawBoundManagedObjectInstanceMetaData
.governanceConfiguration
- Listing of theManagedObjectGovernanceConfiguration
for theRawBoundManagedObjectInstanceMetaData
.preloadAdministration
- Listing of the pre-loadAdministrationConfiguration
for theRawBoundManagedObjectInstanceMetaData
.- Returns:
RawBoundManagedObjectInstanceMetaData
.
-
getBoundManagedObjectName
public java.lang.String getBoundManagedObjectName()
Obtains the name theManagedObject
is bound under.- Returns:
- Name the
ManagedObject
is bound under.
-
getManagedObjectIndex
public ManagedObjectIndex getManagedObjectIndex()
Obtains theManagedObjectIndex
.- Returns:
ManagedObjectIndex
.
-
getDefaultInstanceIndex
public int getDefaultInstanceIndex()
Obtains the index of the defaultRawBoundManagedObjectInstanceMetaData
for thisRawBoundManagedObjectMetaData
.- Returns:
- Index of the default
RawBoundManagedObjectInstanceMetaData
for thisRawBoundManagedObjectMetaData
.
-
getRawBoundManagedObjectInstanceMetaData
public RawBoundManagedObjectInstanceMetaData<?>[] getRawBoundManagedObjectInstanceMetaData()
Obtains theRawBoundManagedObjectInstanceMetaData
instances for theManagedObjectSource
instances that may provide aManagedObject
for thisRawBoundManagedObjectMetaData
.- Returns:
RawBoundManagedObjectMetaData
instances for thisRawBoundManagedObjectMetaData
.
-
-