Class MockManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- java.lang.Object
-
- net.officefloor.frame.test.MockManagedObjectSourceMetaData<D,H>
-
- All Implemented Interfaces:
ManagedObjectSourceMetaData<D,H>
public class MockManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>> extends java.lang.Object implements ManagedObjectSourceMetaData<D,H>
- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MockManagedObjectSourceMetaData(java.lang.Class<MO> managedObjectClass, java.lang.Class<?> objectClass, java.lang.Class<D> dependencyKeys, java.util.Map<D,java.lang.Class<?>> dependencyClasses, java.lang.Class<H> flowKeys, java.util.Map<H,java.lang.Class<?>> flowClasses, java.lang.String[] executionStrategies)
Initiate.MockManagedObjectSourceMetaData(ManagedObject managedObject)
Initiate from theManagedObject
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedObjectDependencyMetaData<D>[]
getDependencyMetaData()
Obtains the list ofManagedObjectDependencyMetaData
instances should thisManagedObjectSource
provide aCoordinatingManagedObject
.ManagedObjectExecutionMetaData[]
getExecutionMetaData()
Obtains the list ofManagedObjectExecutionMetaData
instances should theManagedObjectSource
requireExecutionStrategy
.ManagedObjectExtensionMetaData<?>[]
getExtensionInterfacesMetaData()
Obtains the meta-data regarding the extension interfaces that thisManagedObject
implements.ManagedObjectFlowMetaData<H>[]
getFlowMetaData()
Obtains the list ofManagedObjectFlowMetaData
instances should thisManagedObjectSource
require instigating aFlow
.java.lang.Class<? extends ManagedObject>
getManagedObjectClass()
java.lang.Class<?>
getObjectClass()
Obtains theClass
of the object returned fromManagedObject.getObject()
.
-
-
-
Constructor Detail
-
MockManagedObjectSourceMetaData
public MockManagedObjectSourceMetaData(ManagedObject managedObject)
Initiate from theManagedObject
.- Parameters:
managedObject
-ManagedObject
.
-
MockManagedObjectSourceMetaData
public MockManagedObjectSourceMetaData(java.lang.Class<MO> managedObjectClass, java.lang.Class<?> objectClass, java.lang.Class<D> dependencyKeys, java.util.Map<D,java.lang.Class<?>> dependencyClasses, java.lang.Class<H> flowKeys, java.util.Map<H,java.lang.Class<?>> flowClasses, java.lang.String[] executionStrategies)
Initiate.- Type Parameters:
MO
-ManagedObject
type.- Parameters:
managedObjectClass
- Class of theManagedObject
.objectClass
- Class of the object being managed.dependencyKeys
- Dependency keyEnum
.dependencyClasses
-Class
types for the dependency keys.flowKeys
- Flow keyEnum
.flowClasses
-Class
types for the arguments of the flow keys.executionStrategies
- Names of theExecutionStrategy
instances.
-
-
Method Detail
-
getManagedObjectClass
public java.lang.Class<? extends ManagedObject> getManagedObjectClass()
Description copied from interface:ManagedObjectSourceMetaData
Obtains the
Class
of theManagedObject
instances from theManagedObjectSource
.This is to enable coupled configuration rather than specifying in a possibly unrelated configuration file.
Note this does not prevent the configuration passed to the
ManagedObjectSource.init(ManagedObjectSourceContext)
method to specify this.Class
must however be the same given the same configuration.- Specified by:
getManagedObjectClass
in interfaceManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- Returns:
Class
of theManagedObject
.
-
getObjectClass
public java.lang.Class<?> getObjectClass()
Description copied from interface:ManagedObjectSourceMetaData
Obtains the
Class
of the object returned fromManagedObject.getObject()
.This is to enable coupled configuration rather than specifying in a possibly unrelated configuration file.
Note this does not prevent the configuration passed to the
ManagedObjectSource.init(ManagedObjectSourceContext)
method to specify this.Class
must however be the same given the same configuration.- Specified by:
getObjectClass
in interfaceManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- Returns:
- The
Class
of the object being managed by theManagedObject
.
-
getDependencyMetaData
public ManagedObjectDependencyMetaData<D>[] getDependencyMetaData()
Description copied from interface:ManagedObjectSourceMetaData
Obtains the list ofManagedObjectDependencyMetaData
instances should thisManagedObjectSource
provide aCoordinatingManagedObject
.- Specified by:
getDependencyMetaData
in interfaceManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- Returns:
- Meta-data of the required dependencies for this
ManagedObjectSource
.
-
getFlowMetaData
public ManagedObjectFlowMetaData<H>[] getFlowMetaData()
Description copied from interface:ManagedObjectSourceMetaData
Obtains the list ofManagedObjectFlowMetaData
instances should thisManagedObjectSource
require instigating aFlow
.- Specified by:
getFlowMetaData
in interfaceManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- Returns:
- Meta-data of
Flow
instances instigated by thisManagedObjectSource
.
-
getExecutionMetaData
public ManagedObjectExecutionMetaData[] getExecutionMetaData()
Description copied from interface:ManagedObjectSourceMetaData
Obtains the list ofManagedObjectExecutionMetaData
instances should theManagedObjectSource
requireExecutionStrategy
.- Specified by:
getExecutionMetaData
in interfaceManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- Returns:
- Meta-data of
ExecutionStrategy
instances required by thisManagedObjectSource
.
-
getExtensionInterfacesMetaData
public ManagedObjectExtensionMetaData<?>[] getExtensionInterfacesMetaData()
Description copied from interface:ManagedObjectSourceMetaData
Obtains the meta-data regarding the extension interfaces that thisManagedObject
implements.- Specified by:
getExtensionInterfacesMetaData
in interfaceManagedObjectSourceMetaData<D extends java.lang.Enum<D>,H extends java.lang.Enum<H>>
- Returns:
- Meta-data regarding the extension interfaces that this
ManagedObject
implements.
-
-