1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.secure;
17
18 import java.io.File;
19 import java.io.IOException;
20 import java.io.InputStream;
21 import java.io.OutputStream;
22
23 public interface SecureChannel {
24
25 void open() throws IOException;
26
27 void close();
28
29 void copyFile(File source, RemoteFile destination);
30
31 void copyLocationToFile(String location, RemoteFile destination);
32
33 void copyInputStreamToFile(InputStream source, RemoteFile destination);
34
35 void copyStringToFile(String string, RemoteFile destination);
36
37 void copyLocationToDirectory(String location, RemoteFile destination);
38
39 void copyFileToDirectory(File source, RemoteFile destination);
40
41 void copyFile(RemoteFile source, File destination);
42
43 void copyFileToDirectory(RemoteFile source, File destination);
44
45 RemoteFile getMetaData(String absolutePath);
46
47 boolean exists(String absolutePath);
48
49 boolean isDirectory(String absolutePath);
50
51 void deleteFile(String absolutePath);
52
53 void createDirectory(RemoteFile dir);
54
55 RemoteFile getWorkingDirectory();
56
57 Result executeCommand(String command);
58
59 Result executeCommand(String command, String stdin);
60
61 void executeNoWait(String command);
62
63 void copyRemoteFile(String absolutePath, OutputStream out) throws IOException;
64
65 void copyFile(RemoteFile source, OutputStream out) throws IOException;
66
67 String toString(RemoteFile source);
68
69 }