venice
Class SaveCommand

java.lang.Object
  |
  +--venice.Command
        |
        +--venice.SaveCommand
Direct Known Subclasses:
SaveFileCommand

public abstract class SaveCommand
extends Command

SaveCommand implements saving of .venice-files which contains both the GXL model and the visualization layout. SaveCommand is an abstract class which can save the file to any OutputStream. Subclasses of this command must implement getOutputStream() method which opens output stream for writing.

Author:
Hannu Laurila

Fields inherited from class venice.Command
stAppModule
 
Constructor Summary
SaveCommand()
           
 
Method Summary
 void execute()
          This abstract method is overridden in subclasses.
protected abstract  java.io.OutputStream getOutputStream()
          returns OutputStream where the data can be saved. getOutputStream() may cancel saving operation by returning a null.
 
Methods inherited from class venice.Command
getAppModule, setAppModule
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

SaveCommand

public SaveCommand()
Method Detail

getOutputStream

protected abstract java.io.OutputStream getOutputStream()
returns OutputStream where the data can be saved. getOutputStream() may cancel saving operation by returning a null.

execute

public void execute()
Description copied from class: Command
This abstract method is overridden in subclasses. The overridden version does whatever the Command is supposed to do.

Users of these subclasses can rely on the Command interface, and just call execute() when they want the given subclass to perform an operation.

Overrides:
execute in class Command