org.syrup.helpers
Class PTaskImpl

java.lang.Object
  extended byorg.syrup.helpers.PTaskImpl
All Implemented Interfaces:
PTask, Task

public class PTaskImpl
extends java.lang.Object
implements PTask

A generic PTask Implementation.

Author:
Robbert van Dalen

Constructor Summary
PTaskImpl(java.lang.String parentKey, java.lang.String key, boolean or_type, java.lang.String function_class, java.lang.String name, java.lang.String description, java.lang.String parameter, java.lang.String environment, boolean done, long creation_time, long modification_time, long modifications, boolean executable, java.lang.String worker, boolean isParent)
          Constructor for the PTaskImpl object
 
Method Summary
 long creationTime()
          Returns the creation time of a PTask.
 java.lang.String description()
          Returns the defined description of a Task.
 boolean done()
          Returns true if this PTask is done.
 java.lang.String environment()
          Returns the logical environment of the Task.
 boolean executable()
          Returns true if this PTask is executable.
 java.lang.String functionClass()
          Returns the classname of the Function.
 boolean isParent()
          Returns true if this PTask is a parent.
 java.lang.String key()
          Returns the key that the WorkSpace uses to identify a PTask.
 long modifications()
          Returns the number of modifications since creation.
 long modificationTime()
          Returns the last modification time since creation.
 java.lang.String name()
          Returns the defined name of a Task.
 boolean orType()
          Returns true if the type is OR.
 java.lang.String parameter()
          Returns the static parameter to parameterize the Task.
 java.lang.String parentKey()
          Returns the parent identifier.
 java.lang.String toString()
           
 java.lang.String worker()
          Returns the Worker's address (URL) that is currently executing this PTask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PTaskImpl

public PTaskImpl(java.lang.String parentKey,
                 java.lang.String key,
                 boolean or_type,
                 java.lang.String function_class,
                 java.lang.String name,
                 java.lang.String description,
                 java.lang.String parameter,
                 java.lang.String environment,
                 boolean done,
                 long creation_time,
                 long modification_time,
                 long modifications,
                 boolean executable,
                 java.lang.String worker,
                 boolean isParent)
Constructor for the PTaskImpl object

Parameters:
parentKey - The parentKey attribute.
key - The key attribute.
or_type - the orType attribute.
function_class - The functionClass attribute.
name - The name attribute.
description - The description attribute.
environment - The environment attribute.
parameter - The parameter attribute
done - The done attribute.
creation_time - The creationTime attribute.
modification_time - The modificationTime attribute.
modifications - The modifications attribute.
executable - The executable attribute.
worker - The worker attribute.
isParent - The isParent attribute.
Method Detail

name

public java.lang.String name()
Description copied from interface: Task
Returns the defined name of a Task. All Tasks that are part of the same Workflow (share the same parent) should have an unique name.

Specified by:
name in interface Task
Returns:
The defined name.

description

public java.lang.String description()
Description copied from interface: Task
Returns the defined description of a Task. This can be used as an annotation for the execution of a Task, or as a match criterium to fetch Tasks from a WorkSpace.

Specified by:
description in interface Task
Returns:
The defined description.

environment

public java.lang.String environment()
Description copied from interface: Task
Returns the logical environment of the Task.

Specified by:
environment in interface Task
Returns:
The logical environment.

functionClass

public java.lang.String functionClass()
Description copied from interface: Task
Returns the classname of the Function.

Specified by:
functionClass in interface Task
Returns:
The Function's classname.

orType

public boolean orType()
Description copied from interface: Task
Returns true if the type is OR. Returns false if the type is AND. OR Tasks are marked for execution if one of the inputs is full. AND Tasks are marked for execution if both inputs are full.

Specified by:
orType in interface Task
Returns:
the type.

parameter

public java.lang.String parameter()
Description copied from interface: Task
Returns the static parameter to parameterize the Task.

Specified by:
parameter in interface Task
Returns:
The static parameter.

parentKey

public java.lang.String parentKey()
Description copied from interface: PTask
Returns the parent identifier. The parent of a PTask is fixed and cannot change during the life-cyle of a Workspace.

Specified by:
parentKey in interface PTask
Returns:
The parent identifier key.
See Also:
PTask.key()

key

public java.lang.String key()
Description copied from interface: PTask
Returns the key that the WorkSpace uses to identify a PTask. This identifier is fixed and cannot change during the life-cyle of a Workspace.

Specified by:
key in interface PTask
Returns:
The identifier key.

modifications

public long modifications()
Description copied from interface: PTask
Returns the number of modifications since creation. Because PTasks can be executed multiple times, this number can more then 1. Note that the number of modifications can only increase during the life-cyle of a Workspace.

Specified by:
modifications in interface PTask
Returns:
The number of modifications since creation.

modificationTime

public long modificationTime()
Description copied from interface: PTask
Returns the last modification time since creation. This changes when the number of modifications is increased.

Specified by:
modificationTime in interface PTask
Returns:
The last modification time since creation.

creationTime

public long creationTime()
Description copied from interface: PTask
Returns the creation time of a PTask. This is fixed and cannot change during the life-cyle of a Workspace.

Specified by:
creationTime in interface PTask

executable

public boolean executable()
Description copied from interface: PTask
Returns true if this PTask is executable.

Specified by:
executable in interface PTask
Returns:
true if this PTask is executable.

done

public boolean done()
Description copied from interface: PTask
Returns true if this PTask is done. When a PTask is done, it will be indefinitely during the life-cyle of a Workspace.

Specified by:
done in interface PTask
Returns:
true if this PTask is done.

worker

public java.lang.String worker()
Description copied from interface: PTask
Returns the Worker's address (URL) that is currently executing this PTask.

Specified by:
worker in interface PTask
Returns:
The Worker's address executing this PTask.

isParent

public boolean isParent()
Description copied from interface: PTask
Returns true if this PTask is a parent. When a PTask is made parent, it will be indefinitely during the life-cyle of a Workspace.

Specified by:
isParent in interface PTask
Returns:
true if this PTask is a parent.

toString

public java.lang.String toString()