public class ScopeObjectRegistry
extends java.lang.Object
implements java.io.Serializable, javax.servlet.http.HttpSessionActivationListener
ScopeObjectRegistry.ScopeObjectData
and can be cached on a ProcessContext (like done for portlet scope). They are transient on this object so they are not serialized.
The serializable state of objects is stored and serialized with the ScopeObjectRegistry.
To the outside a ScopeObjectRegistry.ScopeObject
is returned which contains the ScopeObjectData plus a reference to the registry, so it can extract/inject state on itself.Modifier and Type | Class and Description |
---|---|
static class |
ScopeObjectRegistry.ScopeObject
Object to hand out a scope object to the outside
|
static class |
ScopeObjectRegistry.ScopeObjectData
Objects to store instantiated objects with their local status on the server, normally in process contexts
|
static class |
ScopeObjectRegistry.ScopeState
Serializable wrapper for the scope state JSON object, ridiculously being not Java serializable
|
Constructor and Description |
---|
ScopeObjectRegistry(ObjectScope scope,
java.lang.String name,
ScopeObjectContextCreator context) |
public ScopeObjectRegistry(ObjectScope scope, java.lang.String name, ScopeObjectContextCreator context)
public java.lang.String getName()
public boolean isScopeObjectExisting(DesignResourceReference ref)
public ScopeObjectRegistry.ScopeObject getOrCreateScopeObject(WGA wga, DesignResourceReference ref, boolean isController, boolean create) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public ScopeObjectRegistry.ScopeObject getOrCreateScopeObject(WGA wga, java.lang.String name, DesignResourceReference ref, boolean isController, boolean create) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public com.google.gson.JsonObject getScopeObjectState(DesignResourceReference ref)
public com.google.gson.JsonObject removeScopeObjectState(DesignResourceReference ref)
public void setScopeObjectState(DesignResourceReference ref, com.google.gson.JsonObject state)
public void sessionDidActivate(javax.servlet.http.HttpSessionEvent arg0)
sessionDidActivate
in interface javax.servlet.http.HttpSessionActivationListener
public void sessionWillPassivate(javax.servlet.http.HttpSessionEvent arg0)
sessionWillPassivate
in interface javax.servlet.http.HttpSessionActivationListener
public boolean isInjectableControllerState(com.google.gson.JsonObject state)
public java.util.Map<DesignResourceReference,ScopeObjectRegistry.ScopeState> getScopeStates()
public java.util.Map<java.lang.String,ScopeObjectRegistry.ScopeObjectData> getScopeObjects()
public void setScopeObjects(java.util.Map<java.lang.String,ScopeObjectRegistry.ScopeObjectData> scopeObjects)
public com.google.gson.JsonObject getOrCreateScopeObjectState(DesignResourceReference ref)
public void setName(java.lang.String name)
public ScopeObjectContextCreator getScopeObjectContextCreator()
public void setScopeObjectContextCreator(ScopeObjectContextCreator scopeObjectContextCreator)