KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > vfs > VFSProvider


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.vfs;
21
22
23 /**
24  * Interface describing the capabilities of VFS providers. Implementations
25  * of this interface are registed with the {@link VFSProviderManager} and
26  * are used to create {@link VFSStore} instances.
27  *
28  * @author Brett Smith <a HREF="mailto: brett@3sp.com">&lt;brett@3sp.com&gt;</a>
29  */

30 public interface VFSProvider extends Comparable JavaDoc<VFSProvider> {
31     
32     /**
33      * Element is not applicable
34      */

35     public final static int ELEMENT_NOT_APPLICABLE = 1;
36     
37     /**
38      * Element is applicable required
39      */

40     public final static int ELEMENT_REQUIRED = 2;
41     
42     /**
43      * Element is applicable but not required
44      */

45     public final static int ELEMENT_NOT_REQUIRED = 3;
46
47     /**
48      * Get the class of the {@link VFSStore} implementation.
49      *
50      * @return store class
51      */

52     public Class JavaDoc getStoreClass();
53     
54     /**
55      * Get the message resource bundle ID
56      *
57      * @return bundle
58      */

59     public String JavaDoc getBundle();
60     
61     /**
62      * Get the scheme name store implemetations handle
63      *
64      * @return name
65      */

66     public String JavaDoc getScheme();
67
68     /**
69      * Get if fire resource access events should be fired.
70      *
71      * @return fire events
72      */

73     public boolean isFireEvents();
74
75     /**
76      * Determine whether this provider handles a particular scheme (or protocol).
77      * This will usually be trued if the store name (i.e. that returned by
78      * {@link #getScheme()} is the same as scheme in the URI for the resource.
79      * <p>
80      *
81      * @param scheme
82      * @return store handles scheme
83      */

84     public boolean willHandle(String JavaDoc scheme);
85
86     /**
87      * Get if network places for this store requires a host. Will be
88      * one of {@link #ELEMENT_NOT_APPLICABLE}, {@link #ELEMENT_NOT_REQUIRED}
89      * or {@link #ELEMENT_REQUIRED}.
90      *
91      * @return requires host
92      */

93     public int getHostRequirement();
94
95     /**
96      * Get if network places for this store requires a port. Will be
97      * one of {@link #ELEMENT_NOT_APPLICABLE}, {@link #ELEMENT_NOT_REQUIRED}
98      * or {@link #ELEMENT_REQUIRED}.
99      *
100      * @return requires port
101      */

102     public int getPortRequirement();
103
104     /**
105      * Get if network places for this store requires user info. Will be
106      * one of {@link #ELEMENT_NOT_APPLICABLE}, {@link #ELEMENT_NOT_REQUIRED}
107      * or {@link #ELEMENT_REQUIRED}.
108      *
109      * @return requires user info
110      */

111     public int getUserInfoRequirement();
112
113     /**
114      * Get if network places for this store requires a path. Will be
115      * one of {@link #ELEMENT_NOT_APPLICABLE}, {@link #ELEMENT_NOT_REQUIRED}
116      * or {@link #ELEMENT_REQUIRED}.
117      *
118      * @return requires path
119      */

120     public int getPathRequirement();
121     
122     /**
123      * Get if this store supports a hidden file flag
124      *
125      * @return hidden files support
126      */

127     public boolean isHiddenFilesSupported();
128 }
129
Popular Tags