com.sapportals.wcm.service.taskqueue

Interface ITask


public interface ITask

Entry of a task queue. This interface discribes a task to be executed by an application or service.

A task has the following properties: Name Required ID Yes Namespace Yes CreatedBy Yes CreationDate Yes State Yes LastModified Yes Priority Yes Value by name No Description No

A task object is created by the writer factory methods. This methods provide validation of the properties settings.

Copyright 2004 SAP AG


Field Summary
static int MAX_PRIORITY
          Default value to set the task priority to a maximum (100).
static int MIN_PRIORITY
          Default value to set the task priority to a minimum (0).
static int NORM_PRIORITY
          Default task priority (50).
 
Method Summary
 String getCreatedBy()
          Returns the user who created this entry.
 Date getCreationDate()
          Returns the date this entry was created.
 String getDescription()
          Returns a short description
 String getID()
          The tasks unique id will be created by the underlying persistence layer.
 Date getLastModified()
          The last time the task state was changed.
 String getNamespace()
          Returns the namespace this entry is assigned to.
 int getPriority()
          Gets the priority of this task.
 Properties getProperties()
          Returns the complete property bundle of this task queue
 TaskState getState()
          The current state of this task.
 String getValue(String name)
          Returns the property value for the specified key.
 

Field Detail

MIN_PRIORITY

public static final int MIN_PRIORITY
Default value to set the task priority to a minimum (0).

See Also:
Constant Field Values

NORM_PRIORITY

public static final int NORM_PRIORITY
Default task priority (50).

See Also:
Constant Field Values

MAX_PRIORITY

public static final int MAX_PRIORITY
Default value to set the task priority to a maximum (100).

See Also:
Constant Field Values
Method Detail

getID

public String getID()
The tasks unique id will be created by the underlying persistence layer.

Returns:
The tasks unique id.

getNamespace

public String getNamespace()
Returns the namespace this entry is assigned to.

Returns:
The namespace

getCreatedBy

public String getCreatedBy()
Returns the user who created this entry.

Returns:
The createdBy value

getCreationDate

public Date getCreationDate()
Returns the date this entry was created.

Returns:
The creationDate value

getState

public TaskState getState()
The current state of this task.

Returns:
The current state

getLastModified

public Date getLastModified()
The last time the task state was changed.

Returns:
The last time the task state was changed.

getPriority

public int getPriority()
Gets the priority of this task. Since the task queue service provides a priority queue, the returned value affects the FIFO order of the queue. Default settings are MIN_PRIORITY, NORM_PRIORITY and MAX_PRIORITY.

Returns:
The priority of this task.

getValue

public String getValue(String name)
Returns the property value for the specified key.

Parameters:
name - a unique name
Returns:
The property value

getProperties

public Properties getProperties()
Returns the complete property bundle of this task queue

Returns:
properties

getDescription

public String getDescription()
Returns a short description

Returns:
The description string


Copyright 2006 SAP AG Complete Copyright Notice