KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > filesys > server > auth > acl > AccessControlManager


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.filesys.server.auth.acl;
18
19 import org.alfresco.config.ConfigElement;
20 import org.alfresco.filesys.server.SrvSession;
21 import org.alfresco.filesys.server.config.ServerConfiguration;
22 import org.alfresco.filesys.server.core.SharedDevice;
23 import org.alfresco.filesys.server.core.SharedDeviceList;
24
25 /**
26  * Access Control Manager Interface
27  * <p>
28  * Used to control access to shared filesystems.
29  *
30  * @author Gary K. Spencer
31  */

32 public interface AccessControlManager
33 {
34
35     /**
36      * Initialize the access control manager
37      *
38      * @param config ServerConfiguration
39      * @param params ConfigElement
40      */

41     public void initialize(ServerConfiguration config, ConfigElement params);
42
43     /**
44      * Check access to the shared filesystem for the specified session
45      *
46      * @param sess SrvSession
47      * @param share SharedDevice
48      * @return int
49      */

50     public int checkAccessControl(SrvSession sess, SharedDevice share);
51
52     /**
53      * Filter a shared device list to remove shares that are not visible or the session does not
54      * have access to.
55      *
56      * @param sess SrvSession
57      * @param shares SharedDeviceList
58      * @return SharedDeviceList
59      */

60     public SharedDeviceList filterShareList(SrvSession sess, SharedDeviceList shares);
61
62     /**
63      * Create an access control
64      *
65      * @param type String
66      * @param params ConfigElement
67      * @return AccessControl
68      * @exception ACLParseException
69      * @exception InvalidACLTypeException
70      */

71     public AccessControl createAccessControl(String JavaDoc type, ConfigElement params) throws ACLParseException,
72             InvalidACLTypeException;
73
74     /**
75      * Add an access control parser to the list of available access control types.
76      *
77      * @param parser AccessControlParser
78      */

79     public void addAccessControlType(AccessControlParser parser);
80 }
81
Popular Tags