Package com.adobe.cq.launches.api
Interface LaunchManager
-
public interface LaunchManager
TheLaunchManager
provides methods to deal with launches.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LaunchManager.CreateOptions
Options object used forcreateLaunch(CreateOptions)
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Launch
cloneLaunch(Launch launch, java.lang.String cloneTitle, java.util.Calendar liveDate, boolean isLiveCopy)
Clone a launchLaunch
createLaunch(LaunchManager.CreateOptions options)
Create a new launch.Launch
createLaunch(Resource srcResource, java.lang.String title, java.util.Calendar liveDate, boolean isDeep, boolean isLiveCopy)
Create a new launchvoid
deleteLaunch(Launch launch)
Delete a launchLaunch
getLaunch(java.lang.String absPath)
Get a launch from its pathjava.util.Collection<Launch>
getLaunches(Resource resource)
Get every launches the provided resource is contained inRangeIterator
getResourcesStatus(Launch launch, Resource startResource, boolean deep)
Returns a collection of LaunchResourceStatuses comparing resources in a launch to their production version.RangeIterator
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 (iftarget
isnull
).RangeIterator
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 (iftarget
isnull
).boolean
isInLaunch(Resource resource)
Checks if the provided resource is contained within one or more launchesvoid
promoteLaunch(Launch launch, LaunchPromotionParameters params)
Promote a launch to become the production versionLaunch
updateLaunchSources(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:
true
if 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.resource
andtitle
are 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
Launch
object loaded from the path ornull
if 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
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
-Resource
resource to start comparison fromdeep
- Iftrue
the 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 (iftarget
isnull
). The given start resource does not need to be aLaunch root resource
.- Parameters:
launch
- The launch to comparestartResource
-Resource
resource to start comparison fromdeep
- Iftrue
the child resources will be also analyzedtarget
- The target launch to compare to ornull
to 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 (iftarget
isnull
). The given start resource does not need to be aLaunch root resource
.- Parameters:
launch
- The launch to comparestartResource
-Resource
resource to start comparison fromlaunchPromotionScope
- based on promotion scope the child resources will be also analyzedtarget
- The target launch to compare to ornull
to compare to production- Returns:
- launch resource statuses
- Throws:
LaunchException
- if an error occurs while getting resource status
-
-