public class FlexDeployFunctions extends FlexDeploy2Functions
Constructor and Description |
---|
FlexDeployFunctions(boolean isExecute,
LogFunctions pFLOG) |
Modifier and Type | Method and Description |
---|---|
void |
addProjectsToRelease(java.lang.String pReleaseName,
java.util.List<ReleaseProjectsPojo> pReleaseProjects)
Add FlexDeploy projects to a given release.
|
void |
approveTask(java.lang.String pUsername,
java.lang.String pTaskIdentifier,
java.lang.String pNotes)
Approve a FlexDeploy Task.
|
void |
cleanup() |
void |
completeManualStepBySnapshotId(java.lang.String pUsername,
java.lang.Long pSnapshotId)
Completes a manual step Human task.
|
void |
completeManualStepByTaskId(java.lang.String pUsername,
java.lang.Long pTaskId)
Completes a manual step Human task.
|
java.lang.Long |
createRelease(java.lang.String pReleaseName,
java.lang.String pPipelineName,
java.lang.String pDescription)
Create an empty FlexDeploy Release that defaults to 'Not Started' status.
|
java.lang.Long |
createRelease(java.lang.String pReleaseName,
java.lang.String pPipelineName,
java.lang.String pDescription,
java.lang.String pCronSchedule)
Create an empty scheduled FlexDeploy Release that defaults to 'Not Started' status.
|
java.lang.Long |
createSnapshot(java.lang.Long pReleaseId)
Create a Snapshot for a given Release.
|
void |
downloadSnapshotCommitDetails(java.lang.Long pSnapshotId,
java.lang.String pDestinationPath)
Gets the commit details of a snapshot and downloads a csv file to the destination path.
|
void |
endRelease(java.lang.Long pReleaseId)
End a FlexDeploy Release.
|
void |
endRelease(java.lang.String pReleaseName)
End a FlexDeploy Release.
|
java.util.List<ReleasePojo> |
findReleases(java.lang.String pName)
Finds Releases matching the specified name.
|
StageExecutionInformationPOJO |
getPipelineStageExecutionInfo(java.lang.Long pStageExecId)
Gets pipeline stage execution info based on the stage exec Id given.
|
StepProjectsRequestPojo |
getPipelineStepProjectsExecution(java.lang.Long pStageExecId,
java.lang.Long pStepId)
Get the project request and execution statuses for a given pipeline step execution
|
StepProjectsRequestPojo |
getPipelineStepProjectsExecution(java.lang.Long pStageExecId,
java.lang.String pStepName)
Get the project request and execution statuses for a given pipeline step execution
|
ReleasePojo |
getRelease(java.lang.Long pId)
Gets a release by a specific id.
|
java.util.List<ReleaseProjectDetailsPojo> |
getReleaseProjectInfo(java.lang.Long pReleaseDefId)
Gets release project info based on the release definition Id.
|
java.io.InputStream |
getSnapshotCommitDetailInputStreams(java.lang.Long pSnapshotId)
Gets the commit details of a snapshot and returns an input stream of the data.
|
java.util.List<ReleaseSnapshotCommitDetailsPojo> |
getSnapshotCommitDetails(java.lang.Long pSnapshotId)
Gets the commit details of a snapshot and returns an object with the data.
|
java.util.List<FDUser> |
getUsersFromRoleId(java.lang.Long pRoleId)
Gets a list of the users that are members of the pipeline role with the specified role Id.
|
void |
pauseRelease(java.lang.Long pReleaseId)
Pause a FlexDeploy Release.
|
void |
pauseRelease(java.lang.String pReleaseName)
Pause a FlexDeploy Release.
|
void |
rejectTask(java.lang.String pUsername,
java.lang.String pTaskIdentifier,
java.lang.String pNotes)
Reject a FlexDeploy Task.
|
void |
removeProjectsFromRelease(java.lang.String pReleaseName,
java.util.List<ReleaseProjectsPojo> pReleaseProjects)
Remove FlexDeploy projects from a given release.
|
void |
startRelease(java.lang.Long pReleaseId)
Start a FlexDeploy Release.
|
void |
startRelease(java.lang.String pReleaseName)
Start a FlexDeploy Release.
|
java.lang.Long |
updateReleaseProperty(java.lang.Long pReleaseDefId,
java.lang.String pPropertyKeyCode,
java.io.Serializable pNewValue)
Updates a release's property with the provided property key code.
|
java.lang.Long |
updateSnapshotVariable(java.lang.Long pSnapshotId,
java.lang.String pVariableCode,
java.io.Serializable pNewValue)
Updates a snapshot's variable with the provided variable code.
|
activateBranch, activateStream, addFilesToPackage, addWorkItemComment, assignGroupToUser, assignGroupToUser, buildPackage, buildPackage, buildPackage, buildPackage, buildProject, buildProject, buildProject, buildProject, createBranch, createBranch, createBranch, createCredential, createDynamicPackage, createEndpoint, createEnvironment, createFlxWorkItemField, createFlxWorkItemFieldGroup, createFolder, createGroup, createIncidentByWorkflowType, createIncidentForWorklowRequest, createPackage, createPackage, createProject, createProjectTrigger, createPropertyKeyDefinition, createSCMInstance, createSCMInstance, createStream, createStream, createStream, createTargetGroup, createUser, createWorkItem, deleteCredential, deleteEndpoint, deleteEnvironment, deleteFlxWorkItem, deleteFlxWorkItemField, deleteFlxWorkItemFieldGroup, deleteFolder, deletePackage, deleteProjectTrigger, deleteTargetGroup, deployPackage, deployProject, discoverFiles, downloadLogs, executeUtility, executeUtility, findBranchId, findCMSInstance, findEnvironment, findFolderId, findFoldersWithName, findFolderWithId, findIntegrationInstance, findLocalChangeLogs, findLocalChangeLogs, findLocalChangeLogs, findLocalChangeLogs, findPackagesForChange, findPackagesForChange, findProjectId, findProjectsForChange, findProjectsForChange, findProjectsForNewBranch, findProjectsForNewBranch, findProjectsWithName, findProjectWithId, findStreamId, findWorkItemByNumber, getActiveBuildFlexfieldMetadata, getActiveDeployUtilityFlexfieldMetadata, getApprovedPipelineStageGateTasks, getChangeManagementSystemByInstanceCode, getChangeManagementSystemByInstanceId, getChangeManagementSystemByInstanceName, getCMSInstance, getCredentialById, getCredentialByName, getCurrentlyDeployedVersionId, getCurrentlyDeployedVersionId, getEndpointById, getEndpointByName, getEnvironment, getEnvironmentByCode, getEnvironmentById, getEnvironmentByName, getFlexDeployBaseUrl, getFlxWorkItemFieldGroupWithCode, getFlxWorkItemFieldWithId, getFlxWorkItemStatusWithId, getFlxWorkItemTypeWithCode, getGroovyKey, getGroupById, getGroupByName, getIntegrationInstance, getIssueTrackingSystemByInstanceCode, getIssueTrackingSystemByInstanceId, getIssueTrackingSystemByInstanceName, getMatchingProjectObjectId, getPackage, getPipelineStageGateTasks, getPluginLogInputStreams, getPluginLogInputStreams, getPluginLogs, getPreviouslyDeployedVersionId, getPreviouslyDeployedVersionId, getProject, getProjectBranchById, getProjectTriggerById, getProjectVersionById, getPropertyKeyDefinition, getPropertyKeyDefinition, getPropertySet, getReportDataByWorkflowExecutionReportId, getReportsByWorkflowExecutionId, getScanResultForSonarqube, getSnapshotDetails, getTargetGroupByCode, getTargetGroupById, getTargetGroupByName, getUser, getUserById, getUsersFromGroupId, getUsersFromGroupName, getWorkflowExecutionById, getWorkflowExecutionByWorkflowRequestId, getWorkflowExecutionCommits, getWorkflowExecutionFlexfields, getWorkflowExecutionInputs, getWorkflowExecutionOutputs, getWorkflowExecutionVariables, getWorkflowExecutionWorkItems, getWorkflowRequestTasks, getWorkItemFieldData, getWorkItemsForAllExecutions, getWorkItemsForFailedExecutions, getWorkItemsForSnapshotVersions, getWorkItemsForSuccessfulExecutions, getWorkItemStatus, getWorkItemStatuses, getWorkItemTypes, inactivateBranch, inactivateStream, isBotUsername, parseWorkItemRichText, patchBranch, patchCredential, patchEndpoint, patchEnvironment, patchFlxWorkItemField, patchFlxWorkItemFieldGroup, patchFolder, patchGroup, patchProject, patchProjectProperties, patchProjectTrigger, patchPropertyKeyDefinition, patchStream, patchTargetGroup, patchUser, patchWorkItem, patchWorkItemComment, populateFiles, saveFlxWorkItemFields, saveWorkItemFieldData, searchBranches, searchCredentials, searchEndpoints, searchEnvironments, searchFlxWorkItemFieldGroups, searchFlxWorkItemFields, searchFlxWorkItems, searchFlxWorkItemStatuses, searchFlxWorkItemTypes, searchFolders, searchGroups, searchProjectPackages, searchProjects, searchProjectTriggers, searchProjectVersions, searchPropertyKeyDefinitions, searchPropertySets, searchTargetGroups, searchUsers, unassignGroupFromUser, unassignGroupFromUser, updateBranch, updateCredential, updateEndpoint, updateEnvironment, updateFlxWorkItemField, updateFlxWorkItemFieldGroup, updateFolder, updateGroup, updatePackage, updatePackage, updatePackageStatus, updateProject, updateProjectProperties, updateProjectTrigger, updatePropertyKeyDefinition, updateScanResult, updateSCMInstance, updateSCMInstance, updateStream, updateTargetGroup, updateUser, updateWorkflowPropertySet, updateWorkItem, updateWorkItemAssignee, updateWorkItemStatus, updateWorkItemType
decryptIntegrationInstance, doSimpleGet, findIntegrationInstanceByCode, getLogFunctions, getServerBaseUrl, setScriptRef
public FlexDeployFunctions(boolean isExecute, LogFunctions pFLOG)
public ReleasePojo getRelease(java.lang.Long pId)
pId
- Release IdFlexDeployRowNotFoundException
- if no Release is found for the given pId
public java.util.List<ReleasePojo> findReleases(java.lang.String pName) throws FlexDeployRowNotFoundException
getRelease
this method returns a list of Releases.pName
- Name to search byFlexDeployRowNotFoundException
- if no releases match the naming criteria pName
public java.lang.Long createRelease(java.lang.String pReleaseName, java.lang.String pPipelineName, java.lang.String pDescription) throws FlexCheckedException
pReleaseName
- Name to give Release.pPipelineName
- Pipeline name to use for the Release.pDescription
- Optional description to give the Release.FlexDeployValidationException
- when creation of release gets failed.FlexCheckedException
public java.lang.Long createRelease(java.lang.String pReleaseName, java.lang.String pPipelineName, java.lang.String pDescription, java.lang.String pCronSchedule) throws FlexCheckedException
pReleaseName
- Name to give Release.pPipelineName
- Pipeline name to use for the Release.pDescription
- Optional description to give the Release.pCronSchedule
- Cron schedule to give the Release.FlexDeployValidationException
- when creation of release gets failed.FlexCheckedException
public void endRelease(java.lang.String pReleaseName) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to end.FlexNotFoundException
- if Release is not foundFlexCheckedException
public void endRelease(java.lang.Long pReleaseId) throws FlexCheckedException, FlexNotFoundException
pReleaseId
- Release id to end.FlexNotFoundException
- if Release is not foundFlexCheckedException
public void pauseRelease(java.lang.String pReleaseName) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to pause.FlexNotFoundException
- if Release is not foundFlexCheckedException
public void pauseRelease(java.lang.Long pReleaseId) throws FlexCheckedException, FlexNotFoundException
pReleaseId
- Release id to pause.FlexNotFoundException
- if Release is not foundFlexCheckedException
public void startRelease(java.lang.String pReleaseName) throws FlexCheckedException, FlexNotFoundException
pReleaseName
- Release name to start.FlexNotFoundException
- if Release is not foundFlexCheckedException
public void startRelease(java.lang.Long pReleaseId) throws FlexCheckedException, FlexNotFoundException
pReleaseId
- Release id to start.FlexNotFoundException
- if Release is not foundFlexCheckedException
public void addProjectsToRelease(java.lang.String pReleaseName, java.util.List<ReleaseProjectsPojo> pReleaseProjects) throws FlexCheckedException, FlexDeployRowNotFoundException
pReleaseName
- Release name to add projects to.pReleaseProjects
- List of ReleaseProjects to add.FlexCheckedException
FlexNotFoundException
- if Release is not foundFlexDeployRowNotFoundException
public void removeProjectsFromRelease(java.lang.String pReleaseName, java.util.List<ReleaseProjectsPojo> pReleaseProjects) throws FlexCheckedException, FlexDeployRowNotFoundException
pReleaseName
- Release name to remove projects from.pReleaseProjects
- List of ReleaseProjects to remove.FlexCheckedException
FlexNotFoundException
- if Release is not foundFlexDeployRowNotFoundException
public java.lang.Long createSnapshot(java.lang.Long pReleaseId) throws FlexCheckedException
pReleaseId
- Release to create the snapshot for.FlexDeployValidationException
- when failing to submit snapshot.FlexCheckedException
public void approveTask(java.lang.String pUsername, java.lang.String pTaskIdentifier, java.lang.String pNotes) throws FlexCheckedException, FlexNotFoundException
pUsername
- Username to approve the task as, the user passed here needs permission to approve otherwise an error will occur. User must be in local realm.pTaskIdentifier
- Task identifier to approve. This identifier is only available in the TaskCreated webhook payload and is not visible from the UI.pNotes
- Optional notes to assign to the approval.FlexNotFoundException
- If no task found for pTaskIdentifier
.FlexCheckedException.
FlexCheckedException
public void rejectTask(java.lang.String pUsername, java.lang.String pTaskIdentifier, java.lang.String pNotes) throws FlexCheckedException, FlexNotFoundException
pUsername
- Username to reject the task as, the user passed here needs permission to reject otherwise an error will occur. User must be in local realm.pTaskIdentifier
- Task identifier to approve. This identifier is only available in the TaskCreated webhook payload and is not visible from the UI.pNotes
- Optional notes to assign to the rejected task.FlexNotFoundException
- If no task found forpTaskIdentifier
.FlexCheckedException
public java.util.List<ReleaseProjectDetailsPojo> getReleaseProjectInfo(java.lang.Long pReleaseDefId)
pReleaseDefId
- Release Definition Id.public StageExecutionInformationPOJO getPipelineStageExecutionInfo(java.lang.Long pStageExecId)
pStageExecId
- Pipeline Stage Execution Id.public StepProjectsRequestPojo getPipelineStepProjectsExecution(java.lang.Long pStageExecId, java.lang.Long pStepId)
pStageExecId
- The pipeline stage execution idpStepid
- The pipeline stage step id to get results for.public StepProjectsRequestPojo getPipelineStepProjectsExecution(java.lang.Long pStageExecId, java.lang.String pStepName)
pStageExecId
- The pipeline stage execution idpStepName
- The pipeline stage step name to get results for.public java.util.List<FDUser> getUsersFromRoleId(java.lang.Long pRoleId)
pRoleId
- Pipeline role id.public java.io.InputStream getSnapshotCommitDetailInputStreams(java.lang.Long pSnapshotId)
pSnapshotId
- - Id of the snapshot which details will be returnedpublic void downloadSnapshotCommitDetails(java.lang.Long pSnapshotId, java.lang.String pDestinationPath)
pSnapshotId
- - Id of the snapshot whose commit details will be returned.pDestinationPath
- - Path where the csv will be downloaded.FlexDeployValidationException
- if pDestinationPath
is not provided.public java.util.List<ReleaseSnapshotCommitDetailsPojo> getSnapshotCommitDetails(java.lang.Long pSnapshotId)
pSnapshotId
- - Id of the snapshot whose commit details will be returned.public void cleanup()
cleanup
in class FlexDeploy2Functions
public java.lang.Long updateReleaseProperty(java.lang.Long pReleaseDefId, java.lang.String pPropertyKeyCode, java.io.Serializable pNewValue)
pReleaseDefId
- - Id of the release that has the property to be updated.pPropertyKeyCode
- - The code of the property that is to be updated.pNewValue
- - The value that the property will be updated to.public java.lang.Long updateSnapshotVariable(java.lang.Long pSnapshotId, java.lang.String pVariableCode, java.io.Serializable pNewValue) throws FlexCheckedException
pSnapshotId
- - The id of the snapshot that has the variable to be updated.pVariableCode
- - The code of the variable that is to be updated.pNewValue
- - The value taht the property will be updated to.FlexCheckedException
public void completeManualStepByTaskId(java.lang.String pUsername, java.lang.Long pTaskId) throws FlexCheckedException, FlexNotFoundException
pUsername
- - Username to complete the task as.pTaskId
- - Task ID of the human task/manual step to complete.FlexNotFoundException
- If no task is found for passed Id.FlexCheckedException
- All other exceptions.public void completeManualStepBySnapshotId(java.lang.String pUsername, java.lang.Long pSnapshotId) throws FlexCheckedException, FlexNotFoundException
pUsername
- - Username to complete the task as.pSnapshotId
- - Snapshot Id which has a manual step waiting to be completed.FlexNotFoundException
- If no task is found for passed Id.FlexCheckedException
- All other exceptions.