001    package org.kuali.common.util.secure;
002    
003    import java.io.File;
004    import java.io.IOException;
005    import java.io.InputStream;
006    
007    public interface SecureChannel {
008    
009            void open() throws IOException;
010    
011            void close();
012    
013            void copyFile(File source, RemoteFile destination);
014    
015            void copyLocationToFile(String location, RemoteFile destination);
016    
017            void copyInputStreamToFile(InputStream source, RemoteFile destination);
018    
019            void copyStringToFile(String string, RemoteFile destination);
020    
021            void copyLocationToDirectory(String location, RemoteFile destination);
022    
023            void copyFileToDirectory(File source, RemoteFile destination);
024    
025            void copyFile(RemoteFile source, File destination);
026    
027            void copyFileToDirectory(RemoteFile source, File destination);
028    
029            RemoteFile getMetaData(String absolutePath);
030    
031            boolean exists(String absolutePath);
032    
033            boolean isDirectory(String absolutePath);
034    
035            void deleteFile(String absolutePath);
036    
037            void createDirectory(RemoteFile dir);
038    
039            RemoteFile getWorkingDirectory();
040    
041            Result executeCommand(String command);
042    
043            Result executeCommand(String command, String stdin);
044    
045    }