com.jalios.jcms
Class WFAction

java.lang.Object
  extended by com.jalios.jcms.WFAction
Direct Known Subclasses:
WFAction.AlertAdmins, WFAction.AlertAuthor, WFAction.AlertWorkers

public abstract class WFAction
extends Object

This abstract class represents a workflow action attached to a WFState.

Since:
jcms-2.1
Version:
$Revision: 29807 $
Author:
Olivier Dedieu

Nested Class Summary
static class WFAction.AlertAdmins
           
static class WFAction.AlertAuthor
           
static class WFAction.AlertWorkers
           
 
Field Summary
static String EVENT_IN
           
static String EVENT_OUT
           
protected  long repeatTime
           
static String REVISION
           
static String TYPE_ALERT_ADMINS
           
static String TYPE_ALERT_AUTHOR
           
static String TYPE_ALERT_WORKERS
           
static String WF_ALERT_ADMIN_MAILORIGIN
          MailMessage origin for workflow alert concerning administrator.
static String WF_ALERT_AUTHOR_MAILORIGIN
          MailMessage origin for workflow alert concerning author.
static String WF_ALERT_PUBLICATION
          Key used in context Map of MailMessage.send(java.util.HashMap) method to store the publication for which the workflow alert mail is being sent.
static String WF_ALERT_WORKER_MAILORIGIN
          MailMessage origin for workflow alert concerning worker.
 
Constructor Summary
WFAction()
           
 
Method Summary
static WFAction getInstance(String type, WFState state)
           
 long getRepeatTime()
           
abstract  String getType()
           
abstract  void perform(Publication pub, boolean isReminder)
           
 void setRepeatTime(long v)
           
abstract  String toString(String userLang)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

EVENT_IN

public static final String EVENT_IN
See Also:
Constant Field Values

EVENT_OUT

public static final String EVENT_OUT
See Also:
Constant Field Values

TYPE_ALERT_AUTHOR

public static final String TYPE_ALERT_AUTHOR
See Also:
Constant Field Values

TYPE_ALERT_WORKERS

public static final String TYPE_ALERT_WORKERS
See Also:
Constant Field Values

TYPE_ALERT_ADMINS

public static final String TYPE_ALERT_ADMINS
See Also:
Constant Field Values

WF_ALERT_AUTHOR_MAILORIGIN

public static final String WF_ALERT_AUTHOR_MAILORIGIN
MailMessage origin for workflow alert concerning author.

Since:
jcms-7.0.0
See Also:
Constant Field Values

WF_ALERT_WORKER_MAILORIGIN

public static final String WF_ALERT_WORKER_MAILORIGIN
MailMessage origin for workflow alert concerning worker.

Since:
jcms-7.0.0
See Also:
Constant Field Values

WF_ALERT_ADMIN_MAILORIGIN

public static final String WF_ALERT_ADMIN_MAILORIGIN
MailMessage origin for workflow alert concerning administrator.

Since:
jcms-7.0.0
See Also:
Constant Field Values

WF_ALERT_PUBLICATION

public static final String WF_ALERT_PUBLICATION
Key used in context Map of MailMessage.send(java.util.HashMap) method to store the publication for which the workflow alert mail is being sent.

Example of use in a MailPolicyFilter

 public boolean beforeSendMail(MailMessage msg, HashMap ctxt) {
   if (WF_ALERT_AUTHOR_MAILORIGIN.equals(msg.getOrigin()) ||
       WF_ALERT_WORKER_MAILORIGIN.equals(msg.getOrigin()) ||
       WF_ALERT_ADMIN_MAILORIGIN.equals(msg.getOrigin())) {
     Publication pub = (Publication) ctxt.get(WFAction.WF_ALERT_PUBLICATION);
     [...]
   }
   return true;
 }
 

Since:
jcms-7.0.0
See Also:
Constant Field Values

repeatTime

protected long repeatTime
Constructor Detail

WFAction

public WFAction()
Method Detail

getInstance

public static WFAction getInstance(String type,
                                   WFState state)

getType

public abstract String getType()

perform

public abstract void perform(Publication pub,
                             boolean isReminder)

toString

public abstract String toString(String userLang)

getRepeatTime

public long getRepeatTime()

setRepeatTime

public void setRepeatTime(long v)


Copyright © 2001-2010 Jalios SA. All Rights Reserved.