Package com._1c.g5.v8.dt.md.api
Class AbstractMdObjectCollectionTask<P1 extends MdObject,P2 extends MdObject>
java.lang.Object
com._1c.g5.v8.bm.integration.AbstractBmTask<org.eclipse.core.runtime.IStatus>
com._1c.g5.v8.bm.integration.BmBasicTask
com._1c.g5.v8.bm.integration.BmBasicTask2Collection<P1,P2>
com._1c.g5.v8.dt.md.api.AbstractMdObjectCollectionTask<P1,P2>
- All Implemented Interfaces:
IBmTask<org.eclipse.core.runtime.IStatus>
- Direct Known Subclasses:
BasicDbObjectBasedOnTask
,DocumentInJournalsTask
,DocumentInSequncesTask
,DocumentJournalRegisteredDocumentsTask
,DocumentRegisterRecordsTask
public abstract class AbstractMdObjectCollectionTask<P1 extends MdObject,P2 extends MdObject>
extends BmBasicTask2Collection<P1,P2>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractMdObjectCollectionTask
(P1 object, Collection<P2> objects, String template) Instantiates a newIBmTask
successor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doExecute
(P1 object, Collection<P2> objects) Performs custom action.org.eclipse.core.runtime.IStatus
execute
(P1 object, Collection<P2> objects, org.eclipse.core.runtime.IProgressMonitor monitor) Encapsulates custom action declared in doExecute() with right way error handling.protected static String
getName
(MdObject object, Collection<? extends MdObject> objects, String messageTemplate) Returns the name of the task.Methods inherited from class com._1c.g5.v8.bm.integration.BmBasicTask2Collection
execute
Methods inherited from class com._1c.g5.v8.bm.integration.BmBasicTask
execute, getTransaction
Methods inherited from class com._1c.g5.v8.bm.integration.AbstractBmTask
getId, getName, getServiceId
-
Constructor Details
-
AbstractMdObjectCollectionTask
Instantiates a newIBmTask
successor. Builds name of the task using {@linkplain AbstractMdObjectCollectionTask# getName(MdObject, Collection, String) getName()} method and the given template.- Parameters:
object
- is the objectobjects
- is the collection of objectstemplate
- is the template message. It can include "{0}" and "{1}" symbols to insertobject
andobjects
string representation respectively
-
-
Method Details
-
execute
public org.eclipse.core.runtime.IStatus execute(P1 object, Collection<P2> objects, org.eclipse.core.runtime.IProgressMonitor monitor) Encapsulates custom action declared in doExecute() with right way error handling. -
doExecute
Performs custom action. E.g. addition to collection. Override in successors.- Parameters:
object
- is the objectobjects
- is the collection of objects
-
getName
protected static String getName(MdObject object, Collection<? extends MdObject> objects, String messageTemplate) Returns the name of the task. The name is generated by the given template andMdObject
s.- Parameters:
object
- is the objectobjects
- is the collection of objectsmessageTemplate
- is the template for name- Returns:
- task name
-