01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.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 edu.iu.uis.eden.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 ewestfal
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:
41: public void setCreateSupported(boolean createSupported) {
42: this .createSupported = createSupported;
43: }
44:
45: public boolean isEditSupported() {
46: return editSupported;
47: }
48:
49: public void setEditSupported(boolean editSupported) {
50: this .editSupported = editSupported;
51: }
52:
53: public boolean isLookupSupported() {
54: return lookupSupported;
55: }
56:
57: public void setLookupSupported(boolean lookupSupported) {
58: this .lookupSupported = lookupSupported;
59: }
60:
61: public boolean isReportSupported() {
62: return reportSupported;
63: }
64:
65: public void setReportSupported(boolean reportSupported) {
66: this .reportSupported = reportSupported;
67: }
68:
69: public boolean isRoutingSupported() {
70: return routingSupported;
71: }
72:
73: public void setRoutingSupported(boolean routingSupported) {
74: this .routingSupported = routingSupported;
75: }
76:
77: public static WorkgroupCapabilities getAll() {
78: WorkgroupCapabilities capabilities = new WorkgroupCapabilities();
79: capabilities.setCreateSupported(true);
80: capabilities.setEditSupported(true);
81: capabilities.setLookupSupported(true);
82: capabilities.setReportSupported(true);
83: capabilities.setRoutingSupported(true);
84: return capabilities;
85: }
86:
87: public static WorkgroupCapabilities getReadOnly() {
88: WorkgroupCapabilities capabilities = new WorkgroupCapabilities();
89: capabilities.setReportSupported(true);
90: capabilities.setLookupSupported(true);
91: return capabilities;
92: }
93:
94: }
|