Package org.exoplatform.services.rest
Class SingletonObjectFactory<T extends ObjectModel>
java.lang.Object
org.exoplatform.services.rest.SingletonObjectFactory<T>
- Type Parameters:
T-
- All Implemented Interfaces:
ObjectFactory<T>
public class SingletonObjectFactory<T extends ObjectModel>
extends Object
implements ObjectFactory<T>
Provide object instance of components that support singleton lifecycle.
- Version:
- $Id: $
- Author:
- Andrey Parfonov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(ApplicationContext context) Create object instance.
-
Field Details
-
model
- See Also:
-
object
Component instance.
-
-
Constructor Details
-
SingletonObjectFactory
- Parameters:
model- ObjectModeobject- component instance
-
-
Method Details
-
getInstance
Create object instance. ApplicationContext can be used for getting required parameters for object constructors or fields.- Specified by:
getInstancein interfaceObjectFactory<T extends ObjectModel>- Parameters:
context- ApplicationContext- Returns:
- object instance
-
getObjectModel
- Specified by:
getObjectModelin interfaceObjectFactory<T extends ObjectModel>- Returns:
- any extension of
ObjectModel. That must allows create object instance and initialize object's fields for per-request resources
-