KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > source > helpers > AbstractSourcePermission


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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.apache.cocoon.components.source.helpers;
17
18 /**
19  * This class is an abstract implementation of a source permission
20  *
21  * @author <a HREF="mailto:stephan@apache.org">Stephan Michels</a>
22  * @version CVS $Id: AbstractSourcePermission.java 30932 2004-07-29 17:35:38Z vgritsenko $
23  */

24 public abstract class AbstractSourcePermission implements SourcePermission{
25
26     private String JavaDoc privilege;
27     private boolean inheritable;
28     private boolean negative;
29
30     /**
31      * Sets the privilege of the permission
32      *
33      * @param privilege Privilege of the permission
34      */

35     public void setPrivilege(String JavaDoc privilege) {
36         this.privilege = privilege;
37     }
38
39     /**
40      * Returns the privilege of the permission
41      *
42      * @return Privilege of the permission
43      */

44     public String JavaDoc getPrivilege() {
45         return this.privilege;
46     }
47
48     /**
49      * Sets the inheritable flag
50      *
51      * @param inheritable If the permission is inheritable
52      */

53     public void setInheritable(boolean inheritable) {
54         this.inheritable = inheritable;
55     }
56
57     /**
58      * Returns the inheritable flag
59      *
60      * @return If the permission is inheritable
61      */

62     public boolean isInheritable() {
63         return this.inheritable;
64     }
65
66     /**
67      * Sets the negative flag
68      *
69      * @param negative If the permission is a negative permission
70      */

71     public void setNegative(boolean negative) {
72         this.negative = negative;
73     }
74
75     /**
76      * Returns the negative flag
77      *
78      * @return If the permission is a negative permission
79      */

80     public boolean isNegative() {
81         return this.negative;
82     }
83 }
84
Popular Tags