View Javadoc

1   /*
2    * Copyright 2005-2008 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.workgroup;
18  
19  import java.io.Serializable;
20  
21  /**
22   * Identifies the capabilities of a particular {@link WorkgroupService} implementation.
23   * 
24   * @see WorkgroupService
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public class WorkgroupCapabilities implements Serializable {
29  	
30  	private static final long serialVersionUID = -4776610168111831105L;
31  	private boolean lookupSupported = false;
32  	private boolean reportSupported = false;
33  	private boolean createSupported = false;
34  	private boolean editSupported = false;
35  	private boolean routingSupported = false;
36  	
37  	public boolean isCreateSupported() {
38  		return createSupported;
39  	}
40  	public void setCreateSupported(boolean createSupported) {
41  		this.createSupported = createSupported;
42  	}
43  	public boolean isEditSupported() {
44  		return editSupported;
45  	}
46  	public void setEditSupported(boolean editSupported) {
47  		this.editSupported = editSupported;
48  	}
49  	public boolean isLookupSupported() {
50  		return lookupSupported;
51  	}
52  	public void setLookupSupported(boolean lookupSupported) {
53  		this.lookupSupported = lookupSupported;
54  	}
55  	public boolean isReportSupported() {
56  		return reportSupported;
57  	}
58  	public void setReportSupported(boolean reportSupported) {
59  		this.reportSupported = reportSupported;
60  	}
61  	public boolean isRoutingSupported() {
62  		return routingSupported;
63  	}
64  	public void setRoutingSupported(boolean routingSupported) {
65  		this.routingSupported = routingSupported;
66  	}
67  	
68  	public static WorkgroupCapabilities getAll() {
69  		WorkgroupCapabilities capabilities = new WorkgroupCapabilities();
70  		capabilities.setCreateSupported(true);
71  		capabilities.setEditSupported(true);
72  		capabilities.setLookupSupported(true);
73  		capabilities.setReportSupported(true);
74  		capabilities.setRoutingSupported(true);
75  		return capabilities;
76  	}
77  	
78  	public static WorkgroupCapabilities getReadOnly() {
79  		WorkgroupCapabilities capabilities = new WorkgroupCapabilities();
80  		capabilities.setReportSupported(true);
81  		capabilities.setLookupSupported(true);
82  		return capabilities;
83  	}
84  
85  	
86  }