001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.opensource.org/licenses/ecl1.php
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package edu.iu.uis.eden.engine.simulation;
018:
019: import java.util.ArrayList;
020: import java.util.List;
021:
022: import edu.iu.uis.eden.user.WorkflowUser;
023: import edu.iu.uis.eden.util.Utilities;
024:
025: /**
026: * Criteria which acts as input to the {@link SimulationEngine}.
027: *
028: * @see SimulationEngine
029: *
030: * @author ewestfal
031: */
032: public class SimulationCriteria {
033:
034: // fields related to document simulation
035: private Long documentId;
036: private String destinationNodeName;
037: private List destinationRecipients = new ArrayList();
038:
039: // fields related to document type simulation
040: private String documentTypeName;
041: private String xmlContent;
042: private List nodeNames = new ArrayList();
043: private List ruleTemplateNames = new ArrayList();
044:
045: // fields related to both simulation types
046: private WorkflowUser routingUser;
047: private List actionsToTake = new ArrayList();
048:
049: public SimulationCriteria() {
050: }
051:
052: public SimulationCriteria(Long documentId) {
053: this .documentId = documentId;
054: }
055:
056: public SimulationCriteria(String documentTypeName) {
057: this .documentTypeName = documentTypeName;
058: }
059:
060: public Long getDocumentId() {
061: return documentId;
062: }
063:
064: public void setDocumentId(Long documentId) {
065: this .documentId = documentId;
066: }
067:
068: public String getDestinationNodeName() {
069: return destinationNodeName;
070: }
071:
072: public void setDestinationNodeName(String destinationNodeName) {
073: this .destinationNodeName = destinationNodeName;
074: }
075:
076: public List getDestinationRecipients() {
077: return destinationRecipients;
078: }
079:
080: public void setDestinationRecipients(List destinationRecipients) {
081: this .destinationRecipients = destinationRecipients;
082: }
083:
084: public String getDocumentTypeName() {
085: return documentTypeName;
086: }
087:
088: public void setDocumentTypeName(String documentTypeName) {
089: this .documentTypeName = documentTypeName;
090: }
091:
092: public List getRuleTemplateNames() {
093: return ruleTemplateNames;
094: }
095:
096: public void setRuleTemplateNames(List ruleTemplateNames) {
097: this .ruleTemplateNames = ruleTemplateNames;
098: }
099:
100: public String getXmlContent() {
101: return xmlContent;
102: }
103:
104: public void setXmlContent(String xmlContent) {
105: this .xmlContent = xmlContent;
106: }
107:
108: public List getNodeNames() {
109: return nodeNames;
110: }
111:
112: public void setNodeNames(List nodeNames) {
113: this .nodeNames = nodeNames;
114: }
115:
116: public boolean isDocumentSimulation() {
117: return documentId != null;
118: }
119:
120: public boolean isDocumentTypeSimulation() {
121: return !Utilities.isEmpty(documentTypeName);
122: }
123:
124: public List getActionsToTake() {
125: return actionsToTake;
126: }
127:
128: public void setActionsToTake(List actionsToTake) {
129: this .actionsToTake = actionsToTake;
130: }
131:
132: public WorkflowUser getRoutingUser() {
133: return routingUser;
134: }
135:
136: public void setRoutingUser(WorkflowUser routingUser) {
137: this.routingUser = routingUser;
138: }
139:
140: }
|