Package com.adobe.cq.wcm.launches.cf
Interface ContentFragmentLaunchManager
- All Superinterfaces:
LaunchManager
Content fragment manager to perform operations like rebasing / getting differences between production and launch /
promoting to production / deleting to a launch and to the resource contained inside.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.adobe.cq.launches.api.LaunchManager
LaunchManager.CreateOptions -
Method Summary
Modifier and TypeMethodDescriptioncopyResource(Resource srcResource, String destinationResourcePath, String dstTitle) Copies a resource to a new destination inside a Launch.createLaunchContentResources(List<LaunchSource> inputLaunchResourceList, Resource launchPageResource, Page launchPage) Creates content resources inside the Content Fragment Launch.voiddeleteResource(Resource resource) Deletes a resource present inside a Launch.getDiffs(ContentFragmentLaunch cfLaunch, ContentFragmentLaunchOperationParameters params) Gets the differences between the Content Fragment Launch and main content.getLaunchById(String launchId) Gets the Content Fragment Launch by its id.moveResource(Resource srcResource, String destinationResourcePath, String dstTitle) Moves a resource to a new destination inside a Launch This method accounts for the source resource title, avoids name collisions and enables certain limitations that only apply to resources inside Content Fragment Launch.voidRebase a launch based on the main content (brings changes from the main content into the Launch).voidupdateLaunchAfterCreatingResources(Resource launchPageResource, List<Resource> launchContentResources) Performs actions like: - setting the last rebase field - updating references to a Content Fragment Launch and its resources after creating them.voidupdateSourceListInLaunch(Resource launchContentResource, List<LaunchSource> inputLaunchResourceList) Updates the list of Content Fragments sources of a Content Fragment Launch.Methods inherited from interface com.adobe.cq.launches.api.LaunchManager
cloneLaunch, createLaunch, createLaunch, deleteLaunch, getLaunch, getLaunches, getResourcesStatus, getResourcesStatus, getResourcesStatus, isInLaunch, promoteLaunch, updateLaunchSources
-
Method Details
-
rebaseLaunch
void rebaseLaunch(@Nonnull ContentFragmentLaunch launch, @Nullable ContentFragmentLaunchOperationParameters params) throws LaunchException Rebase a launch based on the main content (brings changes from the main content into the Launch).- Parameters:
launch- Content Fragment Launchparams- Parameters of the rebase operation of the Content Fragment Launch- Throws:
LaunchException- If the rebase operation fails
-
getDiffs
List<RebaseDiffEntry> getDiffs(@Nonnull ContentFragmentLaunch cfLaunch, @Nullable ContentFragmentLaunchOperationParameters params) Gets the differences between the Content Fragment Launch and main content.- Parameters:
cfLaunch- Content Fragment Launchparams- Parameters used to compute differences of a Content Fragment Launch- Returns:
- list of rebase diff entries
-
moveResource
Resource moveResource(@Nonnull Resource srcResource, @Nonnull String destinationResourcePath, @Nullable String dstTitle) Moves a resource to a new destination inside a Launch This method accounts for the source resource title, avoids name collisions and enables certain limitations that only apply to resources inside Content Fragment Launch.- Parameters:
srcResource- Source resourcedestinationResourcePath- Resource path of the destinationdstTitle- title of the moved resource- Returns:
- moved resource
-
copyResource
Resource copyResource(@Nonnull Resource srcResource, @Nonnull String destinationResourcePath, @Nullable String dstTitle) Copies a resource to a new destination inside a Launch. This method accounts for the source resource title, avoids name collisions and enables certain limitations that only apply to resources inside Content Fragment Launch.- Parameters:
srcResource- Source resourcedestinationResourcePath- Resource path of the destinationdstTitle- title of the copied resource- Returns:
- copied resource
-
deleteResource
Deletes a resource present inside a Launch. This method enables certain limitations that only apply to resources inside Content Fragment Launch.- Parameters:
resource- Resource to be deleted
-
updateSourceListInLaunch
void updateSourceListInLaunch(@Nonnull Resource launchContentResource, @Nonnull List<LaunchSource> inputLaunchResourceList) throws LaunchException Updates the list of Content Fragments sources of a Content Fragment Launch.- Parameters:
launchContentResource- The content resource of a Launch (which holds the Content Fragment Launch sources)inputLaunchResourceList- List of new Content Fragment Launch resources to replace the old one as sources- Throws:
LaunchException- If the rebase operation fails
-
updateLaunchAfterCreatingResources
void updateLaunchAfterCreatingResources(@Nonnull Resource launchPageResource, @Nonnull List<Resource> launchContentResources) Performs actions like: - setting the last rebase field - updating references to a Content Fragment Launch and its resources after creating them.- Parameters:
launchPageResource- The root page resource of a Content Fragment LaunchlaunchContentResources- List of content resources previously added to the Content Framgnet Launch
-
createLaunchContentResources
List<Resource> createLaunchContentResources(@Nonnull List<LaunchSource> inputLaunchResourceList, @Nonnull Resource launchPageResource, @Nonnull Page launchPage) Creates content resources inside the Content Fragment Launch.- Parameters:
inputLaunchResourceList- The list of sources used for creating the Content Fragment Launch content resourceslaunchPageResource- The root page resource of a Content Fragment LaunchlaunchPage- The root page of a Content Fragment Launch- Returns:
- The list of created content resources
-
getLaunchById
Gets the Content Fragment Launch by its id.- Parameters:
launchId- the id of the launch- Returns:
- the launch or null if no launch with the given id exists
-