dsnserver
Class XmlRpcUploadFile

java.lang.Object
  extended by dsnserver.XmlRpcUploadFile
All Implemented Interfaces:
org.apache.xmlrpc.AuthenticatedXmlRpcHandler

public class XmlRpcUploadFile
extends java.lang.Object
implements org.apache.xmlrpc.AuthenticatedXmlRpcHandler

A function wich is used as a XmlRpc function. It is for uploading a .hex file to the folder hex/.

Author:
kaltt

Field Summary
(package private)  org.apache.xmlrpc.WebServer server
           
 
Constructor Summary
XmlRpcUploadFile(org.apache.xmlrpc.WebServer server)
           
 
Method Summary
 boolean checkPassword(java.lang.String user, java.lang.String password)
           
protected  java.lang.Object execute(java.lang.String method, java.util.Vector v)
           
 java.lang.Object execute(java.lang.String method, java.util.Vector v, java.lang.String user, java.lang.String password)
           
 java.lang.String uploadFile(java.lang.String filename, java.lang.String base64)
          A function wich is used as a XmlRpc function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

server

org.apache.xmlrpc.WebServer server
Constructor Detail

XmlRpcUploadFile

public XmlRpcUploadFile(org.apache.xmlrpc.WebServer server)
Method Detail

uploadFile

public java.lang.String uploadFile(java.lang.String filename,
                                   java.lang.String base64)
                            throws java.lang.Exception
A function wich is used as a XmlRpc function. It is for uploading a .hex file to the folder hex/.

Parameters:
String - filename (the name how the file should be stored in the folder hex/ (if this name already exists in the folder hex/, the file will be overwritten.))
String base64 (the file which you would like to upload. It has to be converted into base64.)
Returns:
String filename (the name of the stored file in the folder /hex)
Throws:
java.lang.Exception

execute

public java.lang.Object execute(java.lang.String method,
                                java.util.Vector v,
                                java.lang.String user,
                                java.lang.String password)
Specified by:
execute in interface org.apache.xmlrpc.AuthenticatedXmlRpcHandler

execute

protected java.lang.Object execute(java.lang.String method,
                                   java.util.Vector v)

checkPassword

public boolean checkPassword(java.lang.String user,
                             java.lang.String password)