Class AbstractCopyContentTask
java.lang.Object
ch.tocco.nice2.dms.spi.content.persist.AbstractCopyContentTask
- All Implemented Interfaces:
PersistTask<PrimaryKey,
Void>
- Direct Known Subclasses:
CopyPageContentTask
,CopyResourceContentTask
public abstract class AbstractCopyContentTask
extends Object
implements PersistTask<PrimaryKey,Void>
Abstract base task to copy the content of a node.
* Deletes the old content entity
* Creates new content entity using the given
duplicateContentTask
* Sets new publish status
If the current publish status is not supported, the given unsupportedPublishStatusTask
is executed.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CascadingDeleteService
protected final DuplicateContentTask
protected final SecurityManager
protected final Optional
<UnsupportedPublishStatusTask> -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCopyContentTask
(CascadingDeleteService cascadingDeleteService, SecurityManager securityManager, DuplicateContentTask duplicateContentTask, @Nullable UnsupportedPublishStatusTask unsupportedPublishStatusTask, AbstractCopyContentTask.Config config) protected
AbstractCopyContentTask
(CascadingDeleteService cascadingDeleteService, SecurityManager securityManager, DuplicateContentTask duplicateContentTask, AbstractCopyContentTask.Config config) -
Method Summary
Modifier and TypeMethodDescriptionprotected Entity
run
(Optional<PrimaryKey> key, CommandContext commandContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Field Details
-
cascadingDeleteService
-
securityManager
-
duplicateContentTask
-
unsupportedPublishStatusTask
-
-
Constructor Details
-
AbstractCopyContentTask
protected AbstractCopyContentTask(CascadingDeleteService cascadingDeleteService, SecurityManager securityManager, DuplicateContentTask duplicateContentTask, AbstractCopyContentTask.Config config) -
AbstractCopyContentTask
protected AbstractCopyContentTask(CascadingDeleteService cascadingDeleteService, SecurityManager securityManager, DuplicateContentTask duplicateContentTask, @Nullable @Nullable UnsupportedPublishStatusTask unsupportedPublishStatusTask, AbstractCopyContentTask.Config config)
-
-
Method Details
-
run
- Specified by:
run
in interfacePersistTask<PrimaryKey,
Void> - Throws:
Exception
-
getMainEntity
-