com.jalios.jcms
Class PstatusAlarmListener

java.lang.Object
  extended by com.jalios.jcms.db.TransactionalAlarmListener
      extended by com.jalios.jcms.PstatusAlarmListener
All Implemented Interfaces:
AlarmListener

public class PstatusAlarmListener
extends TransactionalAlarmListener

This class is the AlarmListener used to change pstatus scheduled with pdate, edate and adate.

Since:
jcms-2.1
Version:
$Revision: 27753 $
Author:
Olivier Dedieu, Olivier Jaquemet

Field Summary
static int ANY_PSTATUS
           
 int comparisonOperator
           
static int EQUALS
           
static int GREATER
           
static int GREATER_EQUAL
           
static int LOWER
           
static int LOWER_EQUAL
           
 String pubId
           
static String REVISION
           
 int srcPstatus
           
 int tgtPstatus
           
 
Constructor Summary
PstatusAlarmListener(Publication pub, int comparisonOperator, int srcPstatus, int tgtPstatus)
          Constructs a new PstatusAlarmListener
 
Method Summary
 void handleTransactionalAlarm(AlarmEntry entry)
          Invoked when pstatus alarm is reached, update pstatus if allowed to
 String toString()
          readable PstatusAlarmListener toString
 
Methods inherited from class com.jalios.jcms.db.TransactionalAlarmListener
handleAlarm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

ANY_PSTATUS

public static final int ANY_PSTATUS
See Also:
Constant Field Values

LOWER

public static final int LOWER
See Also:
Constant Field Values

LOWER_EQUAL

public static final int LOWER_EQUAL
See Also:
Constant Field Values

EQUALS

public static final int EQUALS
See Also:
Constant Field Values

GREATER_EQUAL

public static final int GREATER_EQUAL
See Also:
Constant Field Values

GREATER

public static final int GREATER
See Also:
Constant Field Values

pubId

public String pubId

srcPstatus

public int srcPstatus

comparisonOperator

public int comparisonOperator

tgtPstatus

public int tgtPstatus
Constructor Detail

PstatusAlarmListener

public PstatusAlarmListener(Publication pub,
                            int comparisonOperator,
                            int srcPstatus,
                            int tgtPstatus)
Constructs a new PstatusAlarmListener

Parameters:
pub - the publication to managed
srcPstatus - the pstatus the publication will be compared to, in order to be updated
comparisonOperator - define how the comparison between the publication's pstatus and the srcPstatus and will take place in order to allow or not the pstatus change LOWER (-2) : publication pstatus must be lower than srcPstatus LOWER_EQUAL (-1) : publication pstatus must be lower or equal than srcPstatus EQUALS ( 0) : publication pstatus must equal srcPstatus, this is the default value GREATER_EQUAL ( 1) : publication pstatus must be greater or equal than srcPstatus GREATER ( 2) : publication pstatus must be greater than srcPstatus
tgtPstatus - the new pstatus the publication will get when the alarm will be reached.
Method Detail

handleTransactionalAlarm

public void handleTransactionalAlarm(AlarmEntry entry)
Invoked when pstatus alarm is reached, update pstatus if allowed to

Specified by:
handleTransactionalAlarm in class TransactionalAlarmListener
Parameters:
entry - the AlarmEntry which has been triggered.

toString

public String toString()
readable PstatusAlarmListener toString

Overrides:
toString in class Object


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