KickJava   Java API By Example, From Geeks To Geeks.

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


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 interface represents a permission for a source
20  *
21  * @author <a HREF="mailto:stephan@apache.org">Stephan Michels</a>
22  * @version CVS $Id: SourcePermission.java 30932 2004-07-29 17:35:38Z vgritsenko $
23  */

24 public interface SourcePermission {
25
26     public final static String JavaDoc PRIVILEGE_ALL = "all";
27     public final static String JavaDoc PRIVILEGE_READ = "read";
28     public final static String JavaDoc PRIVILEGE_WRITE = "write";
29
30     public final static String JavaDoc PRIVILEGE_READ_ACL = "read-acl";
31     public final static String JavaDoc PRIVILEGE_WRITE_ACL = "write-acl";
32
33     public final static String JavaDoc PRIVILEGE_READ_SOURCE = "read-source";
34     public final static String JavaDoc PRIVILEGE_CREATE_SOURCE = "create-source";
35     public final static String JavaDoc PRIVILEGE_REMOVE_SOURCE = "remove-source";
36
37     public final static String JavaDoc PRIVILEGE_LOCK_SOURCE = "lock-source";
38     public final static String JavaDoc PRIVILEGE_READ_LOCKS = "read-locks";
39
40     public final static String JavaDoc PRIVILEGE_READ_PROPERTY = "read-property";
41     public final static String JavaDoc PRIVILEGE_CREATE_PROPERTY = "create-property";
42     public final static String JavaDoc PRIVILEGE_MODIFY_PROPERTY = "modify-property";
43     public final static String JavaDoc PRIVILEGE_REMOVE_PROPERTY = "remove-property";
44
45     public final static String JavaDoc PRIVILEGE_READ_CONTENT = "read-content";
46     public final static String JavaDoc PRIVILEGE_CREATE_CONTENT = "create-content";
47     public final static String JavaDoc PRIVILEGE_MODIFY_CONTENT = "modify-content";
48     public final static String JavaDoc PRIVILEGE_REMOVE_CONTENT = "remove-content";
49
50     public final static String JavaDoc PRIVILEGE_GRANT_PERMISSION = "grant-permission";
51     public final static String JavaDoc PRIVILEGE_REVOKE_PERMISSION = "revoke-permission";
52
53     /**
54      * Sets the privilege of the permission
55      *
56      * @param privilege Privilege of the permission
57      */

58     public void setPrivilege(String JavaDoc privilege);
59
60     /**
61      * Returns the privilege of the permission
62      *
63      * @return Privilege of the permission
64      */

65     public String JavaDoc getPrivilege();
66
67     /**
68      * Sets the inheritable flag
69      *
70      * @param inheritable If the permission is inheritable
71      */

72     public void setInheritable(boolean inheritable);
73
74     /**
75      * Returns the inheritable flag
76      *
77      * @return If the permission is inheritable
78      */

79     public boolean isInheritable();
80
81     /**
82      * Sets the negative flag
83      *
84      * @param negative If the permission is a negative permission
85      */

86     public void setNegative(boolean negative);
87
88     /**
89      * Returns the negative flag
90      *
91      * @return If the permission is a negative permission
92      */

93     public boolean isNegative();
94 }
95
Popular Tags