Interface I_CmsEventListener
-
- All Known Subinterfaces:
I_CmsModuleAction
- All Known Implementing Classes:
A_CmsModuleAction
,CmsADECache
,CmsDriverManager
,CmsExplorerTypeAccessFlushListener
,CmsFlexCache
,CmsGlobalConfigurationCacheEventHandler
,CmsGwtServiceContext
,CmsIconUtil
,CmsImageLoader
,CmsJspLoader
,CmsLocaleManager
,CmsMemoryObjectCache
,CmsSearchManager
,CmsSearchManager.CmsSearchOfflineHandler
,CmsSiteManagerImpl
,CmsStaticExportManager
,CmsVfsBundleManager
,CmsVfsCache
,CmsVfsMemoryObjectCache
,CmsWorkplaceManager
,CmsXmlEntityResolver
public interface I_CmsEventListener
Implement this interface in case your class has to react to CmsEvents that are thrown by system.In order to receive system events, your class must register with the OpenCms event mechanism. This can be done in the constructor of a class like this:
org.opencms.main.OpenCms.addCmsEventListener(this);
A typical implementation might look like this:public void cmsEvent(org.opencms.main.CmsEvent event) { switch (event.getType()) { case org.opencms.main.I_CmsEventListener.EVENT_PUBLISH_PROJECT: case org.opencms.main.I_CmsEventListener.EVENT_CLEAR_CACHES: // do something break; case org.opencms.main.I_CmsEventListener.EVENT_LOGIN_USER: // do something else break; } }
-
-
Field Summary
Fields Modifier and Type Field Description static int
EVENT_BEFORE_PUBLISH_PROJECT
Event "a project is to published" (but has not yet been published).static int
EVENT_CLEAR_CACHES
Event "all caches must be cleared".static int
EVENT_CLEAR_OFFLINE_CACHES
Event "clear all offline caches".static int
EVENT_CLEAR_ONLINE_CACHES
Event "clear all online caches".static int
EVENT_CLEAR_PRINCIPAL_CACHES
Event "all caches related to user and groups must be cleared".static int
EVENT_FLEX_CACHE_CLEAR
Event "the FlexCache must be cleared".static int
EVENT_FLEX_PURGE_JSP_REPOSITORY
Event "delete all JSP pages in the "real" file system (so they will be rebuild next time the JSP is requested)".static int
EVENT_FULLSTATIC_EXPORT
Event "full static export".static int
EVENT_GROUP_MODIFIED
Event "group modified".static int
EVENT_LOGIN_USER
Event "user has logged in".static int
EVENT_OU_MODIFIED
Event "ou modified".static int
EVENT_PROJECT_MODIFIED
Event "a project was modified" (e.g.static int
EVENT_PROPERTY_DEFINITION_CREATED
Event "a property definition has been created".static int
EVENT_PROPERTY_DEFINITION_MODIFIED
Event "a property definition has been modified".static int
EVENT_PROPERTY_MODIFIED
Event "a single property (and so the resource itself, too) have been modified".static int
EVENT_PUBLISH_PROJECT
Event "a project was published".static int
EVENT_REBUILD_SEARCHINDEXES
Event "rebuild search indexes".static int
EVENT_REINDEX_OFFLINE
Event "reindex" in an offline project.static int
EVENT_REINDEX_ONLINE
Event "reindex" in the online project.static int
EVENT_RESOURCE_AND_PROPERTIES_MODIFIED
Event "all properties (and so the resource itself, too) have been modified".static int
EVENT_RESOURCE_COPIED
static int
EVENT_RESOURCE_CREATED
static int
EVENT_RESOURCE_DELETED
static int
EVENT_RESOURCE_MODIFIED
Event "a single resource has been modified".static int
EVENT_RESOURCE_MOVED
static int
EVENT_RESOURCES_AND_PROPERTIES_MODIFIED
Event "a list of resources and their properties have been modified".static int
EVENT_RESOURCES_MODIFIED
Event "a bunch of resources has been modified".static int
EVENT_SITEMAP_CHANGED
Event "a sitemap has been modified".static int
EVENT_UPDATE_EXPORTS
Event "update exported resources".static int
EVENT_USER_MODIFIED
Event "user modified".static java.lang.String
KEY_CHANGE
Key name for passing a change int in the data map - see theCHANGED_XXX
constants inCmsDriverManager
.static java.lang.String
KEY_DBCONTEXT
Key name for passing a database context in the data map.static java.lang.String
KEY_GROUP_ID
Key name for passing a group ID.static java.lang.String
KEY_GROUP_NAME
Key name for passing a group name.static java.lang.String
KEY_INDEX_NAMES
Key name for passing a comma separated list of search index names in the data map.static java.lang.String
KEY_IS_ONLINE
Key name for passing a flag, indicating if we are in the online project.static java.lang.String
KEY_OU_ID
Key name for passing an OU ID.static java.lang.String
KEY_OU_NAME
Key name for passing a group name.static java.lang.String
KEY_PROJECTID
Key name for passing a project id in the data map.static java.lang.String
KEY_PUBLISHID
Key name for passing a publish history id in the data map.static java.lang.String
KEY_PUBLISHLIST
Key name for passing a publish list in the data map.static java.lang.String
KEY_REINDEX_RELATED
Key name for passing a flag, indicating if related resources should be taken into account in the data map.static java.lang.String
KEY_REPORT
Key name for passing a report in the data map.static java.lang.String
KEY_RESOURCE
Key name for passing aCmsResource
in the data map.static java.lang.String
KEY_RESOURCES
Key name for passing a List ofCmsResource
in the data map.static java.lang.String
KEY_SKIPINDEX
Key name for skipping searchindexing.static java.lang.String
KEY_USER_ACTION
Key name for passing a user action.static java.lang.String
KEY_USER_CHANGES
Key name for passing user changes flag.static java.lang.String
KEY_USER_ID
Key name for passing an user ID.static java.lang.String
KEY_USER_NAME
Key name for passing a user name.static java.lang.Integer
LISTENERS_FOR_ALL_EVENTS
Marker for "all events".static java.lang.String
VALUE_CREATE_SIBLING
Value to mark modification events from sibling creation.static java.lang.String
VALUE_GROUP_MODIFIED_ACTION_CREATE
Value for the "group modified" action.static java.lang.String
VALUE_GROUP_MODIFIED_ACTION_DELETE
Value for the "group modified" action.static java.lang.String
VALUE_GROUP_MODIFIED_ACTION_WRITE
Value for the "group modified" action.static java.lang.String
VALUE_OU_MODIFIED_ACTION_CREATE
Value for the "ou modified" action.static java.lang.String
VALUE_OU_MODIFIED_ACTION_DELETE
Value for the "ou modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP
Value for the "user modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_CREATE_USER
Value for the "user modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_DELETE_USER
Value for the "user modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP
Value for the "user modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD
Value for the "user modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_SET_OU
Value for the "user modified" action.static java.lang.String
VALUE_USER_MODIFIED_ACTION_WRITE_USER
Value for the "user modified" action.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cmsEvent(CmsEvent event)
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class.
-
-
-
Field Detail
-
EVENT_BEFORE_PUBLISH_PROJECT
static final int EVENT_BEFORE_PUBLISH_PROJECT
Event "a project is to published" (but has not yet been published).Event data:
: aKEY_REPORT
to print output messages toI_CmsReport
: aKEY_PUBLISHLIST
that contains the resources that are to be publishedCmsPublishList
: the ID of the project that is to be publishedKEY_PROJECTID
: the current users database contextKEY_DBCONTEXT
-
EVENT_CLEAR_CACHES
static final int EVENT_CLEAR_CACHES
Event "all caches must be cleared".Not thrown by the core classes, but might be used in modules.
- See Also:
- Constant Field Values
-
EVENT_CLEAR_OFFLINE_CACHES
static final int EVENT_CLEAR_OFFLINE_CACHES
Event "clear all offline caches".Event data: none
- See Also:
- Constant Field Values
-
EVENT_CLEAR_ONLINE_CACHES
static final int EVENT_CLEAR_ONLINE_CACHES
Event "clear all online caches".Event data: none
- See Also:
- Constant Field Values
-
EVENT_CLEAR_PRINCIPAL_CACHES
static final int EVENT_CLEAR_PRINCIPAL_CACHES
Event "all caches related to user and groups must be cleared".Not thrown by the core classes, but might be used in modules.
- See Also:
- Constant Field Values
-
EVENT_FLEX_CACHE_CLEAR
static final int EVENT_FLEX_CACHE_CLEAR
Event "the FlexCache must be cleared".This is thrown on the "FlexCache Administration" page if you press one ot the "Clear cache" buttons, or if you use the
_flex=clearcache
request parameter.- See Also:
- Constant Field Values
-
EVENT_FLEX_PURGE_JSP_REPOSITORY
static final int EVENT_FLEX_PURGE_JSP_REPOSITORY
Event "delete all JSP pages in the "real" file system (so they will be rebuild next time the JSP is requested)".This is thrown on the "FlexCache Administration" page if you press the button "Purge JSP repository", or if you use the
_flex=purge
request parameter.- See Also:
- Constant Field Values
-
EVENT_FULLSTATIC_EXPORT
static final int EVENT_FULLSTATIC_EXPORT
Event "full static export".This is thrown in
CmsStaticExportManager
. Event data:- key "purge": the boolean value to purge the export folders first
: aKEY_REPORT
to print output messages toI_CmsReport
- See Also:
- Constant Field Values
-
EVENT_GROUP_MODIFIED
static final int EVENT_GROUP_MODIFIED
Event "group modified".Includes create, write and delete group.
Event data:
- key "id": the uuid of the modified group
- key "groupname": the name of the modified group
- key "useraction": the name of the action to do on the replicated server
- createGroup
- writeGroup
- deleteGroup
- See Also:
- Constant Field Values
-
EVENT_LOGIN_USER
static final int EVENT_LOGIN_USER
Event "user has logged in".Event data:
- key "data" (mandatory): the user who was logged in
-
EVENT_OU_MODIFIED
static final int EVENT_OU_MODIFIED
Event "ou modified".Includes create OU and delete OU.
Event data:
- key "id": the uuid of the modified ou
- key "ouname": the name of the modified ou
- key "useraction": the name of the action to do on the replicated server
- createOu
- deleteOu
- See Also:
- Constant Field Values
-
EVENT_PROJECT_MODIFIED
static final int EVENT_PROJECT_MODIFIED
Event "a project was modified" (e.g. a project has been deleted, or the project resources have been changed).Event data:
- key "project" (mandatory): the deleted CmsProject
- See Also:
- Constant Field Values
-
EVENT_PROPERTY_DEFINITION_CREATED
static final int EVENT_PROPERTY_DEFINITION_CREATED
Event "a property definition has been created".Event data:
- key "propertyDefinition" (mandatory): the modified property definition
- See Also:
- Constant Field Values
-
EVENT_PROPERTY_DEFINITION_MODIFIED
static final int EVENT_PROPERTY_DEFINITION_MODIFIED
Event "a property definition has been modified".Event data:
- key "propertyDefinition" (mandatory): the modified property definition
- See Also:
- Constant Field Values
-
EVENT_PROPERTY_MODIFIED
static final int EVENT_PROPERTY_MODIFIED
Event "a single property (and so the resource itself, too) have been modified".Event data:
- key "resource" (mandatory): the CmsResource that has the modified property attached
- key "property" (mandatory): the modified property
- See Also:
- Constant Field Values
-
EVENT_PUBLISH_PROJECT
static final int EVENT_PUBLISH_PROJECT
Event "a project was published".Event data:
: aKEY_REPORT
to print output messages toI_CmsReport
: the ID of the publish task in the publish historyKEY_PUBLISHID
: the ID of the project that has been publishedKEY_PROJECTID
: the current users database contextKEY_DBCONTEXT
-
EVENT_REBUILD_SEARCHINDEXES
static final int EVENT_REBUILD_SEARCHINDEXES
Event "rebuild search indexes".Event data:
: aKEY_REPORT
to print output messages toI_CmsReport
: a comma separated list of names of the search indexes to rebuild, empty for all indexesKEY_INDEX_NAMES
- See Also:
- Constant Field Values
-
EVENT_REINDEX_ONLINE
static final int EVENT_REINDEX_ONLINE
Event "reindex" in the online project.Note we split offline/online in two events since only for the online project, the event has to be forwarded in a cluster.
Event data:
: a list ofKEY_RESOURCES
CmsResource
.
: aKEY_REPORT
to print output messages toI_CmsReport
: id of the user triggering the action. Used to show a message on success/failure.KEY_USER_ID
: flag, indicating if related resources should be reindexed as well.KEY_REINDEX_RELATED
- See Also:
- Constant Field Values
-
EVENT_REINDEX_OFFLINE
static final int EVENT_REINDEX_OFFLINE
Event "reindex" in an offline project.Note we split offline/online in two events since only for the online project, the event has to be forwarded in a cluster.
Event data:
: a list ofKEY_RESOURCES
CmsResource
.
: the id of the project re-indexing is triggered in.KEY_PROJECTID
: aKEY_REPORT
to print output messages toI_CmsReport
: id of the user triggering the action. Used to show a message on success/failure.KEY_USER_ID
: flag, indicating if related resources should be reindexed as well.KEY_REINDEX_RELATED
- See Also:
- Constant Field Values
-
EVENT_RESOURCE_AND_PROPERTIES_MODIFIED
static final int EVENT_RESOURCE_AND_PROPERTIES_MODIFIED
Event "all properties (and so the resource itself, too) have been modified".Event data:
- key "resource" (mandatory): the CmsResource that has the modified properties attached
- See Also:
- Constant Field Values
-
EVENT_RESOURCE_COPIED
static final int EVENT_RESOURCE_COPIED
- See Also:
EVENT_RESOURCES_MODIFIED
, Constant Field Values
-
EVENT_RESOURCE_CREATED
static final int EVENT_RESOURCE_CREATED
-
EVENT_RESOURCE_DELETED
static final int EVENT_RESOURCE_DELETED
- See Also:
EVENT_RESOURCES_MODIFIED
, Constant Field Values
-
EVENT_RESOURCE_MODIFIED
static final int EVENT_RESOURCE_MODIFIED
Event "a single resource has been modified".Event data:
- key "resource" (mandatory): the modified CmsResource
- See Also:
- Constant Field Values
-
EVENT_RESOURCE_MOVED
static final int EVENT_RESOURCE_MOVED
-
EVENT_RESOURCES_AND_PROPERTIES_MODIFIED
static final int EVENT_RESOURCES_AND_PROPERTIES_MODIFIED
Event "a list of resources and their properties have been modified".Event data:
- key "resources" (mandatory): a List of modified CmsResources
- See Also:
- Constant Field Values
-
EVENT_RESOURCES_MODIFIED
static final int EVENT_RESOURCES_MODIFIED
Event "a bunch of resources has been modified".Event data:
- key "resources" (mandatory): a List of modified CmsResources
- See Also:
- Constant Field Values
-
EVENT_SITEMAP_CHANGED
static final int EVENT_SITEMAP_CHANGED
Event "a sitemap has been modified".Event data:
- key "resources" (mandatory): a List of modified sitemap entries identified by their root path
- See Also:
- Constant Field Values
-
EVENT_UPDATE_EXPORTS
static final int EVENT_UPDATE_EXPORTS
Event "update exported resources".This event updates all export points, deletes the content of the "export" folder, purges the JSP repository, and clears all caches.
This event is for internal use.
- See Also:
- Constant Field Values
-
EVENT_USER_MODIFIED
static final int EVENT_USER_MODIFIED
Event "user modified".Event data:
- key "id": the uuid of the modified user
- key "username": the name of the modified user
- key "groupname": the name of the group which is effected
- key "useraction": the name of the action to do on the replicated server
- createUser
- writeUser
- deleteUser
- setOu
- addUserToGroup
- removeUserFromGroup
- resetPassword
- See Also:
- Constant Field Values
-
KEY_CHANGE
static final java.lang.String KEY_CHANGE
Key name for passing a change int in the data map - see theCHANGED_XXX
constants inCmsDriverManager
.- See Also:
- Constant Field Values
-
KEY_DBCONTEXT
static final java.lang.String KEY_DBCONTEXT
Key name for passing a database context in the data map.- See Also:
- Constant Field Values
-
KEY_GROUP_ID
static final java.lang.String KEY_GROUP_ID
Key name for passing a group ID.- See Also:
- Constant Field Values
-
KEY_GROUP_NAME
static final java.lang.String KEY_GROUP_NAME
Key name for passing a group name.- See Also:
- Constant Field Values
-
KEY_INDEX_NAMES
static final java.lang.String KEY_INDEX_NAMES
Key name for passing a comma separated list of search index names in the data map.- See Also:
- Constant Field Values
-
KEY_IS_ONLINE
static final java.lang.String KEY_IS_ONLINE
Key name for passing a flag, indicating if we are in the online project.- See Also:
- Constant Field Values
-
KEY_OU_ID
static final java.lang.String KEY_OU_ID
Key name for passing an OU ID.- See Also:
- Constant Field Values
-
KEY_OU_NAME
static final java.lang.String KEY_OU_NAME
Key name for passing a group name.- See Also:
- Constant Field Values
-
KEY_PROJECTID
static final java.lang.String KEY_PROJECTID
Key name for passing a project id in the data map.- See Also:
- Constant Field Values
-
KEY_PUBLISHID
static final java.lang.String KEY_PUBLISHID
Key name for passing a publish history id in the data map.- See Also:
- Constant Field Values
-
KEY_PUBLISHLIST
static final java.lang.String KEY_PUBLISHLIST
Key name for passing a publish list in the data map.- See Also:
- Constant Field Values
-
KEY_REINDEX_RELATED
static final java.lang.String KEY_REINDEX_RELATED
Key name for passing a flag, indicating if related resources should be taken into account in the data map.- See Also:
- Constant Field Values
-
KEY_REPORT
static final java.lang.String KEY_REPORT
Key name for passing a report in the data map.- See Also:
- Constant Field Values
-
KEY_RESOURCE
static final java.lang.String KEY_RESOURCE
Key name for passing aCmsResource
in the data map.- See Also:
- Constant Field Values
-
KEY_RESOURCES
static final java.lang.String KEY_RESOURCES
Key name for passing a List ofCmsResource
in the data map.- See Also:
- Constant Field Values
-
KEY_SKIPINDEX
static final java.lang.String KEY_SKIPINDEX
Key name for skipping searchindexing.- See Also:
- Constant Field Values
-
KEY_USER_ACTION
static final java.lang.String KEY_USER_ACTION
Key name for passing a user action.- See Also:
- Constant Field Values
-
KEY_USER_CHANGES
static final java.lang.String KEY_USER_CHANGES
Key name for passing user changes flag.- See Also:
- Constant Field Values
-
KEY_USER_ID
static final java.lang.String KEY_USER_ID
Key name for passing an user ID.- See Also:
- Constant Field Values
-
KEY_USER_NAME
static final java.lang.String KEY_USER_NAME
Key name for passing a user name.- See Also:
- Constant Field Values
-
LISTENERS_FOR_ALL_EVENTS
static final java.lang.Integer LISTENERS_FOR_ALL_EVENTS
Marker for "all events".
-
VALUE_GROUP_MODIFIED_ACTION_CREATE
static final java.lang.String VALUE_GROUP_MODIFIED_ACTION_CREATE
Value for the "group modified" action.- See Also:
- Constant Field Values
-
VALUE_GROUP_MODIFIED_ACTION_DELETE
static final java.lang.String VALUE_GROUP_MODIFIED_ACTION_DELETE
Value for the "group modified" action.- See Also:
- Constant Field Values
-
VALUE_GROUP_MODIFIED_ACTION_WRITE
static final java.lang.String VALUE_GROUP_MODIFIED_ACTION_WRITE
Value for the "group modified" action.- See Also:
- Constant Field Values
-
VALUE_OU_MODIFIED_ACTION_CREATE
static final java.lang.String VALUE_OU_MODIFIED_ACTION_CREATE
Value for the "ou modified" action.- See Also:
- Constant Field Values
-
VALUE_OU_MODIFIED_ACTION_DELETE
static final java.lang.String VALUE_OU_MODIFIED_ACTION_DELETE
Value for the "ou modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP
static final java.lang.String VALUE_USER_MODIFIED_ACTION_ADD_USER_TO_GROUP
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_CREATE_USER
static final java.lang.String VALUE_USER_MODIFIED_ACTION_CREATE_USER
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_DELETE_USER
static final java.lang.String VALUE_USER_MODIFIED_ACTION_DELETE_USER
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP
static final java.lang.String VALUE_USER_MODIFIED_ACTION_REMOVE_USER_FROM_GROUP
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD
static final java.lang.String VALUE_USER_MODIFIED_ACTION_RESET_PASSWORD
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_SET_OU
static final java.lang.String VALUE_USER_MODIFIED_ACTION_SET_OU
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_USER_MODIFIED_ACTION_WRITE_USER
static final java.lang.String VALUE_USER_MODIFIED_ACTION_WRITE_USER
Value for the "user modified" action.- See Also:
- Constant Field Values
-
VALUE_CREATE_SIBLING
static final java.lang.String VALUE_CREATE_SIBLING
Value to mark modification events from sibling creation.- See Also:
- Constant Field Values
-
-