Hooking new resource / publish resource events

View: New views
4 Messages — Rating Filter:   Alert me  

Hooking new resource / publish resource events

by Chuck Mysak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello list,

is there a way using the OpenCms API to catch the event of creating a new resource and/or publishing that resource?
The desired scenario would be to update a custom set of resources (xml or db or resource property) when a user creates/edits/deletes/publishes a resource.

Regards,
Chuck


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev

Re: Hooking new resource / publish resource events

by Christian Steinert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chuck Mysak wrote:
Hello list,

is there a way using the OpenCms API to catch the event of creating a new
resource and/or publishing that resource?
The desired scenario would be to update a custom set of resources (xml or db
or resource property) when a user creates/edits/deletes/publishes a
resource.

  
Please take a look at the I_CmsEventListener interface for a list of all opencms events. There are MANY events, including the one you are looking for:

http://www.opencms.org/javadoc/core/org/opencms/main/I_CmsEventListener.html


Best Regards
Christian

  

_______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev



_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev

Re: Hooking new resource / publish resource events

by Christian Steinert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

P.S. if you wonder how to register a self-written event listener class
with opencms at runtime: the usual way is to create a module (probably
you already have one), and then write and configure a module action
class for it.

Then, upon initialization, the module action class can register your
event listener with opencms. An example of doing the latter is contained
in the javadocs of I_CmsEventListener

hth
Christian

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev

Re: Hooking new resource / publish resource events

by Chuck Mysak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Christian!

On Mon, Nov 2, 2009 at 1:31 PM, Christian Steinert <christian_steinert@...> wrote:
Chuck Mysak wrote:
Hello list,

is there a way using the OpenCms API to catch the event of creating a new
resource and/or publishing that resource?
The desired scenario would be to update a custom set of resources (xml or db
or resource property) when a user creates/edits/deletes/publishes a
resource.

  
Please take a look at the I_CmsEventListener interface for a list of all opencms events. There are MANY events, including the one you are looking for:

http://www.opencms.org/javadoc/core/org/opencms/main/I_CmsEventListener.html


Best Regards

Christian

  

_______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please visit http://lists.opencms.org/mailman/listinfo/opencms-dev



_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev



_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev