Package com.adobe.cq.launches.api
Interface LaunchManager
- All Known Subinterfaces:
ContentFragmentLaunchManager
public interface LaunchManager
The
LaunchManager provides methods to deal with launches.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classOptions object used forcreateLaunch(CreateOptions). -
Method Summary
Modifier and TypeMethodDescriptioncloneLaunch(Launch launch, String cloneTitle, Calendar liveDate, boolean isLiveCopy) Clone a launchcreateLaunch(LaunchManager.CreateOptions options) Create a new launch.createLaunch(Resource srcResource, String title, Calendar liveDate, boolean isDeep, boolean isLiveCopy) Create a new launchvoiddeleteLaunch(Launch launch) Delete a launchGet a launch from its pathgetLaunches(Resource resource) Get every launches the provided resource is contained ingetResourcesStatus(Launch launch, Resource startResource, boolean deep) Returns a collection of LaunchResourceStatuses comparing resources in a launch to their production version.getResourcesStatus(Launch launch, Resource startResource, boolean deep, Launch target) Returns a collection of LaunchResourceStatuses comparing resources in a launch to the specified target launch or the production version (iftargetisnull).getResourcesStatus(Launch launch, Resource startResource, LaunchPromotionScope launchPromotionScope, Launch target) Returns a collection of LaunchResourceStatuses comparing resources in a launch to the specified target launch or the production version (iftargetisnull).booleanisInLaunch(Resource resource) Checks if the provided resource is contained within one or more launchesvoidpromoteLaunch(Launch launch, LaunchPromotionParameters params) Promote a launch to become the production versionupdateLaunchSources(Launch launch, List<LaunchSource> newLaunchSourceList) Update launch source list.
-
Method Details
-
isInLaunch
Checks if the provided resource is contained within one or more launches- Parameters:
resource- The resource to check- Returns:
trueif the provided resource is contained within one or more launches
-
createLaunch
Create a new launch.- Parameters:
options- the options for creating the launch.resourceandtitleare required.- Returns:
- the created launch
- Throws:
LaunchException- if an error occurs while creating the launch
-
createLaunch
Launch createLaunch(Resource srcResource, String title, Calendar liveDate, boolean isDeep, boolean isLiveCopy) throws LaunchException Create a new launch- Parameters:
srcResource- Source resourcetitle- The title of the new launchliveDate- The target live date of the launchisDeep- Iftrue, child resources of provided source resource will be included in the launchisLiveCopy- Iftrue, the launch will be a live copy of the current production version- Returns:
- The created launch
- Throws:
LaunchException- if an error occurs while creating the launch
-
updateLaunchSources
Launch updateLaunchSources(Launch launch, List<LaunchSource> newLaunchSourceList) throws LaunchException Update launch source list. This method will add new launchSource and remove existing launchSource from specified launch.- Parameters:
launch- The launch to updatenewLaunchSourceList- updated LaunchSource list- Returns:
- the updated launch
- Throws:
LaunchException- if an error occurs while updating the launch
-
getLaunch
Get a launch from its path- Parameters:
absPath- Launch absolute path- Returns:
- The
Launchobject loaded from the path ornullif the path does not resolve to a launch resource.
-
getLaunches
Get every launches the provided resource is contained in- Parameters:
resource- The resource- Returns:
- A collection of launches
- Throws:
LaunchException- if an error occurs while getting the launches
-
promoteLaunch
Promote a launch to become the production version- Parameters:
launch- The launch to promoteparams- Launch promotion parameters- Throws:
LaunchException- if an error occurs while promoting the launch
-
deleteLaunch
Delete a launch- Parameters:
launch- The launch to delete- Throws:
LaunchException- if an error occurs while deleting the launch
-
cloneLaunch
Launch cloneLaunch(Launch launch, String cloneTitle, Calendar liveDate, boolean isLiveCopy) throws LaunchException Clone a launch- Parameters:
launch- The launch to clonecloneTitle- Title to give to the cloneliveDate- The target live date of the cloned launchisLiveCopy- Iftrue, the cloned launch will be a live copy of the current production version- Returns:
- launch object
- Throws:
LaunchException- if an error occurs while cloning the launch
-
getResourcesStatus
RangeIterator getResourcesStatus(Launch launch, Resource startResource, boolean deep) throws LaunchException Returns a collection of LaunchResourceStatuses comparing resources in a launch to their production version. The given start resource does not need to be aLaunch root resource.- Parameters:
launch- The launch to comparestartResource-Resourceresource to start comparison fromdeep- Iftruethe child resources will be also analyzed- Returns:
- launch resource statuses
- Throws:
LaunchException- if an error occurs while getting resource status
-
getResourcesStatus
RangeIterator getResourcesStatus(Launch launch, Resource startResource, boolean deep, Launch target) throws LaunchException Returns a collection of LaunchResourceStatuses comparing resources in a launch to the specified target launch or the production version (iftargetisnull). The given start resource does not need to be aLaunch root resource.- Parameters:
launch- The launch to comparestartResource-Resourceresource to start comparison fromdeep- Iftruethe child resources will be also analyzedtarget- The target launch to compare to ornullto compare to production- Returns:
- launch resource statuses
- Throws:
LaunchException- if an error occurs while getting resource status
-
getResourcesStatus
RangeIterator getResourcesStatus(Launch launch, Resource startResource, LaunchPromotionScope launchPromotionScope, Launch target) throws LaunchException Returns a collection of LaunchResourceStatuses comparing resources in a launch to the specified target launch or the production version (iftargetisnull). The given start resource does not need to be aLaunch root resource.- Parameters:
launch- The launch to comparestartResource-Resourceresource to start comparison fromlaunchPromotionScope- based on promotion scope the child resources will be also analyzedtarget- The target launch to compare to ornullto compare to production- Returns:
- launch resource statuses
- Throws:
LaunchException- if an error occurs while getting resource status
-