01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
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.apache.cocoon.components.source.helpers;
18:
19: /**
20: * This class is an abstract implementation of a source permission
21: *
22: * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
23: * @version CVS $Id: AbstractSourcePermission.java 433543 2006-08-22 06:22:54Z crossley $
24: */
25: public abstract class AbstractSourcePermission implements
26: SourcePermission {
27:
28: private String privilege;
29: private boolean inheritable;
30: private boolean negative;
31:
32: /**
33: * Sets the privilege of the permission
34: *
35: * @param privilege Privilege of the permission
36: */
37: public void setPrivilege(String privilege) {
38: this .privilege = privilege;
39: }
40:
41: /**
42: * Returns the privilege of the permission
43: *
44: * @return Privilege of the permission
45: */
46: public String getPrivilege() {
47: return this .privilege;
48: }
49:
50: /**
51: * Sets the inheritable flag
52: *
53: * @param inheritable If the permission is inheritable
54: */
55: public void setInheritable(boolean inheritable) {
56: this .inheritable = inheritable;
57: }
58:
59: /**
60: * Returns the inheritable flag
61: *
62: * @return If the permission is inheritable
63: */
64: public boolean isInheritable() {
65: return this .inheritable;
66: }
67:
68: /**
69: * Sets the negative flag
70: *
71: * @param negative If the permission is a negative permission
72: */
73: public void setNegative(boolean negative) {
74: this .negative = negative;
75: }
76:
77: /**
78: * Returns the negative flag
79: *
80: * @return If the permission is a negative permission
81: */
82: public boolean isNegative() {
83: return this.negative;
84: }
85: }
|