Package com.day.cq.wcm.command.api
Interface DeleteCommandBuilder
- All Superinterfaces:
CommandBuilder
builder interface for the delete command
-
Method Summary
Modifier and TypeMethodDescriptionwithArchive
(boolean archive) sets whether to archive resource before deletewithAssetReferenceResolver
(AssetReferenceResolver assetRefResolver) sets the reference resolver to access referenceswithCheckChildren
(boolean checkChildren) sets whether to check for child pages of selected items while deletionwithContentFragmentLaunchManager
(ContentFragmentLaunchManager contentFragmentLaunchManager) sets the content fragment launch manager to perform operationswithContentFragmentReferenceResolver
(ContentFragmentReferenceResolver contentFragmentRefResolver) sets the reference resolver to access references for content fragmentswithDeleteWhitelistRootPaths
(String[] deleteWhitelistRootPaths) set whitelist of root paths where deletion is allowedwithEventAdmin
(EventAdmin eventAdmin) initializes theEventAdmin
for the command builderwithForce
(boolean force) sets whether to do to force deleteinitializes theI18n
object for the command builderwithPageManager
(PageManager pageManager) initializes thePageManager
which provides methods for page level operationswithPathArgument
(DeleteCommandPathArgument pathArgument) append a path argumentwithPredicateProvider
(PredicateProvider predicateProvider) Deprecated.withPredicateProvider
(PredicateProvider predicateProvider) initializes thecom.day.cq.commons.predicates.PredicateProvider
for the command builderwithReplicator
(Replicator replicator) initializes theReplicator
for the command builderwithResourceResolver
(ResourceResolver resourceResolver) initializes theResourceResolver
for the command builderwithShallow
(boolean shallow) sets whether to perform a shallow operationMethods inherited from interface com.day.cq.wcm.command.api.CommandBuilder
build
-
Method Details
-
withResourceResolver
initializes theResourceResolver
for the command builder- Parameters:
resourceResolver
- the resource resolver for the command builder- Returns:
- this
DeleteCommandBuilder
-
withPageManager
initializes thePageManager
which provides methods for page level operations- Returns:
- this
DeleteCommandBuilder
-
withI18N
initializes theI18n
object for the command builder- Parameters:
i18n
- the internationalization object for the command builder- Returns:
- this
DeleteCommandBuilder
-
withReplicator
initializes theReplicator
for the command builder- Parameters:
replicator
- the replicator for the command builder- Returns:
- this
DeleteCommandBuilder
-
withEventAdmin
initializes theEventAdmin
for the command builder- Parameters:
eventAdmin
- theEventAdmin
for the command builder- Returns:
- this
DeleteCommandBuilder
-
withAssetReferenceResolver
@Nonnull DeleteCommandBuilder withAssetReferenceResolver(@Nonnull AssetReferenceResolver assetRefResolver) sets the reference resolver to access references- Parameters:
assetRefResolver
- theAssetReferenceResolver
to get references- Returns:
- this
DeleteCommandBuilder
-
withContentFragmentReferenceResolver
@Nonnull DeleteCommandBuilder withContentFragmentReferenceResolver(@Nonnull ContentFragmentReferenceResolver contentFragmentRefResolver) sets the reference resolver to access references for content fragments- Parameters:
contentFragmentRefResolver
- theContentFragmentReferenceResolver
to get references- Returns:
- this
DeleteCommandBuilder
-
withContentFragmentLaunchManager
DeleteCommandBuilder withContentFragmentLaunchManager(@Nonnull ContentFragmentLaunchManager contentFragmentLaunchManager) sets the content fragment launch manager to perform operations- Parameters:
contentFragmentLaunchManager
- theContentFragmentLaunchManager
to launch content fragment operations- Returns:
- this
DeleteCommandBuilder
-
withPredicateProvider
@Nonnull @Deprecated DeleteCommandBuilder withPredicateProvider(@Nonnull PredicateProvider predicateProvider) Deprecated.initializes thePredicateProvider
for the command builder- Parameters:
predicateProvider
- the predicate provider for the command builder- Returns:
- this
DeleteCommandBuilder
-
withPredicateProvider
initializes thecom.day.cq.commons.predicates.PredicateProvider
for the command builder- Parameters:
predicateProvider
- the predicate provider for the command builder- Returns:
- this
DeleteCommandBuilder
-
withDeleteWhitelistRootPaths
@Nonnull DeleteCommandBuilder withDeleteWhitelistRootPaths(@Nonnull String[] deleteWhitelistRootPaths) set whitelist of root paths where deletion is allowed- Parameters:
deleteWhitelistRootPaths
- list of root paths under which deletion is allowed- Returns:
- this
DeleteCommandBuilder
-
withShallow
sets whether to perform a shallow operation- Parameters:
shallow
- iftrue
only the content of the resource is deleted but not its child resources. only supported for pages. default is false- Returns:
- this
DeleteCommandBuilder
-
withForce
sets whether to do to force delete- Parameters:
force
- iffalse
deletion is executed only if selected item(s)- are not referenced by any pages
- don't have any child pages (if
checkChildren
below is true) - don't contain any activated assets
- Returns:
- this
DeleteCommandBuilder
-
withArchive
sets whether to archive resource before delete- Parameters:
archive
- iftrue
version will be created for item(s) and its children selected for deletion.- Returns:
- this
DeleteCommandBuilder
-
withCheckChildren
sets whether to check for child pages of selected items while deletion- Parameters:
checkChildren
- iftrue
, and ifforce
above is false, deletion isn't performed if selected items have child pages. default is false- Returns:
- this
DeleteCommandBuilder
-
createPathArgumentBuilder
- Returns:
- a new path argument builder
-
withPathArgument
append a path argument- Parameters:
pathArgument
- the path argument instance- Returns:
- this
DeleteCommandBuilder
-