org.opencms.gwt
Class CmsGwtServiceContext

java.lang.Object
  extended by org.opencms.gwt.CmsGwtServiceContext
All Implemented Interfaces:
I_CmsEventListener

public class CmsGwtServiceContext
extends Object
implements I_CmsEventListener

This class contains the data that should be cached for a specific service class.

We cache instances of this class rather than caching instances of CmsGwtService directly because its superclass, RemoteServiceServlet, does some caching which we can't use because it doesn't take the distinction between online and offline requests into account.

Since:
8.0.0

Field Summary
 
Fields inherited from interface org.opencms.main.I_CmsEventListener
EVENT_BEFORE_PUBLISH_PROJECT, EVENT_CLEAR_CACHES, EVENT_CLEAR_OFFLINE_CACHES, EVENT_CLEAR_ONLINE_CACHES, EVENT_CLEAR_PRINCIPAL_CACHES, EVENT_FLEX_CACHE_CLEAR, EVENT_FLEX_PURGE_JSP_REPOSITORY, EVENT_FULLSTATIC_EXPORT, EVENT_GROUP_MODIFIED, EVENT_LOGIN_USER, EVENT_OU_MODIFIED, EVENT_PROJECT_MODIFIED, EVENT_PROPERTY_DEFINITION_CREATED, EVENT_PROPERTY_DEFINITION_MODIFIED, EVENT_PROPERTY_MODIFIED, EVENT_PUBLISH_PROJECT, EVENT_REBUILD_SEARCHINDEXES, EVENT_RESOURCE_AND_PROPERTIES_MODIFIED, EVENT_RESOURCE_COPIED, EVENT_RESOURCE_CREATED, EVENT_RESOURCE_DELETED, EVENT_RESOURCE_MODIFIED, EVENT_RESOURCE_MOVED, EVENT_RESOURCES_AND_PROPERTIES_MODIFIED, EVENT_RESOURCES_MODIFIED, EVENT_SITEMAP_CHANGED, EVENT_UPDATE_EXPORTS, EVENT_USER_MODIFIED, KEY_CHANGE, KEY_DBCONTEXT, KEY_GROUP_ID, KEY_GROUP_NAME, KEY_INDEX_NAMES, KEY_OU_ID, KEY_OU_NAME, KEY_PROJECTID, KEY_PUBLISHID, KEY_PUBLISHLIST, KEY_REPORT, KEY_RESOURCE, KEY_RESOURCES, KEY_USER_ACTION, KEY_USER_ID, KEY_USER_NAME, LISTENERS_FOR_ALL_EVENTS, VALUE_GROUP_MODIFIED_ACTION_CREATE, VALUE_GROUP_MODIFIED_ACTION_DELETE, VALUE_GROUP_MODIFIED_ACTION_WRITE, VALUE_OU_MODIFIED_ACTION_CREATE, VALUE_OU_MODIFIED_ACTION_DELETE, VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP, VALUE_USER_MODIFIED_ACTION_CREATE_USER, VALUE_USER_MODIFIED_ACTION_DELETE_USER, VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP, VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD, VALUE_USER_MODIFIED_ACTION_SET_OU, VALUE_USER_MODIFIED_ACTION_WRITE_USER
 
Constructor Summary
CmsGwtServiceContext(String name)
          Creates a new service context object.
 
Method Summary
 void cmsEvent(CmsEvent event)
          Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class.
protected  com.google.gwt.user.server.rpc.SerializationPolicy getSerializationPolicy(CmsObject cms, String moduleBaseURL, String strongName)
          Returns the serialization policy for the service.
protected  String getSerializationPolicyPath(CmsObject cms, String moduleBaseURL, String strongName)
          Finds the path of the serialization policy file.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsGwtServiceContext

public CmsGwtServiceContext(String name)
Creates a new service context object.

Parameters:
name - an identifier which is used for debugging
Method Detail

cmsEvent

public void cmsEvent(CmsEvent event)
Description copied from interface: I_CmsEventListener
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class.

Specified by:
cmsEvent in interface I_CmsEventListener
Parameters:
event - CmsEvent that has occurred
See Also:
I_CmsEventListener.cmsEvent(org.opencms.main.CmsEvent)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getSerializationPolicy

protected com.google.gwt.user.server.rpc.SerializationPolicy getSerializationPolicy(CmsObject cms,
                                                                                    String moduleBaseURL,
                                                                                    String strongName)
Returns the serialization policy for the service.

Parameters:
cms - the current CMS context
moduleBaseURL - the module's base URL
strongName - the strong name of the service
Returns:
the serialization policy for the given service

getSerializationPolicyPath

protected String getSerializationPolicyPath(CmsObject cms,
                                            String moduleBaseURL,
                                            String strongName)
Finds the path of the serialization policy file.

Parameters:
cms - the current CMS context
moduleBaseURL - the GWT module's base url
strongName - the strong name of the service
Returns:
the serialization policy path