net.sf.tomp.xtcl.command
Class Save

java.lang.Object
  extended by net.sf.tomp.xtcl.command.AbstractCommand
      extended by net.sf.tomp.xtcl.command.VarCommand
          extended by net.sf.tomp.xtcl.command.FileCommand
              extended by net.sf.tomp.xtcl.command.Save
All Implemented Interfaces:
Command

public class Save
extends FileCommand

Saves a DOM Document to File.

Author:
tomp

Field Summary
 
Fields inherited from class net.sf.tomp.xtcl.command.FileCommand
fileName
 
Fields inherited from class net.sf.tomp.xtcl.command.VarCommand
var
 
Constructor Summary
Save()
           
 
Method Summary
 int execute(Context context)
          Saves a DOM Document to File.
 java.lang.String toString()
           
 
Methods inherited from class net.sf.tomp.xtcl.command.FileCommand
getFile, setFile
 
Methods inherited from class net.sf.tomp.xtcl.command.VarCommand
setVar
 
Methods inherited from class net.sf.tomp.xtcl.command.AbstractCommand
done, initParameters, listArray, listList, listMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Save

public Save()
Method Detail

execute

public int execute(Context context)
            throws java.lang.Exception
Saves a DOM Document to File.

Specified by:
execute in interface Command
Overrides:
execute in class AbstractCommand
Parameters:
context - Context this command will be executed in.
Returns:
always 0 == success, OK
Throws:
java.lang.Exception - only if I/O error occurs when reporting the result to user.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
"SAVE " + var + " -> " + fileName;


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.