com.jalios.jcms
Class WFAction

java.lang.Object
  extended by com.jalios.jcms.WFAction
Direct Known Subclasses:
AlertAdminsWFAction, AlertAuthorWFAction, AlertWorkersWFAction

public abstract class WFAction
extends Object

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

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

Field Summary
static String ALERT_DOMAIN
           
static String EVENT_IN
           
static String EVENT_OUT
           
static String FORM_SUBMISSION_ALERT
           
static String FORM_SUBMISSION_FULLNAME_ALERT
           
protected  long repeatTime
           
static String REVISION
           
static String STATE_IN_ALERT
           
static String STATE_IN_FULLNAME_ALERT
           
static String STATE_OUT_ALERT
           
static String STATE_OUT_FULLNAME_ALERT
           
static String TYPE_ALERT_ADMINS
           
static String TYPE_ALERT_AUTHOR
           
static String TYPE_ALERT_WORKERS
           
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.
 
Constructor Summary
WFAction()
           
 
Method Summary
static WFAction getInstance(String type, WFState state)
           
 long getRepeatTime()
           
abstract  String getType()
           
abstract  void perform(Publication pub, boolean isReminder, String alertName)
           
protected  void sendAlert(Publication pub, Collection<Member> recipientSet, boolean isReminder, String alertName)
           
 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

ALERT_DOMAIN

public static final String ALERT_DOMAIN
See Also:
Constant Field Values

STATE_IN_ALERT

public static final String STATE_IN_ALERT
See Also:
Constant Field Values

STATE_OUT_ALERT

public static final String STATE_OUT_ALERT
See Also:
Constant Field Values

FORM_SUBMISSION_ALERT

public static final String FORM_SUBMISSION_ALERT
See Also:
Constant Field Values

STATE_IN_FULLNAME_ALERT

public static final String STATE_IN_FULLNAME_ALERT
See Also:
Constant Field Values

STATE_OUT_FULLNAME_ALERT

public static final String STATE_OUT_FULLNAME_ALERT
See Also:
Constant Field Values

FORM_SUBMISSION_FULLNAME_ALERT

public static final String FORM_SUBMISSION_FULLNAME_ALERT
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_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)

sendAlert

protected void sendAlert(Publication pub,
                         Collection<Member> recipientSet,
                         boolean isReminder,
                         String alertName)

getType

public abstract String getType()

perform

public abstract void perform(Publication pub,
                             boolean isReminder,
                             String alertName)

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.