|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Implement this interface in case your class has to react to CmsEvents that are thrown by system.
In order to recieve system events, your class must register with the OpenCms event mechanism. This can be done in the constructor of a class like this:
com.opencms.core.A_OpenCms.addCmsEventListener(this);A typical implementation might look like this:
public void cmsEvent(com.opencms.flex.CmsEvent event) {
switch (event.getType()) {
case com.opencms.flex.I_CmsEventListener.EVENT_PUBLISH_PROJECT:
case com.opencms.flex.I_CmsEventListener.EVENT_CLEAR_CACHES:
// do something
break;
case com.opencms.flex.I_CmsEventListener.EVENT_LOGIN_USER:
// do something else
break;
}
}
CmsEvent,
A_OpenCms.addCmsEventListener(I_CmsEventListener)| Field Summary | |
static int |
EVENT_CLEAR_CACHES
Event "all caches mut be cleared". |
static int |
EVENT_FLEX_CACHE_CLEAR
Event "the FlexCache must be cleared". |
static int |
EVENT_FLEX_CLUSTER_CHECK_SOURCE
Event used by the Flex Cluster Module. |
static int |
EVENT_FLEX_CLUSTER_HOOK
Event used by the Flex Cluster Module. |
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_LOGIN_USER
Event "user has logged in". |
static int |
EVENT_PUBLISH_BO_RESOURCE
Event "a resource in the COS was published". |
static int |
EVENT_PUBLISH_PROJECT
Event "a project was published". |
static int |
EVENT_PUBLISH_RESOURCE
Event "a resource was published". |
static int |
EVENT_STATIC_EXPORT
Event "static export has just happened" |
| Method Summary | |
void |
cmsEvent(CmsEvent event)
Acknowledge the occurrence of the specified event, implement this method to check for CmsEvents in your class. |
| Field Detail |
public static final int EVENT_LOGIN_USER
CmsObject.loginUser(String, String),
Constant Field Valuespublic static final int EVENT_PUBLISH_PROJECT
CmsObject.publishProject(int, I_CmsReport),
Constant Field Valuespublic static final int EVENT_PUBLISH_RESOURCE
CmsObject.publishResource(String, boolean),
Constant Field Valuespublic static final int EVENT_PUBLISH_BO_RESOURCE
CmsMasterContent.publishResource(CmsObject),
Constant Field Valuespublic static final int EVENT_CLEAR_CACHES
Not thrown by the core classes, but might be used in modules.
public static final int EVENT_FLEX_CLUSTER_CHECK_SOURCE
public static final int EVENT_FLEX_CLUSTER_HOOK
public static final int EVENT_FLEX_PURGE_JSP_REPOSITORY
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.
public static final int EVENT_FLEX_CACHE_CLEAR
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.
public static final int EVENT_STATIC_EXPORT
CmsObject.publishProject(int, I_CmsReport),
Constant Field Values| Method Detail |
public void cmsEvent(CmsEvent event)
event - CmsEvent that has occurred
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||