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 interface represents a permission for a source
21: *
22: * @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
23: * @version CVS $Id: SourcePermission.java 433543 2006-08-22 06:22:54Z crossley $
24: */
25: public interface SourcePermission {
26:
27: public final static String PRIVILEGE_ALL = "all";
28: public final static String PRIVILEGE_READ = "read";
29: public final static String PRIVILEGE_WRITE = "write";
30:
31: public final static String PRIVILEGE_READ_ACL = "read-acl";
32: public final static String PRIVILEGE_WRITE_ACL = "write-acl";
33:
34: public final static String PRIVILEGE_READ_SOURCE = "read-source";
35: public final static String PRIVILEGE_CREATE_SOURCE = "create-source";
36: public final static String PRIVILEGE_REMOVE_SOURCE = "remove-source";
37:
38: public final static String PRIVILEGE_LOCK_SOURCE = "lock-source";
39: public final static String PRIVILEGE_READ_LOCKS = "read-locks";
40:
41: public final static String PRIVILEGE_READ_PROPERTY = "read-property";
42: public final static String PRIVILEGE_CREATE_PROPERTY = "create-property";
43: public final static String PRIVILEGE_MODIFY_PROPERTY = "modify-property";
44: public final static String PRIVILEGE_REMOVE_PROPERTY = "remove-property";
45:
46: public final static String PRIVILEGE_READ_CONTENT = "read-content";
47: public final static String PRIVILEGE_CREATE_CONTENT = "create-content";
48: public final static String PRIVILEGE_MODIFY_CONTENT = "modify-content";
49: public final static String PRIVILEGE_REMOVE_CONTENT = "remove-content";
50:
51: public final static String PRIVILEGE_GRANT_PERMISSION = "grant-permission";
52: public final static String PRIVILEGE_REVOKE_PERMISSION = "revoke-permission";
53:
54: /**
55: * Sets the privilege of the permission
56: *
57: * @param privilege Privilege of the permission
58: */
59: public void setPrivilege(String privilege);
60:
61: /**
62: * Returns the privilege of the permission
63: *
64: * @return Privilege of the permission
65: */
66: public String getPrivilege();
67:
68: /**
69: * Sets the inheritable flag
70: *
71: * @param inheritable If the permission is inheritable
72: */
73: public void setInheritable(boolean inheritable);
74:
75: /**
76: * Returns the inheritable flag
77: *
78: * @return If the permission is inheritable
79: */
80: public boolean isInheritable();
81:
82: /**
83: * Sets the negative flag
84: *
85: * @param negative If the permission is a negative permission
86: */
87: public void setNegative(boolean negative);
88:
89: /**
90: * Returns the negative flag
91: *
92: * @return If the permission is a negative permission
93: */
94: public boolean isNegative();
95: }
|