KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.sslexplorer.vfs;
2
3 import java.io.IOException JavaDoc;
4 import java.net.URI JavaDoc;
5 import java.util.Date JavaDoc;
6 import java.util.Iterator JavaDoc;
7
8 import org.apache.commons.vfs.FileObject;
9
10 import com.sslexplorer.policyframework.LaunchSession;
11 import com.sslexplorer.vfs.webdav.DAVAuthenticationRequiredException;
12 import com.sslexplorer.vfs.webdav.DAVMultiStatus;
13
14 public interface VFSResource extends Comparable JavaDoc{
15
16     public static final String JavaDoc PREFIX = ".dav_";
17
18     public static final String JavaDoc SUFFIX = ".temp";
19     
20     public static final String JavaDoc PAGEFILE_SYS = "pagefile.sys";
21
22     public void verifyAccess() throws DAVAuthenticationRequiredException, Exception JavaDoc;
23     
24     public boolean isNull() throws IOException JavaDoc ;
25
26     public boolean isCollection() throws IOException JavaDoc;
27
28     public boolean isResource() throws IOException JavaDoc;
29     
30     public boolean isMount();
31
32     public VFSMount getMount();
33
34     public String JavaDoc getDisplayName();
35     
36     public String JavaDoc getWebFolderPath();
37
38     public String JavaDoc getBasename();
39
40     /**
41      * Get the path of this resource relative to its its <i>Mount</i>. This
42      * should be an empty string if the resource is the root of the mount.
43      *
44      * @return relative path
45      */

46     public String JavaDoc getRelativePath();
47
48     public URI JavaDoc getRelativeURI();
49
50     public VFSResource getParent();
51
52     public Iterator JavaDoc<VFSResource> getChildren() throws IOException JavaDoc, DAVAuthenticationRequiredException;
53
54     public String JavaDoc getContentType() throws IOException JavaDoc;
55
56     public Long JavaDoc getContentLength() throws IOException JavaDoc;
57
58     public Date JavaDoc getLastModified() throws IOException JavaDoc;
59
60     public String JavaDoc getEntityTag() throws IOException JavaDoc;
61
62     public void delete() throws DAVMultiStatus, IOException JavaDoc;
63
64     public void copy(VFSResource dest, boolean overwrite, boolean recursive) throws DAVMultiStatus, IOException JavaDoc;
65
66     public void move(VFSResource dest, boolean overwrite) throws DAVMultiStatus, IOException JavaDoc;
67
68     public void makeCollection() throws IOException JavaDoc;
69
70     public VFSInputStream getInputStream() throws IOException JavaDoc;
71
72     public VFSOutputStream getOutputStream() throws IOException JavaDoc;
73
74     public FileObject getFile() throws IOException JavaDoc;
75     
76     /**
77      * Return the full URI. This will be relative to the root of the VFS, i.e.
78      * <i>/[store]/[mount]/[path]</i>. The URI should encoded invalid
79      * path characters.
80      *
81      * @return full URI relative to the server root
82      */

83     public URI JavaDoc getFullURI() ;
84
85     /**
86      * Return the full URI. This will be relative to the root of the VFS, i.e.
87      * <i>/[store]/[mount]/[path]</i> and invalid path characters will not
88      * be encoded.
89      *
90      * @return full path relative to the server root
91      */

92     public String JavaDoc getFullPath();
93     
94     public LaunchSession getLaunchSession();
95 }
96
Popular Tags