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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CascadingDeleteServiceprotected final DuplicateContentTaskprotected final SecurityManagerprotected final Optional<UnsupportedPublishStatusTask> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCopyContentTask(CascadingDeleteService cascadingDeleteService, SecurityManager securityManager, DuplicateContentTask duplicateContentTask, @Nullable UnsupportedPublishStatusTask unsupportedPublishStatusTask, AbstractCopyContentTask.Config config) protectedAbstractCopyContentTask(CascadingDeleteService cascadingDeleteService, SecurityManager securityManager, DuplicateContentTask duplicateContentTask, AbstractCopyContentTask.Config config) -
Method Summary
Modifier and TypeMethodDescriptionprotected Entityrun(Optional<PrimaryKey> key, CommandContext commandContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
runin interfacePersistTask<PrimaryKey,Void> - Throws:
Exception
-
getMainEntity
-