SAP NetWeaver '04

com.sapportals.wcm.service.taskqueue
Interface ITaskQueueWriter

[contained in: com.sap.netweaver.bc.sf.service.par - bc.sf.service.taskqueue_api.jar]
public interface ITaskQueueWriter

A writer provides write-acces to a task queue belonging to a specific namespace. In addition, it acts as a validating factory for tasks.


Method Summary
 ITask add(ITask task)
          Adds an entry to the end of the queue.
 ITask createTask()
          Factory method to create task objects.
 ITask createTask(java.util.Properties properties)
          Factory method to create task objects.
 ITask createTask(java.util.Properties properties, java.lang.String description)
          Factory method to create task objects.
 ITask createTask(java.util.Properties properties, java.lang.String description, int priority)
          Factory method to create task objects.
 java.lang.String getNamespace()
          Returns the namespace of this writer.
 java.lang.String getUser()
          Returns the user of this writer.
 void setState(ITask task, TaskState state)
          Sets the task's state to a new state .
 

Method Detail

add

public ITask add(ITask task)
          throws WcmException
Adds an entry to the end of the queue. Raises an excpetion if the entry is already added to the queue.

The task' state is set NEW during this operation. According to the persistence layer a correct task id will be created.

Parameters:
task - The task to add
Throws:
WcmException - raised in failure situation

setState

public void setState(ITask task,
                     TaskState state)
              throws WcmException
Sets the task's state to a new state . The task must belong to the writer's namespace. The new state must be a legal transition of the old state (see ITask.getState()) for details.
Parameters:
state - The state to set.
task - The task to set the state.
Throws:
WcmException - Exception raised in failure situation

createTask

public ITask createTask()
                 throws WcmException
Factory method to create task objects. Constructs a task object with correct settings for user, namespace, date of creation, priortiy set to normal.
Returns:
A task belonging to the writer's namespace.
Throws:
WcmException - Exception raised in failure situation

createTask

public ITask createTask(java.util.Properties properties)
                 throws WcmException
Factory method to create task objects. Adds a set of properties to the task. Only string values are allowed as property values.
Parameters:
properties - Adds a set of properties to the task.
Returns:
The created task
Throws:
WcmException - Exception raised in failure situation
See Also:
createTask()

createTask

public ITask createTask(java.util.Properties properties,
                        java.lang.String description)
                 throws WcmException
Factory method to create task objects. Adds a short descritption description to the task. The description string may be null .
Parameters:
properties - Adds a set of properties to the task.
description - Adds a short descritption description to the task.
Returns:
The created task
Throws:
WcmException - Exception raised in failure situation
See Also:
createTask(Properties)

createTask

public ITask createTask(java.util.Properties properties,
                        java.lang.String description,
                        int priority)
                 throws WcmException
Factory method to create task objects. Sets a priority priority value to the task. The priory value must lie between 0 and 100.
Parameters:
properties - Adds a set of properties to the task.
description - Adds a short descritption description to the task.
priority - The priority value that affect the processing order of tasks.
Returns:
The created task
Throws:
WcmException - Exception raised in failure situation
See Also:
createTask(Properties,String)

getUser

public java.lang.String getUser()
Returns the user of this writer.
Returns:
Returns the user of this writer.

getNamespace

public java.lang.String getNamespace()
Returns the namespace of this writer.
Returns:
Returns the namespace of this writer.

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.