org.yawlfoundation.yawl.engine.instance
Class WorkItemInstance

java.lang.Object
  extended by org.yawlfoundation.yawl.engine.instance.WorkItemInstance
All Implemented Interfaces:
YInstance

public class WorkItemInstance
extends Object
implements YInstance

Author: Michael Adams Creation Date: 11/11/2008


Constructor Summary
WorkItemInstance()
           
WorkItemInstance(org.jdom.Element instance)
           
WorkItemInstance(String xml)
           
WorkItemInstance(YWorkItem item)
           
 
Method Summary
 void addParameterInstance(ParameterInstance param)
           
 void addParameterInstance(YParameter parameter, YTask task, ParameterInstance.Usage usage, org.jdom.Element data)
           
 void addParameters(YTask task, org.jdom.Element data)
           
 void close(org.jdom.Document completionData)
           
 String formatAge(long age)
          formats a long time value into a string of the form 'ddd:hh:mm:ss'
 void fromXML(org.jdom.Element instance)
           
 void fromXML(String xml)
           
 String getCaseID()
           
 long getCompletionTime()
           
 String getCompletionTimeAsDateString()
           
 long getEnabledTime()
           
 String getEnabledTimeAsDateString()
           
 String getID()
           
 ParameterInstance getParameterInstance(String name)
           
 Map<String,ParameterInstance> getParameterMap()
           
 Collection<ParameterInstance> getParameters()
           
 String getPlainStatus()
           
 String getResourceName()
           
 long getStartTime()
           
 String getStartTimeAsDateString()
           
 String getStatus()
           
 String getTaskID()
           
 String getTaskName()
           
 long getTimerExpiry()
           
 String getTimerExpiryAsCountdown()
           
 String getTimerStatus()
           
 String marshalParameters()
           
 void setCompletionTime(long time)
           
 void setEnabledTime(long time)
           
 void setID(String s)
           
 void setParameterMap(Map<String,ParameterInstance> params)
           
 void setResourceName(String s)
           
 void setStartTime(long time)
           
 void setStatus(String s)
           
 void setTaskID(String s)
           
 void setTaskName(String name)
           
 void setTimerExpired()
           
 void setTimerExpiry(long expiry)
           
 void setTimerStatus(String s)
           
 String toXML()
           
 void updateParameterValues(org.jdom.Element data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkItemInstance

public WorkItemInstance()

WorkItemInstance

public WorkItemInstance(YWorkItem item)

WorkItemInstance

public WorkItemInstance(String xml)

WorkItemInstance

public WorkItemInstance(org.jdom.Element instance)
Method Detail

close

public void close(org.jdom.Document completionData)

getTaskID

public String getTaskID()

setTaskID

public void setTaskID(String s)

getTaskName

public String getTaskName()

setTaskName

public void setTaskName(String name)

getID

public String getID()

setID

public void setID(String s)

getCaseID

public String getCaseID()

getStatus

public String getStatus()

getPlainStatus

public String getPlainStatus()

setStatus

public void setStatus(String s)

getResourceName

public String getResourceName()

setResourceName

public void setResourceName(String s)

getTimerStatus

public String getTimerStatus()

setTimerExpired

public void setTimerExpired()

setTimerStatus

public void setTimerStatus(String s)

getEnabledTime

public long getEnabledTime()

getEnabledTimeAsDateString

public String getEnabledTimeAsDateString()

setEnabledTime

public void setEnabledTime(long time)

getStartTime

public long getStartTime()

getStartTimeAsDateString

public String getStartTimeAsDateString()

setStartTime

public void setStartTime(long time)

getCompletionTime

public long getCompletionTime()

getCompletionTimeAsDateString

public String getCompletionTimeAsDateString()

setCompletionTime

public void setCompletionTime(long time)

getTimerExpiry

public long getTimerExpiry()

setTimerExpiry

public void setTimerExpiry(long expiry)

getTimerExpiryAsCountdown

public String getTimerExpiryAsCountdown()

formatAge

public String formatAge(long age)
formats a long time value into a string of the form 'ddd:hh:mm:ss'

Parameters:
age - the time value (in milliseconds)
Returns:
the formatted time string

getParameterMap

public Map<String,ParameterInstance> getParameterMap()

setParameterMap

public void setParameterMap(Map<String,ParameterInstance> params)

getParameters

public Collection<ParameterInstance> getParameters()

addParameterInstance

public void addParameterInstance(ParameterInstance param)

addParameterInstance

public void addParameterInstance(YParameter parameter,
                                 YTask task,
                                 ParameterInstance.Usage usage,
                                 org.jdom.Element data)

addParameters

public void addParameters(YTask task,
                          org.jdom.Element data)

updateParameterValues

public void updateParameterValues(org.jdom.Element data)

getParameterInstance

public ParameterInstance getParameterInstance(String name)

marshalParameters

public String marshalParameters()

toXML

public String toXML()
Specified by:
toXML in interface YInstance

fromXML

public void fromXML(String xml)
Specified by:
fromXML in interface YInstance

fromXML

public void fromXML(org.jdom.Element instance)
Specified by:
fromXML in interface YInstance


Copyright © 2004-2012 The YAWL Foundation.