Package com.adobe.cq.launches.api
Interface LaunchManager
-
public interface LaunchManagerTheLaunchManagerprovides methods to deal with launches.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLaunchManager.CreateOptionsOptions object used forcreateLaunch(CreateOptions).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LaunchcloneLaunch(Launch launch, java.lang.String cloneTitle, java.util.Calendar liveDate, boolean isLiveCopy)Clone a launchLaunchcreateLaunch(LaunchManager.CreateOptions options)Create a new launch.LaunchcreateLaunch(Resource srcResource, java.lang.String title, java.util.Calendar liveDate, boolean isDeep, boolean isLiveCopy)Create a new launchvoiddeleteLaunch(Launch launch)Delete a launchLaunchgetLaunch(java.lang.String absPath)Get a launch from its pathjava.util.Collection<Launch>getLaunches(Resource resource)Get every launches the provided resource is contained injavax.jcr.RangeIteratorgetResourcesStatus(Launch launch, Resource startResource, boolean deep)Returns a collection of LaunchResourceStatuses comparing resources in a launch to their production version.javax.jcr.RangeIteratorgetResourcesStatus(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).javax.jcr.RangeIteratorgetResourcesStatus(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 versionLaunchupdateLaunchSources(Launch launch, java.util.List<LaunchSource> newLaunchSourceList)Update launch source list.
-
-
-
Method Detail
-
isInLaunch
boolean isInLaunch(Resource resource)
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
Launch createLaunch(LaunchManager.CreateOptions options) throws LaunchException
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, java.lang.String title, java.util.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, java.util.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
Launch getLaunch(java.lang.String absPath)
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
java.util.Collection<Launch> getLaunches(Resource resource) throws LaunchException
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
void promoteLaunch(Launch launch, LaunchPromotionParameters params) throws LaunchException
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
void deleteLaunch(Launch launch) throws LaunchException
Delete a launch- Parameters:
launch- The launch to delete- Throws:
LaunchException- if an error occurs while deleting the launch
-
cloneLaunch
Launch cloneLaunch(Launch launch, java.lang.String cloneTitle, java.util.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
javax.jcr.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
javax.jcr.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
javax.jcr.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
-
-