Package com.dtolabs.rundeck.plugins.scm
Interface ScmExportPlugin
-
public interface ScmExportPlugin
Export plugin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<Action>
actionsAvailableForContext(ScmOperationContext context)
void
cleanup()
perform any cleanup/teardown needed after disablingdefault java.util.Map
clusterFixJobs(ScmOperationContext context, java.util.List<JobExportReference> jobs)
Function to fix status of the jobs on cluster environment.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.ScmExportResult
export(ScmOperationContext context, java.lang.String actionId, java.util.Set<JobExportReference> jobs, java.util.Set<java.lang.String> pathsToDelete, java.util.Map<java.lang.String,java.lang.String> input)
Perform export of the jobsjava.util.List<java.lang.String>
getDeletedFiles()
Return a list of tracked files that have been deleted.default java.lang.String
getExportPushActionId()
It gets the action id for push actionScmDiffResult
getFileDiff(JobExportReference job)
Get diff for the given jobScmDiffResult
getFileDiff(JobExportReference job, java.lang.String originalPath)
Get diff for the given job against another path, e.g.BasicInputView
getInputViewForAction(ScmOperationContext context, java.lang.String actionId)
JobState
getJobStatus(JobExportReference job)
Return the state of the given jobJobState
getJobStatus(JobExportReference job, java.lang.String originalPath)
Return the state of the given job, with optional original repo pathdefault JobState
getJobStatus(JobExportReference job, java.lang.String originalPath, boolean serialize)
Return the state of the given job, with optional original repo pathjava.lang.String
getRelativePathForJob(JobReference job)
Return the relative path for the job in the repoScmExportSynchState
getStatus(ScmOperationContext context)
default void
initJobsStatus(java.util.List<JobExportReference> jobs)
Set default job statusJobState
jobChanged(JobChangeEvent event, JobExportReference exportReference)
Return the state of the given jobdefault void
refreshJobsStatus(java.util.List<JobExportReference> jobs)
Function to refresh all job status .default void
totalClean()
perform a total cleandefault java.lang.Boolean
userHasAccessToKeyOrPassword(ScmOperationContext ctx)
Returns true or false if the user has access to the key/password or not
-
-
-
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
-
export
ScmExportResult export(ScmOperationContext context, java.lang.String actionId, java.util.Set<JobExportReference> jobs, java.util.Set<java.lang.String> pathsToDelete, java.util.Map<java.lang.String,java.lang.String> input) throws ScmPluginException
Perform export of the jobs- Parameters:
jobs
- jobs to be exportedinput
- input for the action properties- Returns:
- result of export
- Throws:
ScmPluginException
-
getStatus
ScmExportSynchState getStatus(ScmOperationContext context) throws ScmPluginException
- Returns:
- overall status
- Throws:
ScmPluginException
-
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
- joboriginalPath
- 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
- joboriginalPath
- path of original job, e.g. if the file was renamedserialize
- 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 eventexportReference
- 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)
Get diff for the given job- Parameters:
job
- job
-
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
- joboriginalPath
- 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 jobsoriginalPaths
- 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
-
-