Commit 56ac49e5 authored by dillense's avatar dillense

Initial import of FTP injector for ISAC

parent ab9b16d0
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="lib" path="lib/commons-net-ftp-2.0.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/clif-core"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>FtpInjector</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<project name="ISAC-plugin_FtpInjector" default="compile">
<!-- General Configuration -->
<property name="plugin.name" value="FtpInjector"></property>
<property name="plugin.dir" value="${basedir}/../${plugin.name}"></property>
<property name="build.dir" location="${plugin.dir}/output"></property>
<property name="lib.dir" location="${plugin.dir}/lib"></property>
<property name="dist.dir" location="${plugin.dir}/dist"></property>
<property name="clif.classpath" value="/usr/local/eclipse/plugins/org.ow2.clif.console.plugin_2.0.0/lib/clif-core.jar"></property>
<!-- classpath definition -->
<available property="present" file="${lib.dir}"></available>
<target name="setClassPathWithLib" if="present">
<path id="common.compile.classpath">
<pathelement path="${clif.classpath}"></pathelement>
<pathelement path="${build.dir}"></pathelement>
<fileset dir="${lib.dir}" includes="*.jar"></fileset>
</path>
</target>
<target name="setClassPathWithoutLib" unless="present">
<path id="common.compile.classpath">
<pathelement path="${clif.classpath}"></pathelement>
<pathelement path="${build.dir}"></pathelement>
</path>
</target>
<!-- compile -->
<target name="compile" depends="setClassPathWithLib, setClassPathWithoutLib">
<delete dir="${build.dir}"></delete>
<mkdir dir="${build.dir}/FtpInjector"></mkdir>
<javac srcdir="${plugin.dir}/src" destdir="${build.dir}" classpathref="common.compile.classpath" debug="yes"></javac>
<copy todir="${build.dir}/FtpInjector" overwrite="yes" preservelastmodified="yes">
<fileset dir="${plugin.dir}" includes="isac-plugin.properties,plugin.xml,gui.xml"></fileset>
</copy>
</target>
<!-- clean -->
<target name="clean">
<echo>ISAC-plugin_FtpInjector</echo>
<delete dir="${build.dir}"></delete>
<delete dir="${dist.dir}"></delete>
</target>
<!-- Plugin jar generation -->
<target name="jar" depends="compile">
<delete dir="${dist.dir}"></delete>
<mkdir dir="${dist.dir}"></mkdir>
<jar basedir="${build.dir}" destfile="${dist.dir}/isac-${plugin.name}.jar" index="true"></jar>
<delete dir="${build.dir}"></delete>
</target>
<!-- Plugin zip distribution -->
<target name="distribution" depends="jar" description="Generate isac-plugin distribution. Generate a zip containing isac-plugins jar and librairies">
<mkdir dir="${build.dir}"></mkdir>
<copy todir="${build.dir}" file="${dist.dir}/isac-${plugin.name}.jar"></copy>
<antcall target="copyLib"></antcall>
<zip destfile="${dist.dir}/isac-${plugin.name}.zip">
<fileset dir="${build.dir}">
<include name="*"></include>
</fileset>
</zip>
</target>
<!-- Copy isac plugin distribution into global /dist/ouput -->
<target name="copyIsacDistribution">
<copy todir="${basedir}/../dist/output">
<fileset dir="${dist.dir}" includes="*.zip"></fileset>
</copy>
</target>
<target name="copyLib">
<copy todir="${build.dir}">
<fileset dir="${lib.dir}" includes="*.jar"></fileset>
</copy>
</target>
<target name="copyInDistrib">
<antcall target="copyDistInDistrib"></antcall>
<antcall target="copyLibInDistrib"></antcall>
</target>
<target name="copyDistInDistrib">
<copy todir="${clif.dest}">
<fileset dir="${dist.dir}" includes="*.jar"></fileset>
</copy>
</target>
<target name="copyLibInDistrib" if="present">
<copy todir="${clif.dest}">
<fileset dir="${lib.dir}" includes="*.jar"></fileset>
</copy>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE gui SYSTEM "classpath:org/ow2/clif/scenario/isac/dtd/plugin.dtd">
<gui>
<object name="SessionObject">
<params></params>
</object>
<sample name="cd">
<params>
<param label="Directory" name="path">
<field text="" size="24"></field>
</param>
</params>
</sample>
<sample name="connect">
<params>
<group name="Server address">
<param label="host" name="host">
<field text="" size="24"></field>
</param>
<param label="port" name="port">
<field text="21" size="8"></field>
</param>
</group>
<param label="Client IP address (optional)" name="localaddress">
<field text="" size="15"></field>
</param>
<param label="Comment (optional)" name="comment">
<field text="" size="20"></field>
</param>
</params>
</sample>
<sample name="disconnect">
<params>
<param label="Comment" name="comment">
<field text="" size="24"></field>
</param>
</params>
</sample>
<sample name="login">
<params>
<param label="Login" name="login">
<field text="" size="24"></field>
</param>
<param label="Password" name="password">
<field text="" size="12"></field>
</param>
<param label="Comment" name="comment">
<field text="" size="24"></field>
</param>
</params>
</sample>
<sample name="logout">
<params>
<param label="Comment" name="comment">
<field text="" size="24"></field>
</param>
</params>
</sample>
<sample name="noop">
<params>
<param label="Comment" name="comment">
<field text="" size="24"></field>
</param>
</params>
</sample>
<sample name="retrieve">
<params>
<param label="Remote file name" name="remote file">
<field text="" size="24"></field>
</param>
<group name="Content destination">
<param label="Retrieved data" name="destination">
<radiobutton>
<choice value="discard" default="true"></choice>
<choice value="write to local file" default="false"></choice>
</radiobutton>
</param>
<param label="Local file name" name="local file">
<field text="" size="24"></field>
</param>
</group>
<group name="Limit policy">
<param label="Limit" name="policy">
<combo>
<choice value="none" default="true"></choice>
<choice value="size" default="false"></choice>
<choice value="time" default="false"></choice>
<choice value="size or time" default="false"></choice>
<choice value="size and time" default="false"></choice>
</combo>
</param>
<param label="Number of bytes" name="size">
<field text="" size="8"></field>
</param>
<param label="Time (ms)" name="time">
<field text="" size="8"></field>
</param>
</group>
</params>
</sample>
<test name="connected">
<params>
<param label="option" name="options">
<checkbox>
<choice value="not" default="false"></choice>
</checkbox>
</param>
</params>
</test>
<test name="loggedIn">
<params>
<param label="Option" name="options">
<checkbox>
<choice value="not" default="false"></choice>
</checkbox>
</param>
</params>
</test>
<test name="replyCodeIs">
<params>
<param label="Reply code value" name="code">
<field text="" size="8"></field>
</param>
<param label="Option" name="options">
<checkbox>
<choice value="not" default="false"></choice>
</checkbox>
</param>
</params>
</test>
<control name="lcd">
<params>
<param label="Directory path" name="path">
<field text="" size="24"></field>
</param>
</params>
</control>
<sample name="setFileType">
<params>
<param label="File type" name="type">
<combo>
<choice value="ASCII" default="true"></choice>
<choice value="binary" default="false"></choice>
<choice value="EBCDIC" default="false"></choice>
<choice value="local" default="false"></choice>
</combo>
</param>
<param label="Byte size (if local type)" name="byte size">
<field text="8" size="8"></field>
</param>
<param label="Format (if ASCII or EBCDIC type)" name="format">
<combo>
<choice value="non print" default="true"></choice>
<choice value="telnet" default="false"></choice>
<choice value="carriage control" default="false"></choice>
</combo>
</param>
</params>
</sample>
<sample name="store">
<params>
<group name="Content">
<param label="get data" name="content">
<radiobutton>
<choice value="from a file" default="true"></choice>
<choice value="generated" default="false"></choice>
</radiobutton>
</param>
<param label="file name" name="file">
<field text="" size="24"></field>
</param>
</group>
<group name="Limit policy">
<param label="Policy" name="limit">
<combo>
<choice value="none" default="true"></choice>
<choice value="size" default="false"></choice>
<choice value="time" default="false"></choice>
<choice value="size or time" default="false"></choice>
<choice value="size and time" default="false"></choice>
</combo>
</param>
<param label="number of bytes" name="size">
<field text="" size="8"></field>
</param>
<param label="time (ms)" name="time">
<field text="" size="8"></field>
</param>
</group>
<param label="Remote file name" name="remote file">
<field text="" size="24"></field>
</param>
</params>
</sample>
<sample name="delete">
<params>
<param label="Remote file name" name="file">
<field text="" size="24"></field>
</param>
</params>
</sample>
</gui>
plugin.name=FtpInjector
plugin.guiFile=gui.xml
plugin.xmlFile=plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plugin SYSTEM "classpath:org/ow2/clif/scenario/isac/dtd/plugin.dtd">
<plugin name="FtpInjector">
<object class="org.ow2.isac.plugin.ftpinjector.SessionObject">
<params></params>
<help>Load injector for FTP servers. Use connect first before performing any other command. Provided variables: ${plugin-id:reply code} gives the reply code of the last command, ${plugin-id:replay string} gives the full reply message.</help>
</object>
<sample name="cd" number="5">
<params>
<param name="path" type="String"></param>
</params>
<help>Changes current remote directory. Must be connected.</help>
</sample>
<sample name="connect" number="0">
<params>
<param name="host" type="String"></param>
<param name="port" type="String"></param>
<param name="localaddress" type="String"></param>
<param name="comment" type="String"></param>
</params>
<help>Connects to an FTP server.</help>
</sample>
<sample name="disconnect" number="2">
<params>
<param name="comment" type="String"></param>
</params>
<help>Disconnects from the FTP server. Must be connected already.</help>
</sample>
<sample name="login" number="6">
<params>
<param name="login" type="String"></param>
<param name="password" type="String"></param>
<param name="comment" type="String"></param>
</params>
<help>Log in the server, giving authentication information. Must be connected already.</help>
</sample>
<sample name="logout" number="8">
<params>
<param name="comment" type="String"></param>
</params>
<help>Log out from the server. Must be connected already.</help>
</sample>
<sample name="noop" number="10">
<params>
<param name="comment" type="String"></param>
</params>
<help>Send noop command (convenience to avoid time-out driven disconnections by the server). Must be connected already.</help>
</sample>
<sample name="retrieve" number="12">
<params>
<param name="remote file" type="String"></param>
<param name="destination" type="String"></param>
<param name="local file" type="String"></param>
<param name="policy" type="String"></param>
<param name="size" type="String"></param>
<param name="time" type="String"></param>
</params>
<help>Download a file from the server. Must be connected already.</help>
</sample>
<test name="connected" number="3">
<params>
<param name="options" type="String"></param>
</params>
<help>True if the FTP client is currently connected to a server, false otherwise, or the contrary if the "not" option is enabled.</help>
</test>
<test name="loggedIn" number="7">
<params>
<param name="options" type="String"></param>
</params>
<help>True if the FTP client is currently logged in, false otherwise, or the contrary if the "not" option is enabled.</help>
</test>
<test name="replyCodeIs" number="9">
<params>
<param name="code" type="String"></param>
<param name="options" type="String"></param>
</params>
<help>Tests the reply code value regarding the last FTP command issued.</help>
</test>
<control name="lcd" number="4">
<params>
<param name="path" type="String"></param>
</params>
<help>Changes local current directory.</help>
</control>
<sample name="setFileType" number="11">
<params>
<param name="type" type="String"></param>
<param name="byte size" type="String"></param>
<param name="format" type="String"></param>
</params>
<help>Set data type for next file transfers. Must be connected already.</help>
</sample>
<sample name="store" number="1">
<params>
<param name="content" type="String"></param>
<param name="file" type="String"></param>
<param name="limit" type="String"></param>
<param name="size" type="String"></param>
<param name="time" type="String"></param>
<param name="remote file" type="String"></param>
</params>
<help>Upload a file to the FTP server. Must be connected already.</help>
</sample>
<sample name="delete" number="13">
<params>
<param name="file" type="String"></param>
</params>
<help>Deletes a file on the server. Must be connected already.</help>
</sample>
</plugin>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment