com.sap.scheduler.api

Class TaskStatus

java.lang.Object
  extended by com.sap.scheduler.api.TaskStatus
All Implemented Interfaces:
Serializable

public class TaskStatus
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static TaskStatus active
          TaskStatus active
protected static short DESCRIPTION_UNDEFINED
           
static TaskStatus finished
          TaskStatus finished
static TaskStatus hold
          TaskStatus hold
static Short STATUS_ACT_INITIAL_API
          Task has been created by an API-call
static Short STATUS_ACT_INITIAL_ZEROADMIN
          Task has been created by a ZeroAdmin template
static Short STATUS_ACT_TO_FIN_CANCELLED_API
          Task has been finished because it has been cancelled by an API-call
static Short STATUS_ACT_TO_FIN_CANCELLED_ZEROADMIN
          Task has been finished because it has been cancelled by ZeroAdmin logic
static Short STATUS_ACT_TO_FIN_FINISHED
          Task has been finished due to no execution times are left
static Short STATUS_ACT_TO_FIN_UNDEPLOYED
          Task has been finished due to the JobDefinition has been undeployed
static Short STATUS_ACT_TO_HOLD_API
          Task has been set to hold due to an API-call
static Short STATUS_ACT_TO_HOLD_ERROR
          Task has been set to hold due to error reasons
protected static short STATUS_ACTIVE
          This class represents the TaskStatus.
protected static Map<Short,String> STATUS_CHANGED_MAP
           
protected static short STATUS_FINISHED
           
protected static short STATUS_HOLD
           
static Short STATUS_HOLD_TO_ACT_API
          Task has been released because it has been set to active by an API-call
protected static Map<Short,String> STATUS_MAP
           
 
Constructor Summary
protected TaskStatus(short value, short descVal)
           
 
Method Summary
 boolean equals(Object obj)
          Is equal if m_value is equal.
 String getDescription()
          Returns the description.
 short getDescriptionValue()
          Return the description value.
 short getValue()
          Returns the value which represents the task status.
 int hashCode()
           
 boolean isActive()
          return true if the task is in state active, otherwise false.
 boolean isFinished()
          return true if the task is in state finished, otherwise false.
 boolean isHold()
          return true if the task is in state hold, otherwise false.
 String toString()
          Returns the status as String, without description.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_ACTIVE

protected static final short STATUS_ACTIVE
This class represents the TaskStatus. A Task can have the states active, hold and finished. There are also descriptions available which explains the current state in more detail.

See Also:
Constant Field Values

STATUS_FINISHED

protected static final short STATUS_FINISHED
See Also:
Constant Field Values

STATUS_HOLD

protected static final short STATUS_HOLD
See Also:
Constant Field Values

DESCRIPTION_UNDEFINED

protected static final short DESCRIPTION_UNDEFINED
See Also:
Constant Field Values

active

public static final TaskStatus active
TaskStatus active


finished

public static final TaskStatus finished
TaskStatus finished


hold

public static final TaskStatus hold
TaskStatus hold


STATUS_ACT_INITIAL_ZEROADMIN

public static final Short STATUS_ACT_INITIAL_ZEROADMIN
Task has been created by a ZeroAdmin template


STATUS_ACT_INITIAL_API

public static final Short STATUS_ACT_INITIAL_API
Task has been created by an API-call


STATUS_ACT_TO_FIN_FINISHED

public static final Short STATUS_ACT_TO_FIN_FINISHED
Task has been finished due to no execution times are left


STATUS_ACT_TO_FIN_UNDEPLOYED

public static final Short STATUS_ACT_TO_FIN_UNDEPLOYED
Task has been finished due to the JobDefinition has been undeployed


STATUS_ACT_TO_FIN_CANCELLED_ZEROADMIN

public static final Short STATUS_ACT_TO_FIN_CANCELLED_ZEROADMIN
Task has been finished because it has been cancelled by ZeroAdmin logic


STATUS_ACT_TO_FIN_CANCELLED_API

public static final Short STATUS_ACT_TO_FIN_CANCELLED_API
Task has been finished because it has been cancelled by an API-call


STATUS_ACT_TO_HOLD_API

public static final Short STATUS_ACT_TO_HOLD_API
Task has been set to hold due to an API-call


STATUS_ACT_TO_HOLD_ERROR

public static final Short STATUS_ACT_TO_HOLD_ERROR
Task has been set to hold due to error reasons


STATUS_HOLD_TO_ACT_API

public static final Short STATUS_HOLD_TO_ACT_API
Task has been released because it has been set to active by an API-call


STATUS_MAP

protected static final Map<Short,String> STATUS_MAP

STATUS_CHANGED_MAP

protected static final Map<Short,String> STATUS_CHANGED_MAP
Constructor Detail

TaskStatus

protected TaskStatus(short value,
                     short descVal)
Method Detail

getValue

public short getValue()
Returns the value which represents the task status.

Returns:
short the value

getDescription

public String getDescription()
Returns the description. In case the description has not been set, null will be returned.

Returns:
the description

getDescriptionValue

public short getDescriptionValue()
Return the description value. In case the description has not been set, 0 will be returned.

Returns:
the description value

toString

public String toString()
Returns the status as String, without description.

Overrides:
toString in class Object
Returns:
the m_value as String

equals

public boolean equals(Object obj)
Is equal if m_value is equal. Does not recognize the description. return true if equal

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
equals(Object obj)

isActive

public boolean isActive()
return true if the task is in state active, otherwise false.

Returns:
true if the task is in state active

isHold

public boolean isHold()
return true if the task is in state hold, otherwise false.

Returns:
true if the task is in state hold

isFinished

public boolean isFinished()
return true if the task is in state finished, otherwise false.

Returns:
true if the task is in state finished


Copyright 2009 SAP AG Complete Copyright Notice