View Javadoc

1   /*
2    * Copyright 2005-2009 The Kuali Foundation
3    * 
4    * 
5    * Licensed under the Educational Community License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    * 
9    * http://www.opensource.org/licenses/ecl2.php
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.kuali.rice.kew.dto;
18  
19  import java.io.Serializable;
20  
21  /**
22   * Transport object for representing the criteria for a routing report.
23   * 
24   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public class ReportCriteriaDTO implements Serializable {
27  
28  	private static final long serialVersionUID = 4390002636101531058L;
29  	
30  	private String documentId;
31  	private String targetNodeName;
32      
33      private String[] targetPrincipalIds;
34      private String routingPrincipalId;
35      private String documentTypeName;
36      private String xmlContent;
37      private String[] ruleTemplateNames;
38      private String[] nodeNames;
39      private ReportActionToTakeDTO[] actionsToTake;
40      private Boolean activateRequests = null;
41      private boolean flattenNodes = false;
42  
43  	public ReportCriteriaDTO() {}
44  	
45  	public static ReportCriteriaDTO createReportCritByDocTypeNm(String documentTypeName) {
46  		return new ReportCriteriaDTO(documentTypeName);
47  	}
48  	
49  	public static ReportCriteriaDTO createReportCritByDocId(String documentId) {
50  		return new ReportCriteriaDTO(documentId, null);
51  	}
52  	
53  	public static ReportCriteriaDTO createReportCritByDocIdAndTargetNdNm(String documentId, String targetNodeName) {
54  		return new ReportCriteriaDTO(documentId, targetNodeName);
55  	}
56  	
57  	private ReportCriteriaDTO(String documentId, String targetNodeName) {
58  		this.documentId = documentId;
59          this.targetNodeName = targetNodeName;
60      }
61  	
62  	private ReportCriteriaDTO(String documentTypeName) {
63  		this.documentTypeName = documentTypeName;
64  	}
65  		
66  	public Boolean getActivateRequests() {
67          return this.activateRequests;
68      }
69  
70      public void setActivateRequests(Boolean activateRequests) {
71          this.activateRequests = activateRequests;
72      }
73  
74      public String getDocumentId() {
75  		return documentId;
76  	}
77  
78  	public void setDocumentId(String documentId) {
79  		this.documentId = documentId;
80  	}
81  
82  	public String getTargetNodeName() {
83          return targetNodeName;
84      }
85  
86      public void setTargetNodeName(String targetNodeName) {
87          this.targetNodeName = targetNodeName;
88      }
89  
90      public String toString() {
91  		return super.toString()+"[documentId="+documentId+
92  		",targetNodeName="+targetNodeName+"]";
93  	}
94  
95      public String getDocumentTypeName() {
96          return documentTypeName;
97      }
98  
99      public void setDocumentTypeName(String documentTypeName) {
100         this.documentTypeName = documentTypeName;
101     }
102 
103     public String[] getRuleTemplateNames() {
104         return ruleTemplateNames;
105     }
106 
107     public void setRuleTemplateNames(String[] ruleTemplateNames) {
108         this.ruleTemplateNames = ruleTemplateNames;
109     }
110 
111     public String[] getTargetPrincipalIds() {
112         return targetPrincipalIds;
113     }
114 
115     public void setTargetPrincipalIds(String[] targetPrincipalIds) {
116         this.targetPrincipalIds = targetPrincipalIds;
117     }
118 
119     public String getXmlContent() {
120         return xmlContent;
121     }
122 
123     public void setXmlContent(String xmlContent) {
124         this.xmlContent = xmlContent;
125     }
126     
127 	public String[] getNodeNames() {
128 		return nodeNames;
129 	}
130 
131 	public void setNodeNames(String[] nodeNames) {
132 		this.nodeNames = nodeNames;
133 	}
134 
135 	public ReportActionToTakeDTO[] getActionsToTake() {
136 		return actionsToTake;
137 	}
138 
139 	public void setActionsToTake(ReportActionToTakeDTO[] actionsToTake) {
140 		this.actionsToTake = actionsToTake;
141 	}
142 
143 	public String getRoutingPrincipalId() {
144 		return routingPrincipalId;
145 	}
146 
147 	public void setRoutingPrincipalId(String routingPrincipalId) {
148 		this.routingPrincipalId = routingPrincipalId;
149 	}
150 
151 	public boolean isFlattenNodes() {
152 		return this.flattenNodes;
153 	}
154 
155 	public void setFlattenNodes(boolean flattenNodes) {
156 		this.flattenNodes = flattenNodes;
157 	}
158 	
159 }