Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.jharks.workflow;
  
  import java.util.List;
  import java.util.Iterator;
  
The org.jharks.workflow.StateTransition class adds queuable properties to a transition.

Author(s):
Michael J. Rizzo
 
 
 public class StateTransition extends Transition implements Queueable
   CleanableWorkFlowConstants {

    
The logger for the module.
 
     protected Log logger = LogFactory.getLog(getClass().getName());
    
    
Flag indicating whether related survey state should be persisited when transition is applied.
 
     private boolean persist = false;
    
    
Flag indicating whether input should be queued for later processing.
 
     private boolean queueInput = false
    
    
Indicates type of input
 
     private String inputProperty = null;
    
    
The value of the configured input
 
     private String inputValue = null;
    
    
Specifies the grouping to queue elements by.
  
     private String queueBy = null;
    
    
The question id within the response set to queue responses for. Acts as a filter. TODO: consider rework to allow for filter (collection of ids).
 
     private String queueQuestionId;
    
    
Flag indicating whether the transition is a clean up transition.
 
     private boolean cleanUp = false;  
    
    
List of QueueFilter instances configured.
 
     private List<QueueFilterfilters;
    
    
A set of configured Rule instances.
 
     private RuleSet set;
    
    
Default public constructor that initiates rule list.
 
     public StateTransition() {
         super();
     }
   
    
Returns the configured RuleSet.

Returns:
a set of Rule instances.
 
     public RuleSet getRuleSet() {
         return ;
     }

    
Set the RuleSet object.

Parameters:
set the RuleSet object.
 
     public void setRuleSet(RuleSet set) {
         this. = set;
     }
    
    
Add a QueueFilter object for the transition.

Parameters:
vf QueueFilter object to add.
 
     public void addFilter(QueueFilter vf) {
         if ( == null = new ArrayList<QueueFilter>();
         .add(vf);
     }
    
    
Retrieve iterator for filters.

Returns:
filter iterator.
 
     public Iterator<QueueFilterfilterIterator() {
         return .iterator();
     }
    
    
The method allows for the retrieval of the entire collection of QueueFilter instances on a Transition object.

Returns:
List of Rule instances.
 
     public List<QueueFiltergetFilters() {
        return ;
    }
    
    
Retrieve the persist flag string.

Returns:
the persist flag.
    public boolean isPersist() {
        return this.;
    }

    
Set the persist flag for the transition.

Parameters:
flag the flag indicating whether to perisit state within a transition.
    public void setPersist(boolean flag) {
        this. = flag;
    }
    
    
Retrieve the queue flag.

Returns:
the queue flag.
    public boolean isQueueInput() {
        return this.;
    }

    
Set the queue input flag for the transition.

Parameters:
flag the flag indicating whether to queue input within a transition.
    public void setQueueInput(boolean flag) {
        this. = flag;
    }
    
    
Retrieve the clean up flag.

Returns:
the clean up flag.
    public boolean isCleanUp() {
        return this.;
    }

    
Set the clean up flag for the transition.

Parameters:
flag the flag indicating whether the tranisition is a clean up transition.
    public void setCleanUp(boolean flag) {
        this. = flag;
    }
    
    
Returns input property configured for queuable items.

Returns:
Returns the input property configured.
    public String getInputProperty() {
        return ;
    }
    
    
Set the input property for queuing.

Parameters:
property the input property.
    public void setInputProperty(String property) {
        this. = property;
    }
    
    
Returns input value configured for the queuable item.

Returns:
Returns the configured input value.
    public String getInputValue() {
        return ;
    }
    
    
Set the input type value for queued object.

Parameters:
value the input value.
    public void setInputValue(String value) {
        this. = value;
    }

     
Returns the queue by alais.

Returns:
the queue by alias.
     public String getQueueBy() {
         return ;
     }
    
    
Set the grouping to use when loading elements onto the queue.

Parameters:
queueBy The queueBy to set.
    public void setQueueBy(String queueBy) {
        if (.isDebugEnabled())
            .debug(" Setting queue by: " + queueBy);
        
        this. = queueBy;
    }
    
Return the question id that indicates which question responses within the ResponseSet should be queued.

Returns:
Returns the queueQuestionId.
    public String getQueueQuestionId() {
        return ;
    }
    
    
Set the question id filter for queuing responses.

Parameters:
queueQuestionId The queueQuestionId to set.
    public void setQueueQuestionId(String queueQuestionId) {
        this. = queueQuestionId;
    }
New to GrepCode? Check out our FAQ X