Interface LaunchManager


  • public interface LaunchManager
    The LaunchManager provides methods to deal with launches.
    • 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​(Resource srcResource,
                            java.lang.String title,
                            java.util.Calendar liveDate,
                            boolean isDeep,
                            boolean isLiveCopy)
                     throws LaunchException
        Create a new launch
        Parameters:
        srcResource - Source resource
        title - The title of the new launch
        liveDate - The target live date of the launch
        isDeep - If true, child resources of provided source resource will be included in the launch
        isLiveCopy - If true, 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 update
        newLaunchSourceList - 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 or null 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 promote
        params - 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 clone
        cloneTitle - Title to give to the clone
        liveDate - The target live date of the cloned launch
        isLiveCopy - If true, 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 a Launch root resource.
        Parameters:
        launch - The launch to compare
        startResource - Resource resource to start comparison from
        deep - If true 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 (if target is null). The given start resource does not need to be a Launch root resource.
        Parameters:
        launch - The launch to compare
        startResource - Resource resource to start comparison from
        deep - If true the child resources will be also analyzed
        target - The target launch to compare to or null 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 (if target is null). The given start resource does not need to be a Launch root resource.
        Parameters:
        launch - The launch to compare
        startResource - Resource resource to start comparison from
        launchPromotionScope - based on promotion scope the child resources will be also analyzed
        target - The target launch to compare to or null to compare to production
        Returns:
        launch resource statuses
        Throws:
        LaunchException - if an error occurs while getting resource status