net.sf.jfilesync.plugins.net.items
Class GnuPlugin

java.lang.Object
  extended by net.sf.jfilesync.plugins.net.items.AbstractLocalPlugin
      extended by net.sf.jfilesync.plugins.net.items.GnuPlugin
All Implemented Interfaces:
GeneralPlugin, ConnectionPlugin

public class GnuPlugin
extends AbstractLocalPlugin


Field Summary
private  TConnectionData connectData
           
private  boolean connected
           
private  java.lang.String currentPath
           
(package private) static java.util.logging.Logger log
           
private static int MAJOR
           
private static int MINOR
           
private  TPathControlInterface pci
           
 
Fields inherited from class net.sf.jfilesync.plugins.net.items.AbstractLocalPlugin
buf, bufsize
 
Fields inherited from interface net.sf.jfilesync.plugins.GeneralPlugin
PROVIDES_FILETRANSFER, PROVIDES_PERMISSION_HANDLING, PROVIDES_RSYNC, PROVIDES_SHELL, PROVIDES_SYMLINK_HANDLING
 
Constructor Summary
GnuPlugin()
           
 
Method Summary
 void chdir(java.lang.String path)
           
 void connect(TConnectionData connectData)
           
 void disconnect()
           
 boolean exists(java.lang.String path)
           
 java.lang.String getAbsolutePath()
           
 int getConnectionID()
          unique id of the connection plugin
 PluginOptionPanel getConnectionOptionPanel()
          returns a PluginOptionPanel with specific options for this plugin or null if the plugin does not provide options
 int getDefaultPort()
           
 java.lang.String getDescription()
           
 java.lang.String getLicense()
           
 int getMajorVersion()
           
 int getMinorVersion()
           
 java.lang.String getName()
           
 TPathControlInterface getPathControl()
           
 java.lang.String getProtocolString()
           
 TConnectionData getTConnectionData()
           
 boolean hasConnectionOptions()
          if plugin provides additional options it will return true
 boolean isConnected()
           
 boolean isLink(java.lang.String path)
           
 boolean isProvided(int feature)
          plug-in must provide information if a feature is provided or not
 TFileData ls()
           
 TFileData ls(java.lang.String path)
           
protected  TFileProperties parseLine(java.lang.String path, java.lang.String line)
           
 java.lang.String pwd()
           
 boolean requiresPort()
           
 void setHidden(java.lang.String path)
           
 void setPermissions(java.lang.String file, int permissions)
           
 void shellRequest(TTerminal shellArea)
           
 void symlink(java.lang.String dir, java.lang.String link)
           
 
Methods inherited from class net.sf.jfilesync.plugins.net.items.AbstractLocalPlugin
abort, copyStream, deleteFile, get, get, getVersionString, isFile, isLocalConnection, mkdir, mkdirs, put, put, remove, rename, requiresPassword, rmdir, setModificationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPath

private java.lang.String currentPath

log

static java.util.logging.Logger log

pci

private TPathControlInterface pci

connectData

private TConnectionData connectData

connected

private boolean connected

MAJOR

private static final int MAJOR
See Also:
Constant Field Values

MINOR

private static final int MINOR
See Also:
Constant Field Values
Constructor Detail

GnuPlugin

public GnuPlugin()
Method Detail

connect

public void connect(TConnectionData connectData)
             throws PluginConnectException
Specified by:
connect in interface ConnectionPlugin
Specified by:
connect in class AbstractLocalPlugin
Throws:
PluginConnectException

getTConnectionData

public TConnectionData getTConnectionData()

disconnect

public void disconnect()
Specified by:
disconnect in interface ConnectionPlugin
Specified by:
disconnect in class AbstractLocalPlugin

isConnected

public boolean isConnected()
Specified by:
isConnected in interface ConnectionPlugin
Specified by:
isConnected in class AbstractLocalPlugin

getPathControl

public TPathControlInterface getPathControl()
Specified by:
getPathControl in interface ConnectionPlugin
Specified by:
getPathControl in class AbstractLocalPlugin

ls

public TFileData ls()
             throws java.io.IOException
Specified by:
ls in interface ConnectionPlugin
Specified by:
ls in class AbstractLocalPlugin
Throws:
java.io.IOException

ls

public TFileData ls(java.lang.String path)
             throws java.io.IOException
Specified by:
ls in interface ConnectionPlugin
Specified by:
ls in class AbstractLocalPlugin
Throws:
java.io.IOException

parseLine

protected TFileProperties parseLine(java.lang.String path,
                                    java.lang.String line)

chdir

public void chdir(java.lang.String path)
           throws java.io.IOException
Specified by:
chdir in interface ConnectionPlugin
Specified by:
chdir in class AbstractLocalPlugin
Throws:
java.io.IOException

getAbsolutePath

public java.lang.String getAbsolutePath()
Specified by:
getAbsolutePath in interface ConnectionPlugin
Specified by:
getAbsolutePath in class AbstractLocalPlugin

exists

public boolean exists(java.lang.String path)
Specified by:
exists in interface ConnectionPlugin
Specified by:
exists in class AbstractLocalPlugin

setPermissions

public void setPermissions(java.lang.String file,
                           int permissions)
                    throws java.io.IOException
Specified by:
setPermissions in interface ConnectionPlugin
Specified by:
setPermissions in class AbstractLocalPlugin
Throws:
java.io.IOException

setHidden

public void setHidden(java.lang.String path)
               throws java.io.IOException
Throws:
java.io.IOException

symlink

public void symlink(java.lang.String dir,
                    java.lang.String link)
             throws java.io.IOException
Specified by:
symlink in class AbstractLocalPlugin
Throws:
java.io.IOException

isLink

public boolean isLink(java.lang.String path)
               throws java.io.IOException
Specified by:
isLink in interface ConnectionPlugin
Specified by:
isLink in class AbstractLocalPlugin
Throws:
java.io.IOException

shellRequest

public void shellRequest(TTerminal shellArea)
Specified by:
shellRequest in class AbstractLocalPlugin

getConnectionID

public int getConnectionID()
Description copied from interface: ConnectionPlugin
unique id of the connection plugin

Specified by:
getConnectionID in interface ConnectionPlugin
Specified by:
getConnectionID in class AbstractLocalPlugin

hasConnectionOptions

public boolean hasConnectionOptions()
Description copied from interface: ConnectionPlugin
if plugin provides additional options it will return true

Specified by:
hasConnectionOptions in interface ConnectionPlugin
Specified by:
hasConnectionOptions in class AbstractLocalPlugin

getConnectionOptionPanel

public PluginOptionPanel getConnectionOptionPanel()
Description copied from interface: ConnectionPlugin
returns a PluginOptionPanel with specific options for this plugin or null if the plugin does not provide options

Specified by:
getConnectionOptionPanel in interface ConnectionPlugin
Specified by:
getConnectionOptionPanel in class AbstractLocalPlugin

getProtocolString

public java.lang.String getProtocolString()
Specified by:
getProtocolString in interface ConnectionPlugin
Specified by:
getProtocolString in class AbstractLocalPlugin

isProvided

public boolean isProvided(int feature)
Description copied from interface: GeneralPlugin
plug-in must provide information if a feature is provided or not

Specified by:
isProvided in interface GeneralPlugin
Specified by:
isProvided in class AbstractLocalPlugin

getName

public java.lang.String getName()
Specified by:
getName in interface GeneralPlugin
Specified by:
getName in class AbstractLocalPlugin
Returns:
returns name of plug-in

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface GeneralPlugin
Specified by:
getDescription in class AbstractLocalPlugin
Returns:
returns a more detailed description of the plug-in

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface GeneralPlugin
Specified by:
getMajorVersion in class AbstractLocalPlugin

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface GeneralPlugin
Specified by:
getMinorVersion in class AbstractLocalPlugin

getLicense

public java.lang.String getLicense()
Specified by:
getLicense in interface GeneralPlugin
Specified by:
getLicense in class AbstractLocalPlugin

pwd

public java.lang.String pwd()
Specified by:
pwd in interface ConnectionPlugin
Specified by:
pwd in class AbstractLocalPlugin

requiresPort

public boolean requiresPort()

getDefaultPort

public int getDefaultPort()