001/** 002 * Copyright 2010-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.common.util.secure.channel; 017 018import java.io.File; 019import java.io.IOException; 020import java.io.InputStream; 021import java.io.OutputStream; 022 023/** 024 * @deprecated 025 */ 026@Deprecated 027public interface SecureChannel { 028 029 void open() throws IOException; 030 031 void close(); 032 033 void copyFile(File source, RemoteFile destination); 034 035 void copyLocationToFile(String location, RemoteFile destination); 036 037 void copyInputStreamToFile(InputStream source, RemoteFile destination); 038 039 void copyStringToFile(String string, RemoteFile destination); 040 041 void copyLocationToDirectory(String location, RemoteFile directory); 042 043 void copyFileToDirectory(File source, RemoteFile directory); 044 045 void copyFile(RemoteFile source, File destination); 046 047 void copyFileToDirectory(RemoteFile source, File directory); 048 049 RemoteFile getMetaData(String absolutePath); 050 051 boolean exists(String absolutePath); 052 053 boolean isDirectory(String absolutePath); 054 055 void deleteFile(String absolutePath); 056 057 void createDirectory(RemoteFile dir); 058 059 RemoteFile getWorkingDirectory(); 060 061 Result executeCommand(String command); 062 063 Result executeCommand(String command, String stdin); 064 065 void executeNoWait(String command); 066 067 void copyRemoteFile(String absolutePath, OutputStream out) throws IOException; 068 069 void copyFile(RemoteFile source, OutputStream out) throws IOException; 070 071 String toString(RemoteFile source); 072 073 String getUsername(); 074 075 String getHostname(); 076 077 int getPort(); 078 079}