KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > vfs > Capability


1 /*
2  * Copyright 2002-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.vfs;
17
18 /**
19  * An enumerated type representing the capabilities of files and file systems.
20  *
21  * @author <a HREF="mailto:adammurdoch@apache.org">Adam Murdoch</a>
22  */

23 public final class Capability
24 {
25     /**
26      * File content can be read.
27      */

28     public static final Capability READ_CONTENT = new Capability("READ_CONTENT");
29
30     /**
31      * File content can be written.
32      */

33     public static final Capability WRITE_CONTENT = new Capability("WRITE_CONTENT");
34
35     /**
36      * File content can be read in random mode.<br>
37      */

38     public static final Capability RANDOM_ACCESS_READ = new Capability("RANDOM_ACCESS_READ");
39
40     /**
41      * File content can be written in random mode.<br>
42      */

43     public static final Capability RANDOM_ACCESS_WRITE = new Capability("RANDOM_ACCESS_WRITE");
44
45     /**
46      * File content can be appended.
47      */

48     public static final Capability APPEND_CONTENT = new Capability("APPEND_CONTENT");
49
50     /**
51      * File attributes are supported.
52      */

53     public static final Capability ATTRIBUTES = new Capability("ATTRIBUTES");
54
55     /**
56      * File last-modified time is supported.
57      */

58     public static final Capability LAST_MODIFIED = new Capability("LAST_MODIFIED");
59
60     /**
61      * File get last-modified time is supported.
62      */

63     public static final Capability GET_LAST_MODIFIED = new Capability("GET_LAST_MODIFIED");
64
65     /**
66      * File set last-modified time is supported.
67      */

68     public static final Capability SET_LAST_MODIFIED_FILE = new Capability("SET_LAST_MODIFIED_FILE");
69
70     /**
71      * folder set last-modified time is supported.
72      */

73     public static final Capability SET_LAST_MODIFIED_FOLDER = new Capability("SET_LAST_MODIFIED_FOLDER");
74
75     /**
76      * File content signing is supported.
77      */

78     public static final Capability SIGNING = new Capability("SIGNING");
79
80     /**
81      * Files can be created.
82      */

83     public static final Capability CREATE = new Capability("CREATE");
84
85     /**
86      * Files can be deleted.
87      */

88     public static final Capability DELETE = new Capability("DELETE");
89
90     /**
91      * Files can be renamed.
92      */

93     public static final Capability RENAME = new Capability("RENAME");
94
95     /**
96      * The file type can be determined.
97      */

98     public static final Capability GET_TYPE = new Capability("GET_TYPE");
99
100     /**
101      * Children of files can be listed.
102      */

103     public static final Capability LIST_CHILDREN = new Capability("LIST_CHILDREN");
104
105     /**
106      * URI are supported. Files without this capability use URI that do not
107      * globally and uniquely identify the file.
108      */

109     public static final Capability URI = new Capability("URI");
110
111     /**
112      * File system attributes are supported.
113      */

114     public static final Capability FS_ATTRIBUTES = new Capability("FS_ATTRIBUTE");
115
116     /**
117      * Junctions are supported.
118      */

119     public static final Capability JUNCTIONS = new Capability("JUNCTIONS");
120
121     /**
122      * The set of attributes defined by the Jar manifest specification are
123      * supported. The attributes aren't necessarily stored in a manifest file.
124      */

125     public static final Capability MANIFEST_ATTRIBUTES = new Capability("MANIFEST_ATTRIBUTES");
126
127     /**
128      * The provider itself do not provide a filesystem. It simply resolves a full name
129      * and dispatches the request back to the filesystemmanager.<br>
130      * A provider with this capability cant tell much about the capabilities about the
131      * finally used filesystem in advance.
132      */

133     public static final Capability DISPATCHER = new Capability("DISPATCHER");
134
135     /**
136      * A compressed filesystem is a filesystem which use compression.
137      */

138     public static final Capability COMPRESS = new Capability("COMPRESS");
139
140     /**
141      * A virtual filesystem can be an archive like tar or zip.
142      */

143     public static final Capability VIRTUAL = new Capability("VIRTUAL");
144
145     private final String JavaDoc name;
146
147     private Capability(final String JavaDoc name)
148     {
149         this.name = name;
150     }
151
152     public String JavaDoc toString()
153     {
154         return name;
155     }
156 }
157
Popular Tags