1 | package fr.alcatel.ether.app.common; |
---|
2 | |
---|
3 | // JDK - io |
---|
4 | import java.io.Serializable; |
---|
5 | import java.io.File; |
---|
6 | import java.io.IOException; |
---|
7 | // JDK - rmi |
---|
8 | import java.rmi.RemoteException; |
---|
9 | import java.rmi.NotBoundException; |
---|
10 | // JDK - net |
---|
11 | import java.net.MalformedURLException; |
---|
12 | |
---|
13 | public interface RemoteFile extends Serializable { |
---|
14 | /** obtain the file manager that handles this file */ |
---|
15 | public RemoteFileManager getFileManager( ) throws RemoteException, NotBoundException, MalformedURLException; |
---|
16 | /** obtain the host that this file resides on */ |
---|
17 | public String getHost( ) throws RemoteException; |
---|
18 | /** obtain the base directory of this file */ |
---|
19 | public String getBaseDir( ) throws RemoteException; |
---|
20 | /** update the base directory of this file */ |
---|
21 | public void setBaseDir( String base ) throws RemoteException; |
---|
22 | /** obtain the pathname of this file */ |
---|
23 | public String getPath( ) throws RemoteException; |
---|
24 | /** obtain the absolute pathname of this file, prefixed by base dir, eventually including path to archive */ |
---|
25 | public String getAbsolutePath( ) throws RemoteException; |
---|
26 | /** obtain the relative pathname of this file, eventually including path to archive */ |
---|
27 | public String getRelativePath( ) throws RemoteException; |
---|
28 | /** obtain the canonical pathname of this file, that is to say canonical (relative) path + file name */ |
---|
29 | public String getCanonicalPath( ) throws RemoteException; |
---|
30 | /** update the canonical pathname of this file, that is to say canonical (relative) path + file name */ |
---|
31 | public void setCanonicalPath( String canonical ) throws RemoteException; |
---|
32 | /** check if this file is contained in a tar archive */ |
---|
33 | public boolean isArchive( ) throws RemoteException; |
---|
34 | /** check if this file should include the canonical path in its absolute path */ |
---|
35 | public boolean usesCanonicalPath( ) throws RemoteException; |
---|
36 | /** make this file include the canonical path in pathname */ |
---|
37 | public void useCanonicalPath( boolean useCanonicalPath ) throws RemoteException; |
---|
38 | /** return the underlying File object (only good on the host's filesystem) */ |
---|
39 | public File getFile( ) throws RemoteException, IOException; |
---|
40 | } |
---|
41 | |
---|