Package org.exoplatform.services.rest
Class PerRequestObjectFactory<T extends ObjectModel>
java.lang.Object
org.exoplatform.services.rest.PerRequestObjectFactory<T>
- Type Parameters:
T- ObjectModel extensions
- All Implemented Interfaces:
ObjectFactory<T>
public class PerRequestObjectFactory<T extends ObjectModel>
extends Object
implements ObjectFactory<T>
Provide object's instance of component that support per-request lifecycle.
- Version:
- $Id: $
- Author:
- Andrey Parfonov
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(ApplicationContext context) Create object instance.
-
Field Details
-
model
Object model that at least gives possibility to create object instance. Should provide full set of available constructors and object fields.- See Also:
-
-
Constructor Details
-
PerRequestObjectFactory
- Parameters:
model- any extension of ObectModel
-
-
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
-