net.sf.jfilesync.plugins.net.items
Class TLocal_plugin

java.lang.Object
  extended by net.sf.jfilesync.plugins.net.items.AbstractLocalPlugin
      extended by net.sf.jfilesync.plugins.net.items.TLocal_plugin
All Implemented Interfaces:
GeneralPlugin, ConnectionPlugin
Direct Known Subclasses:
TLocal_WindowsPlugin

public class TLocal_plugin
extends AbstractLocalPlugin


Field Summary
private  java.lang.String absolutePath
           
(package private) static byte[] buf
           
(package private) static int bufsize
           
private  TConnectionData conData
           
private  boolean connected
           
private static java.util.logging.Logger LOGGER
           
private  TPathControlInterface pci
           
 
Fields inherited from class net.sf.jfilesync.plugins.net.items.AbstractLocalPlugin
log
 
Fields inherited from interface net.sf.jfilesync.plugins.GeneralPlugin
PROVIDES_FILETRANSFER, PROVIDES_PERMISSION_HANDLING, PROVIDES_RSYNC, PROVIDES_SHELL, PROVIDES_SYMLINK_HANDLING
 
Constructor Summary
TLocal_plugin()
           
 
Method Summary
 void abort()
           
 void chdir(java.lang.String path)
           
 void connect(TConnectionData connectData)
           
 void disconnect()
           
 boolean exists(java.lang.String path)
           
protected  TFileProperties extractFileProperties(java.io.File file)
           
 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()
           
 java.lang.String getVersionString()
           
 boolean hasConnectionOptions()
          if plugin provides additional options it will return true
 boolean isConnected()
           
 boolean isLink(java.lang.String path)
           
 boolean isLocalConnection()
           
 boolean isProvided(int feature)
          plug-in must provide information if a feature is provided or not
 TFileData ls()
           
 TFileData ls(java.lang.String path)
           
 java.lang.String pwd()
           
 boolean requiresPassword()
          returns true whether the user needs to enter a password considering the current plugin settings
 boolean requiresPort()
           
protected  void setAbsolutePath(java.lang.String path)
           
 void setHidden(java.lang.String path)
           
 void setPermissions(java.lang.String file, int perm)
           
 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
copyStream, deleteFile, get, get, isFile, mkdir, mkdirs, put, put, remove, rename, rmdir, setModificationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

absolutePath

private java.lang.String absolutePath

pci

private TPathControlInterface pci

connected

private boolean connected

conData

private TConnectionData conData

bufsize

static final int bufsize
See Also:
Constant Field Values

buf

static byte[] buf

LOGGER

private static final java.util.logging.Logger LOGGER
Constructor Detail

TLocal_plugin

public TLocal_plugin()
Method Detail

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

getVersionString

public java.lang.String getVersionString()
Overrides:
getVersionString in class AbstractLocalPlugin

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

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

isLocalConnection

public boolean isLocalConnection()
Specified by:
isLocalConnection in interface ConnectionPlugin
Overrides:
isLocalConnection 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

extractFileProperties

protected TFileProperties extractFileProperties(java.io.File file)
                                         throws java.io.IOException
Throws:
java.io.IOException

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

setAbsolutePath

protected void setAbsolutePath(java.lang.String path)

getAbsolutePath

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

pwd

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

abort

public void abort()
           throws java.io.IOException
Specified by:
abort in interface ConnectionPlugin
Overrides:
abort in class AbstractLocalPlugin
Throws:
java.io.IOException

shellRequest

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

setPermissions

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

exists

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

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

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

requiresPassword

public boolean requiresPassword()
Description copied from interface: ConnectionPlugin
returns true whether the user needs to enter a password considering the current plugin settings

Specified by:
requiresPassword in interface ConnectionPlugin
Overrides:
requiresPassword in class AbstractLocalPlugin

getProtocolString

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

requiresPort

public boolean requiresPort()

getDefaultPort

public int getDefaultPort()

setHidden

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