com.arsdigita.cms.lifecycle
Class NotifyLifecycleListener

java.lang.Object
  extended bycom.arsdigita.cms.lifecycle.NotifyLifecycleListener
All Implemented Interfaces:
LifecycleListener

public class NotifyLifecycleListener
extends Object
implements LifecycleListener

LifecycleListener implementation which sends out a notification that the item is about to expire. Does nothing at the end of the phase.

Version:
$Id: //cms/dev/src/com/arsdigita/cms/lifecycle/NotifyLifecycleListener.java#5 $
Author:
Michael Hanisch

Field Summary
 
Fields inherited from interface com.arsdigita.cms.lifecycle.LifecycleListener
versionId
 
Constructor Summary
NotifyLifecycleListener()
           
 
Method Summary
 void begin(LifecycleEvent event)
          Handle the begin event.
protected  com.arsdigita.messaging.Message createMessage(ContentItem item, LifecycleEvent lc)
          Create the message object.
 void end(LifecycleEvent event)
          100% bug-free, empty method.
protected  com.arsdigita.kernel.UserCollection getRecipients(ContentItem item)
          Determine the set of recipients for the alerts sent by this listener, based on the content item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifyLifecycleListener

public NotifyLifecycleListener()
Method Detail

begin

public void begin(LifecycleEvent event)
Handle the begin event. This listener reacts by sending out a notification that the item is about to expire.

Specified by:
begin in interface LifecycleListener

end

public void end(LifecycleEvent event)
100% bug-free, empty method.

Specified by:
end in interface LifecycleListener
Parameters:
event - ignored

getRecipients

protected com.arsdigita.kernel.UserCollection getRecipients(ContentItem item)
Determine the set of recipients for the alerts sent by this listener, based on the content item. This methods has to apply any filters etc. to restrict the result to the correct set.

Parameters:
item - the ContentItem which the alerts are about
Returns:
a UserCollection which should receive alerts about the given item; can be null

createMessage

protected com.arsdigita.messaging.Message createMessage(ContentItem item,
                                                        LifecycleEvent lc)
Create the message object.

Parameters:
item - the item which the created Message relates to; must not be null
lc - the lifecycle event
Returns:
a Message concerning item


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC