Class ClassManagedObject
- java.lang.Object
-
- net.officefloor.plugin.managedobject.clazz.ClassManagedObject
-
- All Implemented Interfaces:
ContextAwareManagedObject
,CoordinatingManagedObject<Indexed>
,ManagedObject
public class ClassManagedObject extends java.lang.Object implements ContextAwareManagedObject, CoordinatingManagedObject<Indexed>
CoordinatingManagedObject
to dependency inject theObject
instance and make it available for use.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClassManagedObject(ClassObjectFactory objectFactory)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getObject()
Obtains the object being managed.void
loadObjects(ObjectRegistry<Indexed> registry)
Loads the Objects of theManagedObject
instances to be referenced by thisCoordinatingManagedObject
.void
setManagedObjectContext(ManagedObjectContext context)
Provides theManagedObjectContext
to theManagedObject
.
-
-
-
Constructor Detail
-
ClassManagedObject
public ClassManagedObject(ClassObjectFactory objectFactory)
Instantiate.- Parameters:
objectFactory
-ClassObjectFactory
.
-
-
Method Detail
-
setManagedObjectContext
public void setManagedObjectContext(ManagedObjectContext context)
Description copied from interface:ContextAwareManagedObject
Provides theManagedObjectContext
to theManagedObject
.- Specified by:
setManagedObjectContext
in interfaceContextAwareManagedObject
- Parameters:
context
-ManagedObjectContext
.
-
loadObjects
public void loadObjects(ObjectRegistry<Indexed> registry) throws java.lang.Throwable
Description copied from interface:CoordinatingManagedObject
Loads the Objects of the
ManagedObject
instances to be referenced by thisCoordinatingManagedObject
.References to the loaded Objects must be released on recycling the
ManagedObject
.- Specified by:
loadObjects
in interfaceCoordinatingManagedObject<Indexed>
- Parameters:
registry
- Registry of the Objects for theManagedObject
instances.- Throws:
java.lang.Throwable
- Should thisCoordinatingManagedObject
fail to load theManagedObject
.
-
getObject
public java.lang.Object getObject()
Description copied from interface:ManagedObject
Obtains the object being managed.- Specified by:
getObject
in interfaceManagedObject
- Returns:
- Object being managed.
-
-