com.jbbres.lib.actions.files
Class ActionsWorkflowFile

java.lang.Object
  extended by java.io.File
      extended by com.jbbres.lib.file.MimeFile
          extended by com.jbbres.lib.file.formats.AbstractContentFile<java.io.File[]>
              extended by com.jbbres.lib.file.formats.ZipFile
                  extended by com.jbbres.lib.actions.files.ActionsWorkflowFile
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<java.io.File>
Direct Known Subclasses:
ActionsExecutableFile

public class ActionsWorkflowFile
extends com.jbbres.lib.file.formats.ZipFile

Represents an Action(s) workflow file (.wkfl).

The workflow stored into the file can be accessed by calling the getWorkflow() method. The reflective method: parse(Workflow) stores the given workflow into the file, overriden any previous data.

[Note: the following description is given for information only and might change without notice. If you are willing to interact with workflow files, uses getWorkflow() and parse(Workflow).]
The workflow file is a ZIP file containing the following files:

Action(s) workflow files are similar to executable workflow files (.wexe). They formats are exactly the same. The only difference is in the way that Action(s) process them when it receives on the them as an argument:

ActionsExecutableFile extends java.io.File and inherits all its functionalities. Release Notes:

v1.1.0:

v1.1.1:

Since:
1.0.0
Version:
1.1.1
Author:
Jean-Baptiste Bres
See Also:
ActionsExecutableFile, Serialized Form

Field Summary
static java.lang.String MIME_DESCRIPTION
          The MIME type description.
static java.lang.String MIME_EXTENSION
          The file extension.
static java.lang.String MIME_TYPE
          The MIME type.
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
ActionsWorkflowFile(java.io.File file)
          Creates a new ActionsWorkflowFile instance by converting the pathname string of the given file into an abstract pathname.
ActionsWorkflowFile(java.io.File parent, java.lang.String child)
          Creates a new ActionsWorkflowFile instance from a parent abstract pathname and a child pathname string.
ActionsWorkflowFile(java.lang.String pathname)
          Creates a new ActionsWorkflowFile instance by converting the given pathname string into an abstract pathname.
ActionsWorkflowFile(java.lang.String parent, java.lang.String child)
          Creates a new ActionsWorkflowFile instance from a parent pathname string and a child pathname string.
ActionsWorkflowFile(java.net.URI uri)
          Creates a new ActionsWorkflowFile instance by converting the given file: URI into an abstract pathname.
 
Method Summary
 void addProgressListener(com.jbbres.lib.event.ProgressListener listener)
          Adds a progression listener.
 void fireProgressFinish(java.lang.String text)
          Calls the progressFinish(ProgressEvent) methods of all the listeners.
 void fireProgressStart(java.lang.String text)
          Calls the progressStart(ProgressEvent) methods of all the listeners.
 void fireProgressUpdate(int value, int min, int max, java.lang.String text)
          Calls the progressUpdate(ProgressEvent) methods of all the listeners.
 com.jbbres.lib.file.MimeType getMimeType()
           
static com.jbbres.lib.file.MimeType getStaticMimeType()
          Returns the MimeType object associated to this type of file.
 Workflow getWorkflow()
          Returns a Workflow instance of the workflow stored in the file.
 void parse(Workflow workflow)
          Parses the given workflow and stores it in the file.
 void removeProgressListener(com.jbbres.lib.event.ProgressListener listener)
          Removes a progression listener.
 
Methods inherited from class com.jbbres.lib.file.formats.ZipFile
getContent, parse
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIME_DESCRIPTION

public static final java.lang.String MIME_DESCRIPTION
The MIME type description.


MIME_EXTENSION

public static final java.lang.String MIME_EXTENSION
The file extension.

See Also:
Constant Field Values

MIME_TYPE

public static final java.lang.String MIME_TYPE
The MIME type.

See Also:
Constant Field Values
Constructor Detail

ActionsWorkflowFile

public ActionsWorkflowFile(java.io.File file)
Creates a new ActionsWorkflowFile instance by converting the pathname string of the given file into an abstract pathname. If the given string is the empty string, then the result is the empty abstract pathname.

Parameters:
file - - A file

ActionsWorkflowFile

public ActionsWorkflowFile(java.net.URI uri)
Creates a new ActionsWorkflowFile instance by converting the given file: URI into an abstract pathname.

The exact form of a file: URI is system-dependent, hence the transformation performed by this constructor is also system-dependent.

For a given abstract pathname f it is guaranteed that
new File( f.toURI()).equals( f.getAbsoluteFile())
so long as the original abstract pathname, the URI, and the new abstract pathname are all created in (possibly different invocations of) the same Java virtual machine. This relationship typically does not hold, however, when a file: URI that is created in a virtual machine on one operating system is converted into an abstract pathname in a virtual machine on a different operating system.

Parameters:
uri - - An absolute, hierarchical URI with a scheme equal to "file", a non-empty path component, and undefined authority, query, and fragment components

ActionsWorkflowFile

public ActionsWorkflowFile(java.lang.String parent,
                           java.lang.String child)
Creates a new ActionsWorkflowFile instance from a parent pathname string and a child pathname string.

If parent is null then the new File instance is created as if by invoking the single-argument File constructor on the given child pathname string.

Otherwise the parent pathname string is taken to denote a directory, and the child pathname string is taken to denote either a directory or a file. If the child pathname string is absolute then it is converted into a relative pathname in a system-dependent way. If parent is the empty string then the new File instance is created by converting child into an abstract pathname and resolving the result against a system-dependent default directory. Otherwise each pathname string is converted into an abstract pathname and the child abstract pathname is resolved against the parent.

Parameters:
parent - - The parent pathname string
child - - The child pathname string

ActionsWorkflowFile

public ActionsWorkflowFile(java.io.File parent,
                           java.lang.String child)
Creates a new ActionsWorkflowFile instance from a parent abstract pathname and a child pathname string.

If parent is null then the new File instance is created as if by invoking the single-argument File constructor on the given child pathname string.

Otherwise the parent abstract pathname is taken to denote a directory, and the child pathname string is taken to denote either a directory or a file. If the child pathname string is absolute then it is converted into a relative pathname in a system-dependent way. If parent is the empty abstract pathname then the new File instance is created by converting child into an abstract pathname and resolving the result against a system-dependent default directory. Otherwise each pathname string is converted into an abstract pathname and the child abstract pathname is resolved against the parent.

Parameters:
parent - - The parent abstract pathname
child - - The child pathname string

ActionsWorkflowFile

public ActionsWorkflowFile(java.lang.String pathname)
Creates a new ActionsWorkflowFile instance by converting the given pathname string into an abstract pathname. If the given string is the empty string, then the result is the empty abstract pathname.

Parameters:
pathname - - A pathname string
Method Detail

getStaticMimeType

public static com.jbbres.lib.file.MimeType getStaticMimeType()
Returns the MimeType object associated to this type of file.

Returns:
the MimeType associated to this type of file.

getWorkflow

public Workflow getWorkflow()
                     throws java.io.FileNotFoundException,
                            java.io.IOException,
                            ElementNotFoundException
Returns a Workflow instance of the workflow stored in the file.

Returns:
a Workflow instance of the workflow stored in the file.
Throws:
java.io.FileNotFoundException - - Signals that the file cannot be found
java.io.IOException - - Signals that an I/O exception has occurred.
ElementNotFoundException - - Signals that one of the element of the workflow cannot be found within the user element library.

parse

public void parse(Workflow workflow)
Parses the given workflow and stores it in the file.

Parameters:
workflow - - workflow to be parsed and stored.

addProgressListener

public void addProgressListener(com.jbbres.lib.event.ProgressListener listener)
Adds a progression listener.

Parameters:
listener - the listener

removeProgressListener

public void removeProgressListener(com.jbbres.lib.event.ProgressListener listener)
Removes a progression listener.

Parameters:
listener - the listener

fireProgressStart

public void fireProgressStart(java.lang.String text)
Calls the progressStart(ProgressEvent) methods of all the listeners.


fireProgressUpdate

public void fireProgressUpdate(int value,
                               int min,
                               int max,
                               java.lang.String text)
Calls the progressUpdate(ProgressEvent) methods of all the listeners.

Parameters:
value - - the current value of the progressiom
min - - the minimum value of the progression
max - - the maximum value of the progression

fireProgressFinish

public void fireProgressFinish(java.lang.String text)
Calls the progressFinish(ProgressEvent) methods of all the listeners.


getMimeType

public com.jbbres.lib.file.MimeType getMimeType()
Overrides:
getMimeType in class com.jbbres.lib.file.formats.ZipFile


To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.