Interface ScmExportPlugin


  • public interface ScmExportPlugin
    Export plugin
    • Method Detail

      • cleanup

        void cleanup()
        perform any cleanup/teardown needed after disabling
      • totalClean

        default void totalClean()
        perform a total clean
      • getInputViewForAction

        BasicInputView getInputViewForAction​(ScmOperationContext context,
                                             java.lang.String actionId)
        Parameters:
        actionId - action ID
        Returns:
        input view for the specified action
      • actionsAvailableForContext

        java.util.List<Action> actionsAvailableForContext​(ScmOperationContext context)
        Parameters:
        context - context map
        Returns:
        list of actions available for the context
      • getJobStatus

        JobState getJobStatus​(JobExportReference job)
        Return the state of the given job
        Parameters:
        job - job
        Returns:
        state
      • getJobStatus

        JobState getJobStatus​(JobExportReference job,
                              java.lang.String originalPath)
        Return the state of the given job, with optional original repo path
        Parameters:
        job - job
        originalPath - path of original job, e.g. if the file was renamed
        Returns:
        state
      • getJobStatus

        default JobState getJobStatus​(JobExportReference job,
                                      java.lang.String originalPath,
                                      boolean serialize)
        Return the state of the given job, with optional original repo path
        Parameters:
        job - job
        originalPath - path of original job, e.g. if the file was renamed
        serialize - false to avoid serialize twice a job
        Returns:
        state
      • initJobsStatus

        default void initJobsStatus​(java.util.List<JobExportReference> jobs)
        Set default job status
        Parameters:
        jobs -
      • getDeletedFiles

        java.util.List<java.lang.String> getDeletedFiles()
        Return a list of tracked files that have been deleted.
      • jobChanged

        JobState jobChanged​(JobChangeEvent event,
                            JobExportReference exportReference)
        Return the state of the given job
        Parameters:
        event - change event
        exportReference - serialize the job
        Returns:
        state
      • getRelativePathForJob

        java.lang.String getRelativePathForJob​(JobReference job)
        Return the relative path for the job in the repo
        Parameters:
        job - job
        Returns:
        state
      • getFileDiff

        ScmDiffResult getFileDiff​(JobExportReference job,
                                  java.lang.String originalPath)
        Get diff for the given job against another path, e.g. the original path before a rename
        Parameters:
        job - job
        originalPath - original path
      • clusterFixJobs

        default java.util.Map clusterFixJobs​(ScmOperationContext context,
                                             java.util.List<JobExportReference> jobs)
        Function to fix status of the jobs on cluster environment. To automatically match the job status on every node.
        Parameters:
        jobs - rundeck jobs
        Returns:
        map with information on the process
      • clusterFixJobs

        default java.util.Map clusterFixJobs​(ScmOperationContext context,
                                             java.util.List<JobExportReference> jobs,
                                             java.util.Map<java.lang.String,​java.lang.String> originalPaths)
        Function to fix status of the jobs on cluster environment. To automatically match the job status on every node.
        Parameters:
        jobs - rundeck jobs
        originalPaths - map of job ID to original path if the job has been renamed
        Returns:
        map with information on the process
      • refreshJobsStatus

        default void refreshJobsStatus​(java.util.List<JobExportReference> jobs)
        Function to refresh all job status . will upgrade the jobs cache status .
        Parameters:
        jobs - rundeck jobs
      • getExportPushActionId

        default java.lang.String getExportPushActionId()
        It gets the action id for push action
        Returns:
        action name id for push
      • userHasAccessToKeyOrPassword

        default java.lang.Boolean userHasAccessToKeyOrPassword​(ScmOperationContext ctx)
        Returns true or false if the user has access to the key/password or not
        Parameters:
        ctx - : ScmOperationContext object from the controller.
        Returns:
        true or false