|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.opensuit.xml.spring.PageContext
public class PageContext
This class implements "page" scope for the Spring Framework. This customised scope, specify to Spring that bean affected with this scope are managed/hold just in the current page context. When the page context is reinitialized the bean is recreate. In order to add this scope to you application, add the following to your configuration:
Constructor Summary | |
---|---|
PageContext()
|
Method Summary | |
---|---|
Object |
get(String name,
org.springframework.beans.factory.ObjectFactory objectFactory)
The main purpose of this method, is to retrieve the attribute linked with the name provided in function parameter. |
String |
getConversationId()
|
void |
registerDestructionCallback(String name,
Runnable callback)
This method implements a destruction callback linked to, the page context scope. |
Object |
remove(String name)
Remove the object with the given name from the
page context scope. |
Object |
resolveContextualObject(String key)
Spring 3.0.x |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageContext()
Method Detail |
---|
public Object get(String name, org.springframework.beans.factory.ObjectFactory objectFactory)
name
provided in function parameter. If no attached attribute
was retrieved to the page context, an instance (possibly shared or
independent) of the object managed by this factory can be return.
get
in interface org.springframework.beans.factory.config.Scope
name
- represent the name attribute which will be search into
page context.objectFactory
- Defines a factory which can return an Object
instance (possibly shared or independent) when invoked.
null
)Scope.get(String, ObjectFactory)
public String getConversationId()
getConversationId
in interface org.springframework.beans.factory.config.Scope
Scope.getConversationId()
public void registerDestructionCallback(String name, Runnable callback)
registerDestructionCallback
in interface org.springframework.beans.factory.config.Scope
name
- the name of the object located in the page
context scope to execute the destruction callbackcallback
- the destruction callback to be executed.Scope.registerDestructionCallback(String, Runnable)
public Object remove(String name)
name
from the
page context scope.
Returns null
if no object was found; otherwise
returns the removed Object
from page context.
remove
in interface org.springframework.beans.factory.config.Scope
name
- the name of the object to remove from page context
null
if object
wasn't present in page contextScope.remove(String)
public Object resolveContextualObject(String key)
resolveContextualObject
in interface org.springframework.beans.factory.config.Scope
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |