1 package org.kuali.common.util.secure; 2 3 import java.io.File; 4 import java.io.IOException; 5 import java.io.InputStream; 6 7 public interface SecureChannel { 8 9 void open() throws IOException; 10 11 void close(); 12 13 void copyFile(File source, RemoteFile destination); 14 15 void copyLocationToFile(String location, RemoteFile destination); 16 17 void copyInputStreamToFile(InputStream source, RemoteFile destination); 18 19 void copyStringToFile(String string, RemoteFile destination); 20 21 void copyLocationToDirectory(String location, RemoteFile destination); 22 23 void copyFileToDirectory(File source, RemoteFile destination); 24 25 void copyFile(RemoteFile source, File destination); 26 27 void copyFileToDirectory(RemoteFile source, File destination); 28 29 RemoteFile getMetaData(String absolutePath); 30 31 boolean exists(String absolutePath); 32 33 boolean isDirectory(String absolutePath); 34 35 void deleteFile(String absolutePath); 36 37 void createDirectory(RemoteFile dir); 38 39 RemoteFile getWorkingDirectory(); 40 41 Result executeCommand(String command); 42 43 Result executeCommand(String command, String stdin); 44 45 }