View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kew.rule.web;
17  
18  import java.util.ArrayList;
19  import java.util.HashMap;
20  import java.util.LinkedHashMap;
21  import java.util.List;
22  import java.util.Map;
23  
24  import org.kuali.rice.kew.doctype.bo.DocumentType;
25  import org.kuali.rice.kew.engine.node.RouteNode;
26  import org.kuali.rice.kew.rule.web.DocumentConfigurationViewAction.PermissionForDisplay;
27  import org.kuali.rice.kew.rule.web.DocumentConfigurationViewAction.ResponsibilityForDisplay;
28  import org.kuali.rice.kim.api.role.Role;
29  import org.kuali.rice.kns.web.struts.form.KualiForm;
30  
31  /**
32   * This is a description of what this class does - kellerj don't forget to fill this in. 
33   * 
34   * @author Kuali Rice Team (rice.collab@kuali.org)
35   *
36   */
37  public class DocumentConfigurationViewForm extends KualiForm {
38  
39  	private static final long serialVersionUID = -6251534168125209176L;
40  	
41  	protected String documentTypeName;
42  	protected DocumentType documentType; 
43  	protected DocumentType parentDocumentType; 
44  	protected List<DocumentType> childDocumentTypes; 
45  //    protected List<KimPermissionInfo> permissions = null;
46      protected List<String> docTypeHierarchyList = new ArrayList<String>();
47      protected LinkedHashMap<String,List<PermissionForDisplay>> permissionsByDocumentType = new LinkedHashMap<String, List<PermissionForDisplay>>();
48      protected Map<String,List<Role>> permissionRoles = new HashMap<String, List<Role>>();
49      protected Map<String,String> attributeLabels;
50      protected List<RouteNode> routeNodes;
51      protected Map<String,List<ResponsibilityForDisplay>> responsibilityMap;
52      protected Map<String,List<Role>> responsibilityRoles;
53      protected List<ResponsibilityForDisplay> exceptionResponsibilities;
54      protected boolean canInitiateDocumentTypeDocument = false;
55      protected boolean canInitiatePermissionDocument = false;
56      protected boolean canInitiateResponsibilityDocument = false;
57  
58  	public Map<String, List<Role>> getPermissionRoles() {
59  		return this.permissionRoles;
60  	}
61  
62  	public void setPermissionRoles(Map<String, List<Role>> permissionRoles) {
63  		this.permissionRoles = permissionRoles;
64  	}
65  
66  	public String getDocumentTypeName() {
67  		return this.documentTypeName;
68  	}
69  
70  	public void setDocumentTypeName(String documentTypeName) {
71  		this.documentTypeName = documentTypeName;
72  	}
73  
74  	public DocumentType getDocumentType() {
75  		return this.documentType;
76  	}
77  
78  	public void setDocumentType(DocumentType documentType) {
79  		this.documentType = documentType;
80  	}
81  
82  	public DocumentType getParentDocumentType() {
83  		return this.parentDocumentType;
84  	}
85  
86  	public void setParentDocumentType(DocumentType parentDocumentType) {
87  		this.parentDocumentType = parentDocumentType;
88  	}
89  
90  	public List<DocumentType> getChildDocumentTypes() {
91  		return this.childDocumentTypes;
92  	}
93  
94  	public void setChildDocumentTypes(List<DocumentType> childDocumentTypes) {
95  		this.childDocumentTypes = childDocumentTypes;
96  	}
97  
98  	public Map<String, String> getAttributeLabels() {
99  		return this.attributeLabels;
100 	}
101 
102 	public void setAttributeLabels(Map<String, String> attributeLabels) {
103 		this.attributeLabels = attributeLabels;
104 	}
105 
106 	public List<RouteNode> getRouteNodes() {
107 		return this.routeNodes;
108 	}
109 
110 	public void setRouteNodes(List<RouteNode> routeNodes) {
111 		this.routeNodes = routeNodes;
112 	}
113 
114 	public Map<String, List<ResponsibilityForDisplay>> getResponsibilityMap() {
115 		return this.responsibilityMap;
116 	}
117 
118 	public void setResponsibilityMap(
119 			Map<String, List<ResponsibilityForDisplay>> responsibilityMap) {
120 		this.responsibilityMap = responsibilityMap;
121 	}
122 
123 	public List<String> getDocTypeHierarchyList() {
124 		return this.docTypeHierarchyList;
125 	}
126 
127 	public void setDocTypeHierarchyList(List<String> docTypeHierarchyList) {
128 		this.docTypeHierarchyList = docTypeHierarchyList;
129 	}
130 
131 	public LinkedHashMap<String, List<PermissionForDisplay>> getPermissionsByDocumentType() {
132 		return this.permissionsByDocumentType;
133 	}
134 
135 	public void setPermissionsByDocumentType(
136 			LinkedHashMap<String, List<PermissionForDisplay>> permissionsByDocumentType) {
137 		this.permissionsByDocumentType = permissionsByDocumentType;
138 	}
139 
140 	public void addDocumentType( String documentTypeName ) {
141 		docTypeHierarchyList.add(documentTypeName);		
142 	}
143 	
144 	public void setPermissionsForDocumentType( String documentTypeName, List<PermissionForDisplay> perms ) {
145 		permissionsByDocumentType.put(documentTypeName, perms);
146 	}
147 
148 	public boolean isCanInitiateDocumentTypeDocument() {
149 		return this.canInitiateDocumentTypeDocument;
150 	}
151 
152 	public void setCanInitiateDocumentTypeDocument(
153 			boolean canInitiateDocumentTypeDocument) {
154 		this.canInitiateDocumentTypeDocument = canInitiateDocumentTypeDocument;
155 	}
156 
157 	public Map<String, List<Role>> getResponsibilityRoles() {
158 		return this.responsibilityRoles;
159 	}
160 
161 	public void setResponsibilityRoles(
162 			Map<String, List<Role>> responsibilityRoles) {
163 		this.responsibilityRoles = responsibilityRoles;
164 	}
165 
166 	public boolean isCanInitiatePermissionDocument() {
167 		return this.canInitiatePermissionDocument;
168 	}
169 
170 	public void setCanInitiatePermissionDocument(
171 			boolean canInitiatePermissionDocument) {
172 		this.canInitiatePermissionDocument = canInitiatePermissionDocument;
173 	}
174 
175 	public boolean isCanInitiateResponsibilityDocument() {
176 		return this.canInitiateResponsibilityDocument;
177 	}
178 
179 	public void setCanInitiateResponsibilityDocument(
180 			boolean canInitiateResponsibilityDocument) {
181 		this.canInitiateResponsibilityDocument = canInitiateResponsibilityDocument;
182 	}
183 
184 	/**
185 	 * @return the exceptionResponsibilities
186 	 */
187 	public List<ResponsibilityForDisplay> getExceptionResponsibilities() {
188 		return this.exceptionResponsibilities;
189 	}
190 
191 	/**
192 	 * @param exceptionResponsibilities the exceptionResponsibilities to set
193 	 */
194 	public void setExceptionResponsibilities(
195 			List<ResponsibilityForDisplay> exceptionResponsibilities) {
196 		this.exceptionResponsibilities = exceptionResponsibilities;
197 	}
198 
199 }