⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 davstore.java

📁 这是linux下ssl vpn的实现程序
💻 JAVA
字号:
/*
 *  SSL-Explorer
 *
 *  Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2 of
 *  the License, or (at your option) any later version.
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public
 *  License along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
			
package com.sslexplorer.vfs.webdav;

import java.util.Iterator;

import com.sslexplorer.security.SessionInfo;

/**
 * A store is a child of a {@link com.sslexplorer.vfs.webdav.DAVRepository}
 * and  provides the entry point for a particular type of file system
 * (e.g. Local, SMB, FTP etc). 
 * <p>
 * It returns a list of {@link com.sslexplorer.vfs.webdav.DAVMount} objects
 * appropriate for the file system and the users security policy.
 * <p>
 * Either the core or plugins may register new store implementations using
 * {@link com.sslexplorer.vfs.webdav.DAVStoreManager#registerStore(Class)}.
 * 
 * @author Brett Smith <brett@3sp.com>
 * @see com.sslexplorer.vfs.webdav.DAVStoreManager
 */
public interface DAVStore {
    
    /**
     * Get the root resource for this store.
     * 
     * @param transaction transaction
     * @return root resource resource
     * @throws DAVException on any error
     */
    public DAVResource getStoreResource(DAVTransaction transaction) throws DAVException;

    /**
     * Get the name of this name
     * 
     * @return store name
     */
    public String getName();

    /**
     * Initialise the store
     *  
     * @param repository repository
     */
    public void init(DAVRepository repository);

    /**
     * Get the repository that initialised this store.
     * 
     * @return response
     */
    public DAVRepository getRepository();

    /**
     * Get a mount object given its name name. The mount name should be the
     * name of the mount only (no leading or trailing slashes). <code>null</code>
     * will be returned if no such mount exists.
     *  
     * @param mountName mount name
     * @param session session
     * @return mount 
     * @throws DAVException on any error.
     */
    public DAVMount getMountFromString(String mountName, SessionInfo session) throws DAVException;

    /**
     * Validate the path for this store. This is used to determine which 
     * store to use for a path. An {@link IllegalArgumentException} will be 
     * thrown if this  store does not support this path. The first store that 
     * does not throw an {@link IllegalArgumentException} will be handling 
     * the path. The scheme to use for this URI will also be returned at this
     * point.
     * 
     * @param path
     * @return scheme
     * @throws IllegalArgumentException
     */
    public String validateUserEnteredPath(String path) throws IllegalArgumentException;

    /**
     * Get an iterator of all available and accessable mounts in this store.
     *  
     * @param transaction
     * @return iterator of appropriate mounts
     * @throws Exception on any error
     */
    public Iterator getMountIterator(DAVTransaction transaction) throws Exception;

    /**
     * Determine whether this store handles a particular scheme (or protocol).
     * This will usually be trued if the store name (i.e. that returned
     * by {@link #getName()} is the same as scheme in the URI for the resource.
     * <p> 
     * However some stores may handle one or more different URIs. E.g. the 
     * {@link com.sslexplorer.vfs.store.cifs.CIFSStore} handles URIs with
     * schemes of <i>smb</i> or <i>cifs</i>.
     * 
     * @param scheme
     * @return store handles scheme
     */
    public boolean willHandle(String scheme);
    
    /**
     * Get the guest username to use for this store / transaction
     * 
     * @param transaction transaction
     * @return guest username
     * @see #getGuestPassword
     */
    public String getGuestUsername(DAVTransaction transaction);
    
    /**
     * Get the guest password to use for this store / transaction
     * 
     * @param transaction transaction
     * @return guest password
     * @see #getGuestUsername
     */
    public char[] getGuestPassword(DAVTransaction transaction);
    
    
    public String getEncoding();

    /**
     * Get if this store should fire resource access events.
     * 
     * @return fire events
     */
    public boolean isFireEvents();

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -