01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.document.authorization;
17:
18: /**
19: * MaintenanceDocument specific action flags.
20: *
21: *
22: */
23: final public class MaintenanceDocumentActionFlags extends
24: DocumentActionFlags {
25:
26: private boolean canReopen;
27:
28: /**
29: * Default constructor.
30: */
31: public MaintenanceDocumentActionFlags() {
32: }
33:
34: /**
35: * Copy constructor.
36: *
37: * @param flags
38: */
39: public MaintenanceDocumentActionFlags(DocumentActionFlags flags) {
40: super (flags);
41:
42: if (flags instanceof MaintenanceDocumentActionFlags) {
43: MaintenanceDocumentActionFlags mflags = (MaintenanceDocumentActionFlags) flags;
44:
45: this .canReopen = mflags.canReopen;
46: }
47: }
48:
49: /**
50: * Gets the canReopen attribute.
51: *
52: * @return Returns the canReopen.
53: */
54: public boolean isCanReopen() {
55: return canReopen;
56: }
57:
58: /**
59: * Sets the canReopen attribute value.
60: *
61: * @param canReopen The canReopen to set.
62: */
63: public void setCanReopen(boolean canReopen) {
64: this .canReopen = canReopen;
65: }
66:
67: /**
68: * Debugging method, simplifies comparing another instance of this class to this one
69: *
70: * @param other
71: * @return String
72: */
73: public String diff(DocumentActionFlags other) {
74: StringBuffer s = new StringBuffer(super .diff(other));
75:
76: if (other instanceof MaintenanceDocumentActionFlags) {
77: MaintenanceDocumentActionFlags mOther = (MaintenanceDocumentActionFlags) other;
78:
79: if (this .canReopen != mOther.canReopen) {
80: s.append("canReopen=(" + canReopen + ","
81: + mOther.canReopen + ")");
82: }
83: }
84:
85: return s.toString();
86: }
87: }
|