Class FtpObject

java.lang.Object
org.mozilla.javascript.ScriptableObject
helma.scripting.rhino.extensions.FtpObject
All Implemented Interfaces:
Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.mozilla.javascript.SymbolScriptable

public class FtpObject extends org.mozilla.javascript.ScriptableObject
A FTP-client object that allows to do some FTP from HOP applications. FTP support is far from complete but can easily be extended if more functionality is needed. This uses the NetComponent classes from savarese.org (ex oroinc.com).
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject

    org.mozilla.javascript.ScriptableObject.KeyComparator
  • Field Summary

    Fields inherited from class org.mozilla.javascript.ScriptableObject

    CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

    Fields inherited from interface org.mozilla.javascript.Scriptable

    NOT_FOUND
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    boolean
    cd(String path)
     
    static FtpObject
    ftpObjCtor(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
     
     
    boolean
    getFile(String remoteFile, String localFile)
     
    getString(String remoteFile)
     
    static void
    init(org.mozilla.javascript.Scriptable scope)
     
    boolean
    lcd(String dir)
     
    boolean
    login(String username, String password)
    Login to the FTP server
    boolean
    Disconnect from FTP server
    boolean
     
    boolean
    putFile(String localFile, String remoteFile)
     
    boolean
    putString(Object obj, String remoteFile)
     
     
     

    Methods inherited from class org.mozilla.javascript.ScriptableObject

    applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface org.mozilla.javascript.Scriptable
      Specified by:
      getClassName in class org.mozilla.javascript.ScriptableObject
      Returns:
      ...
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      ...
    • toDetailString

      public String toDetailString()
      Returns:
      ...
    • login

      public boolean login(String username, String password)
      Login to the FTP server
      Parameters:
      username - the user name
      password - the user's password
      Returns:
      true if successful, false otherwise
    • cd

      public boolean cd(String path)
    • mkdir

      public boolean mkdir(String dir)
    • lcd

      public boolean lcd(String dir)
    • putFile

      public boolean putFile(String localFile, String remoteFile)
    • putString

      public boolean putString(Object obj, String remoteFile)
    • getFile

      public boolean getFile(String remoteFile, String localFile)
    • getString

      public Object getString(String remoteFile)
    • logout

      public boolean logout()
      Disconnect from FTP server
      Returns:
      true if successful, false otherwise
    • binary

      public boolean binary()
    • ascii

      public boolean ascii()
    • ftpObjCtor

      public static FtpObject ftpObjCtor(org.mozilla.javascript.Context cx, Object[] args, org.mozilla.javascript.Function ctorObj, boolean inNewExpr)
    • init

      public static void init(org.mozilla.javascript.Scriptable scope)