Class ManagedObjectLoaderUtil
- java.lang.Object
-
- net.officefloor.compile.test.managedobject.ManagedObjectLoaderUtil
-
public class ManagedObjectLoaderUtil extends java.lang.ObjectUtility class for testing theManagedObjectSource.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classManagedObjectLoaderUtil.CollectMetaDataContextManagedObjectSourceManagedObjectSourceto enable obtaining theAbstractAsyncManagedObjectSource.MetaDataContext.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ManagedObjectTypeBuildercreateManagedObjectTypeBuilder()Creates theManagedObjectTypeBuilderto create the expectedManagedObjectType.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>
AbstractAsyncManagedObjectSource.MetaDataContext<M,F>createMetaDataContext(java.lang.Class<M> dependenciesEnum, java.lang.Class<F> flowsEnum, java.lang.String... propertyNameValues)static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>>
ManagedObjectType<M>loadManagedObjectType(java.lang.Class<S> managedObjectSourceClass, java.lang.ClassLoader classLoader, java.lang.String... propertyNameValues)Loads theManagedObjectTypefrom theManagedObjectSource.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>>
ManagedObjectType<M>loadManagedObjectType(java.lang.Class<S> managedObjectSourceClass, java.lang.String... propertyNameValues)Convenience method to load theManagedObjectTypefrom theManagedObjectSourceutilising theClassLoaderfrom the inputManagedObjectSourceclass.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>
ManagedObjectType<M>loadManagedObjectType(ManagedObjectSource<M,F> managedObjectSource, java.lang.String... propertyNameValues)Loads theManagedObjectTypefrom theManagedObjectSource.static voidsetNextOfficeFloorCompiler(OfficeFloorCompiler compiler)Specifies theOfficeFloorCompilerfor the next operation.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>>
ManagedObjectType<M>validateManagedObjectType(ManagedObjectTypeBuilder expectedManagedObjectType, java.lang.Class<S> managedObjectSourceClass, java.lang.String... propertyNameValues)Validates theManagedObjectTypecontained in theManagedObjectTypeBuilderagainst theManagedObjectTypeloaded from theManagedObjectSource.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>
ManagedObjectType<M>validateManagedObjectType(ManagedObjectTypeBuilder expectedManagedObjectType, ManagedObjectSource<M,F> managedObjectSource, java.lang.String... propertyNameValues)Validates theManagedObjectTypecontained in theManagedObjectTypeBuilderagainst theManagedObjectTypeloaded from theManagedObjectSource.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>>
PropertyListvalidateSpecification(java.lang.Class<S> managedObjectSourceClass, java.lang.String... propertyNameLabels)Validates theManagedObjectSourceSpecificationfor theManagedObjectSource.static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>
PropertyListvalidateSpecification(ManagedObjectSource<M,F> managedObjectSource, java.lang.String... propertyNameLabels)Validates theManagedObjectSourceSpecificationfor theManagedObjectSource.
-
-
-
Method Detail
-
validateSpecification
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>> PropertyList validateSpecification(ManagedObjectSource<M,F> managedObjectSource, java.lang.String... propertyNameLabels)
Validates theManagedObjectSourceSpecificationfor theManagedObjectSource.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.- Parameters:
managedObjectSource-ManagedObjectSourceclass.propertyNameLabels- Listing of name/label pairs for thePropertyinstances.- Returns:
- Loaded
PropertyList.
-
validateSpecification
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>> PropertyList validateSpecification(java.lang.Class<S> managedObjectSourceClass, java.lang.String... propertyNameLabels)
Validates theManagedObjectSourceSpecificationfor theManagedObjectSource.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.S-ManagedObjectSourcetype.- Parameters:
managedObjectSourceClass-ManagedObjectSourceclass.propertyNameLabels- Listing of name/label pairs for thePropertyinstances.- Returns:
- Loaded
PropertyList.
-
createManagedObjectTypeBuilder
public static ManagedObjectTypeBuilder createManagedObjectTypeBuilder()
Creates theManagedObjectTypeBuilderto create the expectedManagedObjectType.- Returns:
ManagedObjectTypeBuilder.
-
validateManagedObjectType
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>> ManagedObjectType<M> validateManagedObjectType(ManagedObjectTypeBuilder expectedManagedObjectType, java.lang.Class<S> managedObjectSourceClass, java.lang.String... propertyNameValues)
Validates theManagedObjectTypecontained in theManagedObjectTypeBuilderagainst theManagedObjectTypeloaded from theManagedObjectSource.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.S-ManagedObjectSourcetype.- Parameters:
expectedManagedObjectType- ExpectedManagedObjectType.managedObjectSourceClass-ManagedObjectSourceClass.propertyNameValues- Property values to configure theManagedObjectSource.- Returns:
ManagedObjectTypeloaded from theManagedObjectSource.
-
validateManagedObjectType
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>> ManagedObjectType<M> validateManagedObjectType(ManagedObjectTypeBuilder expectedManagedObjectType, ManagedObjectSource<M,F> managedObjectSource, java.lang.String... propertyNameValues)
Validates theManagedObjectTypecontained in theManagedObjectTypeBuilderagainst theManagedObjectTypeloaded from theManagedObjectSource.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.- Parameters:
expectedManagedObjectType- ExpectedManagedObjectType.managedObjectSource-ManagedObjectSourceinstance.propertyNameValues- Property values to configure theManagedObjectSource.- Returns:
ManagedObjectTypeloaded from theManagedObjectSource.
-
loadManagedObjectType
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>> ManagedObjectType<M> loadManagedObjectType(java.lang.Class<S> managedObjectSourceClass, java.lang.String... propertyNameValues)
Convenience method to load theManagedObjectTypefrom theManagedObjectSourceutilising theClassLoaderfrom the inputManagedObjectSourceclass.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.S-ManagedObjectSourcetype.- Parameters:
managedObjectSourceClass-ManagedObjectSourceclass.propertyNameValues-Propertyname/value listing.- Returns:
ManagedObjectType.
-
loadManagedObjectType
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>,S extends ManagedObjectSource<M,F>> ManagedObjectType<M> loadManagedObjectType(java.lang.Class<S> managedObjectSourceClass, java.lang.ClassLoader classLoader, java.lang.String... propertyNameValues)
Loads theManagedObjectTypefrom theManagedObjectSource.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.S-ManagedObjectSourcetype.- Parameters:
managedObjectSourceClass-ManagedObjectSourceclass.classLoader-ClassLoader.propertyNameValues-Propertyname/value listing.- Returns:
ManagedObjectType.
-
loadManagedObjectType
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>> ManagedObjectType<M> loadManagedObjectType(ManagedObjectSource<M,F> managedObjectSource, java.lang.String... propertyNameValues)
Loads theManagedObjectTypefrom theManagedObjectSource.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.- Parameters:
managedObjectSource-ManagedObjectSourceinstance.propertyNameValues-Propertyname/value listing.- Returns:
ManagedObjectType.
-
setNextOfficeFloorCompiler
public static void setNextOfficeFloorCompiler(OfficeFloorCompiler compiler)
Specifies theOfficeFloorCompilerfor the next operation.- Parameters:
compiler-OfficeFloorCompilerfor the next operation.
-
createMetaDataContext
public static <M extends java.lang.Enum<M>,F extends java.lang.Enum<F>> AbstractAsyncManagedObjectSource.MetaDataContext<M,F> createMetaDataContext(java.lang.Class<M> dependenciesEnum, java.lang.Class<F> flowsEnum, java.lang.String... propertyNameValues)
Creates a
AbstractAsyncManagedObjectSource.MetaDataContext.This is useful for testing abstract
ManagedObjectSourceinstances that delegate configuration to sub classes.- Type Parameters:
M- Dependency keys type.F-Flowkeys type.- Parameters:
dependenciesEnum- DependencyEnum.flowsEnum- FlowsEnum.propertyNameValues- Property name values for theAbstractAsyncManagedObjectSource.MetaDataContext.- Returns:
AbstractAsyncManagedObjectSource.MetaDataContext.
-
-