KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > filesys > server > core > ShareMapper


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.core;
18
19 import org.alfresco.config.ConfigElement;
20 import org.alfresco.filesys.server.SrvSession;
21 import org.alfresco.filesys.server.config.InvalidConfigurationException;
22 import org.alfresco.filesys.server.config.ServerConfiguration;
23
24 /**
25  * Share Mapper Interface
26  * <p>
27  * The share mapper interface is used to allocate a share of the specified name and type. It is
28  * called by the SMB server to allocate disk and print type shares.
29  */

30 public interface ShareMapper
31 {
32
33     /**
34      * Initialize the share mapper
35      *
36      * @param config ServerConfiguration
37      * @param params ConfigElement
38      * @exception InvalidConfigurationException
39      */

40     public void initializeMapper(ServerConfiguration config, ConfigElement params) throws InvalidConfigurationException;
41
42     /**
43      * Return the share list for the specified host. The host name can be used to implement virtual
44      * hosts.
45      *
46      * @param host
47      * @param sess SrvSession
48      * @param allShares boolean
49      * @return SharedDeviceList
50      */

51     public SharedDeviceList getShareList(String JavaDoc host, SrvSession sess, boolean allShares);
52
53     /**
54      * Find the share of the specified name/type
55      *
56      * @param tohost String
57      * @param name String
58      * @param typ int
59      * @param sess SrvSession
60      * @param create boolean
61      * @return SharedDevice
62      * @exception Exception
63      */

64     public SharedDevice findShare(String JavaDoc tohost, String JavaDoc name, int typ, SrvSession sess, boolean create)
65             throws Exception JavaDoc;
66
67     /**
68      * Delete any temporary shares created for the specified session
69      *
70      * @param sess SrvSession
71      */

72     public void deleteShares(SrvSession sess);
73
74     /**
75      * Close the share mapper, release any resources. Called when the server is shutting down.
76      */

77     public void closeMapper();
78 }
79
Popular Tags