Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.greenstone.gatherer.file
Class FileJob  view FileJob download FileJob.java

java.lang.Object
  extended byorg.greenstone.gatherer.file.FileJob

public class FileJob
extends java.lang.Object

This object encapsulates all the information about a certain file movement job. This job be to create a copy of a file from one place to another, or to simply delete a file.

Version:
2.3c

Field Summary
static byte COPY
          An element of the job type enumeration indicating a copy action.
static byte DELETE
          An element of the job type enumeration indicating a delete action.
private  javax.swing.tree.TreePath destination_path
          The path to the destination node as a string.
 boolean done
          true to mark that this file has already been copied, false otherwise.
 boolean folder_level
           
private  long id
          The unique identifier shared by all jobs created by the same action.
static byte MOVE
          An element of the job type enumeration indicating a move action.
private  javax.swing.tree.TreePath origin_path
          The path to the origin node as a string.
 org.greenstone.gatherer.util.DragComponent source
          The DragComponent source of this file, most likely a GTree.
 org.greenstone.gatherer.util.DragComponent target
          The DragComponent to move the file to, again most likely a GTree.
 byte type
          The type of this movement as an byte.
 boolean undo
          true if this should generate an undo event, false for a redo one.
 boolean undoable
          true if this job should generate an undo event of any kind.
 
Constructor Summary
FileJob(long id, org.greenstone.gatherer.util.DragComponent source, FileNode orig, org.greenstone.gatherer.util.DragComponent target, FileNode dest, byte type, boolean undo, boolean undoable)
          Constructor.
 
Method Summary
 FileNode getDestination()
          Retrieve the destination node.
 FileNode getOrigin()
          Retrieve the origin node.
 long ID()
          Retrieve the id for this job.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

done

public boolean done
true to mark that this file has already been copied, false otherwise.


folder_level

public boolean folder_level

undo

public boolean undo
true if this should generate an undo event, false for a redo one.


undoable

public boolean undoable
true if this job should generate an undo event of any kind.


type

public byte type
The type of this movement as an byte.


source

public org.greenstone.gatherer.util.DragComponent source
The DragComponent source of this file, most likely a GTree.


target

public org.greenstone.gatherer.util.DragComponent target
The DragComponent to move the file to, again most likely a GTree.


id

private long id
The unique identifier shared by all jobs created by the same action.


destination_path

private javax.swing.tree.TreePath destination_path
The path to the destination node as a string. Used because any reference based path or variables quickly becomes obsolete.


origin_path

private javax.swing.tree.TreePath origin_path
The path to the origin node as a string. Used because any reference based path or variables quickly becomes obsolete.


COPY

public static final byte COPY
An element of the job type enumeration indicating a copy action.

See Also:
Constant Field Values

DELETE

public static final byte DELETE
An element of the job type enumeration indicating a delete action.

See Also:
Constant Field Values

MOVE

public static final byte MOVE
An element of the job type enumeration indicating a move action.

See Also:
Constant Field Values
Constructor Detail

FileJob

public FileJob(long id,
               org.greenstone.gatherer.util.DragComponent source,
               FileNode orig,
               org.greenstone.gatherer.util.DragComponent target,
               FileNode dest,
               byte type,
               boolean undo,
               boolean undoable)
Constructor.

Method Detail

getDestination

public FileNode getDestination()
Retrieve the destination node. Watch out for stale versions by always attempting to load the node at destination_path first.


getOrigin

public FileNode getOrigin()
Retrieve the origin node. Watch out for stale versions by always attempting to load the node at origin_path first.


ID

public long ID()
Retrieve the id for this job.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).