Package com._1c.g5.v8.bm.integration
Class BmCompoundTask
- java.lang.Object
-
- com._1c.g5.v8.bm.integration.AbstractBmTask<List<Object>>
-
- com._1c.g5.v8.bm.integration.BmCompoundTask
-
-
Constructor Summary
Constructors Constructor Description BmCompoundTask(String name)Creates a new compound task with nameBmCompoundTask(String name, List<IBmTask<?>> children)Creates a new compound taskBmCompoundTask(List<IBmTask<?>> children)Craetes a new compound task without task name, task name isnull
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(IBmTask<?> child)Adds a task to this compound task's list of tasks.List<Object>execute(IBmTransaction transaction, org.eclipse.core.runtime.IProgressMonitor monitor)The method called by the task executor with an active transaction.StringgetName()Gets the localized name of the task to be displayed on the UI, logs, etc.List<IBmTask<?>>getSubTasks()Gets subtasks of this taskintsize()Queries the number of child tasks that contain in this object.IBmTask<?>unwrap()Returns one of two things: the one task, if there is exactly one task orthisif there are multiple command.-
Methods inherited from class com._1c.g5.v8.bm.integration.AbstractBmTask
getId, getServiceId
-
-
-
-
Constructor Detail
-
BmCompoundTask
public BmCompoundTask(List<IBmTask<?>> children)
Craetes a new compound task without task name, task name isnull- Parameters:
children- a sequence of subtasks
-
BmCompoundTask
public BmCompoundTask(String name)
Creates a new compound task with name- Parameters:
name- name of task
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:IBmTaskGets the localized name of the task to be displayed on the UI, logs, etc.
-
execute
public List<Object> execute(IBmTransaction transaction, org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface:IBmTaskThe method called by the task executor with an active transaction. The method code must not commit or rollback the transaction.
If the task is not supposed to return a result, then it may be parameterized with
Voidand return null.- Parameters:
transaction- The active transaction. May not benull.monitor- The monitor to indicate the progress. May not benull.- Returns:
- execution result, may be
null.
-
append
public void append(IBmTask<?> child)
Adds a task to this compound task's list of tasks.- Parameters:
child- the bm task to append.
-
size
public int size()
Queries the number of child tasks that contain in this object.- Returns:
- the size of children tasks
-
unwrap
public IBmTask<?> unwrap()
Returns one of two things: the one task, if there is exactly one task orthisif there are multiple command.- Returns:
- the unwrapped task.
-
-