Class FlexDeploy2Functions

java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.FlexDeploy2Functions
All Implemented Interfaces:
IFlexDeployFunctions

public class FlexDeploy2Functions extends BaseFunctions implements IFlexDeployFunctions
Functions to perform actions in FlexDeploy, like building a project or starting a release.
Since:
5.3
  • Constructor Details

    • FlexDeploy2Functions

      public FlexDeploy2Functions()
    • FlexDeploy2Functions

      public FlexDeploy2Functions(LogFunctions pFLOG)
  • Method Details

    • findLocalChangeLogs

      public PollingResult findLocalChangeLogs(String pUrl, String pBranch, String pCurrentRevision, String pFromRevision) throws FlexCheckedException
      Finds change logs for a local ssh enabled git repository. This can be used as a replacement for the getChangeLogs functions if your git provider doesn't have a specific function. If fromRevision is null it will return an empty PollingResult object. You must set up authentication using SSH Keys on FlexDeploy server. If your repository is not ssh enabled see findLocalChangeLogs
      Specified by:
      findLocalChangeLogs in interface IFlexDeployFunctions
      Parameters:
      pUrl - Url of the git repository to find logs against
      pBranch - Branch to find logs against
      pCurrentRevision - Current revision after the push
      pFromRevision - Previous revision before the push
      Returns:
      PollingResult object containing the change logs found.
      Throws:
      FlexValidationException - if an invalid revision is passed.
      FlexCheckedException
      Since:
      5.3.0.1
    • findLocalChangeLogs

      public PollingResult findLocalChangeLogs(String pUrl, String pBranch, String pCurrentRevision, String pFromRevision, boolean pIgnoreTargetBranchMerge) throws FlexCheckedException
      Finds change logs for a local ssh enabled git repository. This can be used as a replacement for the getChangeLogs functions if your git provider doesn't have a specific function. If fromRevision is null it will return an empty PollingResult object. You must set up authentication using SSH Keys on FlexDeploy server. If your repository is not ssh enabled see findLocalChangeLogs
      Specified by:
      findLocalChangeLogs in interface IFlexDeployFunctions
      Parameters:
      pUrl - Url of the git repository to find logs against
      pBranch - Branch to find logs against
      pCurrentRevision - Current revision after the push
      pFromRevision - Previous revision before the push
      pIgnoreTargetBranchMerge - Exclude commits that were merged from the target branch into this branch. When using git flow, this will ignore merges done from the target branch 'develop' into your feature branch. Default value is true
      Returns:
      PollingResult object containing the change logs found.
      Throws:
      FlexValidationException - if an invalid revision is passed.
      FlexCheckedException
      Since:
      5.3.0.3
    • findLocalChangeLogs

      public PollingResult findLocalChangeLogs(String pUrl, String pBranch, String pCurrentRevision, String pFromRevision, String pUser, String pPassword) throws FlexCheckedException
      Finds change logs for a git repository. This can be used as a replacement for the getChangeLogs functions if your git provider doesn't have a specific function. If fromRevision is null, it will return an empty PollingResult object. Git repository will be cloned to get change logs.
      Specified by:
      findLocalChangeLogs in interface IFlexDeployFunctions
      Parameters:
      pUrl - Url of the git repository to find logs against
      pBranch - Branch to find logs against
      pCurrentRevision - Current revision after the push
      pFromRevision - Previous revision before the push
      pUser - User to use for local credentials
      pPassword - Password of the user
      Returns:
      PollingResult object containing the change logs found.
      Throws:
      FlexValidationException - if an invalid revision is passed.
      FlexCheckedException
      Since:
      5.3.0.1
    • findLocalChangeLogs

      public PollingResult findLocalChangeLogs(String pUrl, String pBranch, String pCurrentRevision, String pFromRevision, String pUser, String pPassword, boolean pIgnoreTargetBranchMerge) throws FlexCheckedException
      Finds change logs for a git repository. This can be used as a replacement for the getChangeLogs functions if your git provider doesn't have a specific function. If fromRevision is null it will return an empty PollingResult object. Git repository will be cloned to get change logs.
      Specified by:
      findLocalChangeLogs in interface IFlexDeployFunctions
      Parameters:
      pUrl - Url of the git repository to find logs against
      pBranch - Branch to find logs against
      pCurrentRevision - Current revision after the push
      pFromRevision - Previous revision before the push
      pUser - User to use for local credentials
      pPassword - Password of the user
      pIgnoreTargetBranchMerge - Exclude commits that were merged from the target branch into this branch. When using git flow, this will ignore merges done from the target branch 'develop' into your feature branch. Default value is true
      Returns:
      PollingResult object containing the change logs found.
      Throws:
      FlexValidationException - if an invalid revision is passed.
      FlexCheckedException
      Since:
      5.3.0.3
    • getProject

      public ProjectPojo getProject(Long pProjectId) throws FlexRowNotFoundException
      Returns project information for a given projectId.
      Specified by:
      getProject in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project Id of the project to retrieve
      Returns:
      Object containing metadata about the given project
      Throws:
      FlexRowNotFoundException - if no project is found for given pProjectId
      Since:
      5.3.0.1
    • createProject

      public Long createProject(ProjectPojo pProjectPojo)
      Creates and configures a project with the provided data. Returns the Id of the project after creation.
      Specified by:
      createProject in interface IFlexDeployFunctions
      Parameters:
      pProjectPojo - - Object containing project configuration information.
      Returns:
      Id of the created project
      Since:
      5.4.0.1
    • updateProject

      public Long updateProject(Long pProjectId, ProjectPojo pProjectPojo)
      Updates a project with the provided data.
      Specified by:
      updateProject in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the project that is to be updated.
      pProjectPojo - - Object containing project configuration information.
      Returns:
      Id of the updated project.
      Throws:
      FlexRowNotFoundException - if pProjectId does not exist.
      Since:
      5.4.0.1
    • patchProject

      public Long patchProject(Long pProjectId, ProjectPojo pProjectPojo)
      Updates a project with the provided data. This will only update fields that are passed in the pojo. Returns the Id of the project after updating.
      Specified by:
      patchProject in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the project that is to be updated.
      pProjectPojo - - Object containing project configuration information.
      Returns:
      Id of the updated project.
      Throws:
      FlexRowNotFoundException - if pProjectId does not exist.
      Since:
      5.4.0.1
    • updateProjectProperties

      public Long updateProjectProperties(Long pProjectId, List<PropertyValuePojo> pPropertyPojos)
      Updates a project's properties with the provided data. This will only update properties that are passed in the list. Returns the Id of the project after updating.
      Specified by:
      updateProjectProperties in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the project that is to be updated.
      pPropertyPojos - - List of property values to be updated on the project.
      Returns:
      Id of the updated project.
      Since:
      5.4.0.1
    • patchProjectProperties

      public Long patchProjectProperties(Long pProjectId, List<PropertyValuePojo> pPropertyPojos)
      Updates a project's properties with the provided data. This will only update properties that are passed in the list.
      Specified by:
      patchProjectProperties in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the project that is to be updated.
      pPropertyPojos - - List of property values to be updated on the project.
      Returns:
      Id of the updated project.
      Since:
      5.4.0.1
    • addFilesToPackage

      public void addFilesToPackage(Long pProjectId, String pPackageName, List<String> pFiles)
      Adds files to a given package. The files should match the filepath found in the File Catalog on the project.
      Specified by:
      addFilesToPackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id of the package
      pPackageName - Name of the package
      pFiles - Filepaths to add to the package.
      Throws:
      FlexRowNotFoundException - if pPackageName does not exist on the project pProjectId.
    • populateFiles

      @Deprecated public Integer populateFiles(Long pProjectId, Long pBranchId)
      Deprecated.
      Specified by:
      populateFiles in interface IFlexDeployFunctions
    • discoverFilesFromSCMAsync

      public void discoverFilesFromSCMAsync(Long pProjectId, Long pBranchId)
      Discover package-based deployment files asynchronously for a given project. This will automatically save discover changes, so it should only be used after commands and attributes have been validated. This method only supports discovering from SCM.
      Specified by:
      discoverFilesFromSCMAsync in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to discover files for. This should be a project using package-based deployment.
      pBranchId - Branch id to use when discovering.
      Throws:
      FlexAPIException - if it is a message wrapper error.
      See Also:
    • discoverFilesFromSCMAsync

      public void discoverFilesFromSCMAsync(Long pProjectId, Long pBranchId, boolean pInactivateMissingFiles)
      Specified by:
      discoverFilesFromSCMAsync in interface IFlexDeployFunctions
    • discoverFiles

      public Integer discoverFiles(Long pProjectId, Long pBranchId)
      Discover package-based deployment files for a given project. This will automatically save discover changes, so it should only be used after commands and attributes have been validated. This method only supports discovering from SCM.
      Specified by:
      discoverFiles in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to populate files for. This should be a project using partial deployment.
      pBranchId - Branch id to use when populating.
      Returns:
      The number of new files found during populate.
      Throws:
      FlexAPIException - if it is a message wrapper error.
      See Also:
    • discoverFiles

      public Integer discoverFiles(Long pProjectId, Long pBranchId, boolean pInactivateMissingFiles)
      Specified by:
      discoverFiles in interface IFlexDeployFunctions
    • discoverFilesFromBackendAsync

      public void discoverFilesFromBackendAsync(Long pProjectId, Long pEnvironmentId)
      Discover package-based deployment files from a backend system asynchronously for a given project. This will automatically save discover changes, so it should only be used after commands and attributes have been validated.
      Specified by:
      discoverFilesFromBackendAsync in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to discover files for. This should be a project using package-based deployment.
      pEnvironmentId - Environment id to use when discovering.
      Throws:
      FlexAPIException - if it is message wrapper error.
      See Also:
    • discoverFilesFromBackendAsync

      public void discoverFilesFromBackendAsync(Long pProjectId, Long pEnvironmentId, boolean pInactivateMissingFiles)
      Specified by:
      discoverFilesFromBackendAsync in interface IFlexDeployFunctions
    • discoverFilesFromBackend

      public Integer discoverFilesFromBackend(Long pProjectId, Long pEnvironmentId)
      Discover package-based deployment files from a backend system for a given project. This will automatically save discover changes, so it should only be used after commands and attributes have been validated.
      Specified by:
      discoverFilesFromBackend in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to discover files for. This should be a project using package-based deployments.
      pEnvironmentId - Environment id to use when discovering.
      Returns:
      The number of new files found during discovery.
      Throws:
      FlexAPIException - if it is a message wrapper error.
      See Also:
    • discoverFilesFromBackend

      public Integer discoverFilesFromBackend(Long pProjectId, Long pEnvironmentId, boolean pInactivateMissingFiles)
      Specified by:
      discoverFilesFromBackend in interface IFlexDeployFunctions
    • updatePackageStatus

      public void updatePackageStatus(Long pProjectId, String pPackageName, String pPackageStatus)
      Updates a given package status.
      Specified by:
      updatePackageStatus in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id of the package
      pPackageName - Name of the package
      pPackageStatus - } The updated package status [ACTIVE, COMPLETED, or INACTIVE]
      Throws:
      FlexRowNotFoundException - if pProjectId is not found or pPackageName does not exist on the project
      FlexValidationException - if pPackageStatus is invalid
    • updatePackage

      public void updatePackage(Long pProjectId, String pPackageName, Long pBranchId, PollingResult pPollingResult)
      Updates a given package relative to a PollingResult. For manually adding files to a package use the addFilesToPackagemethod. This function will automatically populate files if new files are detected. Files added to this package are always added to the end of the list.
      Specified by:
      updatePackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id of the package
      pPackageName - Name of the package
      pBranchId - Branch to use when populating files if new files are found
      pPollingResult - PollingResult object to use for finding differences
      Throws:
      FlexRowNotFoundException - if pProjectId is not found or pPackageName does not exist on the project
      FlexValidationException - if project other than SCM Type GIT is invalid.
      See Also:
    • updatePackage

      public void updatePackage(Long pProjectId, String pPackageName, Long pBranchId, PollingResult pPollingResult, boolean pSortFiles)
      Updates a given package relative to a PollingResult. For manually adding files to a package use the addFilesToPackagemethod. This function will automatically populate files if new files are detected. The files in this package can optionally be sorted by their project files sequence number.
      Specified by:
      updatePackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id of the package
      pPackageName - Name of the package
      pBranchId - Branch to use when populating files if new files are found
      pPollingResult - PollingResult object to use for finding differences
      pSortFiles - Sort package files after update
      Throws:
      FlexRowNotFoundException - if pProjectId is not found or pPackageName does not exist on the project
      FlexValidationException - if project other than SCM Type GIT is invalid.
      See Also:
    • createPackage

      public Long createPackage(Long pProjectId, String pPackageName, String pDescription, List<String> pFiles)
      Creates a package for a given project and list of files.
      Specified by:
      createPackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id to create package under.
      pPackageName - Package name to use.
      pDescription - Description to give the package.
      pFiles - List of files to add to the package. File paths should be as they appear in the File Catalog of the project.
      Returns:
      Package id
    • createDynamicPackage

      public Long createDynamicPackage(Long pProjectId, String pPackageName, String pDescription, String pIncludePath, String pExcludePath)
      Creates a dynamic package for given include and exclude path.
      Specified by:
      createDynamicPackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id to create package under.
      pPackageName - Package name to use.
      pDescription - Description to give the package.
      pIncludePath - files to be included in the package.
      pExcludePath - files to be excluded in the package.
      Returns:
      Package id
    • createPackage

      public Long createPackage(Long pProjectId, String pPackageName, String pDescription, Long pBranchId, PollingResult pPollingResult)
      Creates a package for a given project relative to a PollingResult.
      Specified by:
      createPackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id of the package
      pPackageName - Name of the package
      pDescription - Description to give the package.
      pPollingResult - PollingResult object to use for finding differences
      Throws:
      FlexRowNotFoundException - if pProjectId is not found or pPackageName does not exist on the project
      FlexValidationException - if project pProjectId is invalid,
      Since:
      5.5.0.3
      See Also:
    • createProjectPackage

      public ProjectPackageDataObject createProjectPackage(ProjectPackageDataObject pPackagePojo, Boolean pSortFiles)
      Creates the package for a project using the provided data object and returns the created project package details.
      Specified by:
      createProjectPackage in interface IFlexDeployFunctions
      Parameters:
      pPackagePojo - Object containing data for the project package.
      pSortFiles - Sort package files after update.
      Returns:
      ProjectPackageDataObject representing the created package.
      Throws:
      FlexRowNotFoundException - if pPackagePojo.projectId is not found or pPackagePojo.packageName does not exist on the project.
      FlexValidationException - if the project pPackagePojo.projectId is invalid or the package data fails validation.
    • updateProjectPackage

      public ProjectPackageDataObject updateProjectPackage(ProjectPackageDataObject pPackagePojo)
      Updates an existing project package using the provided data object and returns the updated project package details.
      Specified by:
      updateProjectPackage in interface IFlexDeployFunctions
      Parameters:
      pPackagePojo - Object containing project package data to update.
      Returns:
      ProjectPackageDataObject representing the updated package.
      Throws:
      FlexRowNotFoundException - if pPackagePojo.projectId is not found or pPackagePojo.packageName does not exist on the project.
      FlexValidationException - if the project pPackagePojo.projectId is invalid or the package data fails validation.
    • patchProjectPackage

      public ProjectPackageDataObject patchProjectPackage(ProjectPackageDataObject pPackagePojo, Boolean pSortFiles)
      Updates a package with the provided data. This will only update fields that are passed in the pojo and returns the updated project package details.
      Specified by:
      patchProjectPackage in interface IFlexDeployFunctions
      Parameters:
      pPackagePojo - Object containing project package data for the update.
      pSortFiles - Sort package files after update.
      Returns:
      ProjectPackageDataObject representing the patched package.
      Throws:
      FlexRowNotFoundException - if pPackagePojo.projectId is not found or pPackagePojo.packageName does not exist on the project.
      FlexValidationException - if the project pPackagePojo.projectId is invalid or the package data fails validation.
    • getProjectPackageByName

      public ProjectPackageDataObject getProjectPackageByName(Long pProjectId, String pPackageName)
      Gets a project package by project id and package name. Returns the project package details.
      Specified by:
      getProjectPackageByName in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id of the package.
      pPackageName - Name of the package.
      Returns:
      ProjectPackageDataObject representing the requested package.
      Throws:
      FlexRowNotFoundException - if pProjectId is not found or pPackageName does not exist on the project.
      FlexValidationException - if the project pProjectId is invalid or the package name is null or empty.
    • getProjectPackageById

      public ProjectPackageDataObject getProjectPackageById(Long pProjectPackageId)
      Gets a project package by package id and returns the project package details.
      Specified by:
      getProjectPackageById in interface IFlexDeployFunctions
      Parameters:
      pProjectPackageId - Id of the package project.
      Returns:
      ProjectPackageDataObject representing the requested package.
      Throws:
      FlexRowNotFoundException - if pProjectPackageId does not exist.
      FlexValidationException - if the provided pProjectPackageId is invalid.
    • deletePackage

      public void deletePackage(Long pProjectId, String pPackageName)
      Deletes a project package
      Specified by:
      deletePackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id package is under.
      pPackageName - Name of package to delete.
    • buildPackage

      public Long buildPackage(Long pBranchId, ProjectPackagePojo projectPackage)
      Builds a FlexDeploy Package. This function will gather change logs and committer information from scm. If you have this information already you can improve performance by using PollingResult variant
      Specified by:
      buildPackage in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building package. See findBranchId.
      projectPackage - Wrapper object containing project id and package name to build.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
    • buildPackage

      public Long buildPackage(Long pBranchId, ProjectPackagePojo projectPackage, BuildOptions pBuildOptions)
      Builds a FlexDeploy Package. This function will gather change logs and committer information from scm. If you have this information already you can improve performance by using PollingResult variant
      Specified by:
      buildPackage in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building package. See findBranchId.
      projectPackage - Wrapper object containing project id and package name to build.
      pBuildOptions - Additional build object where optional options can be set.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
    • buildPackage

      public Long buildPackage(Long pBranchId, ProjectPackagePojo projectPackage, PollingResult pPollingResult)
      Builds a FlexDeploy Package using a PollingResult.
      Specified by:
      buildPackage in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building package. See findBranchId.
      projectPackage - Wrapper object containing project id and package name to build.
      pPollingResult - PollingResult object containing change logs and committer information.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
      See Also:
    • buildPackage

      public Long buildPackage(Long pBranchId, ProjectPackagePojo projectPackage, PollingResult pPollingResult, BuildOptions pBuildOptions)
      Builds a FlexDeploy Package using a PollingResult.
      Specified by:
      buildPackage in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building package. See findBranchId.
      projectPackage - Wrapper object containing project id and package name to build.
      pPollingResult - PollingResult object containing change logs and committer information.
      pBuildOptions - Additional build object where optional options can be set.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
      See Also:
    • buildProject

      public Long buildProject(Long pBranchId, Long pProjectId)
      Builds a FlexDeploy Project. This function will gather change logs and committer information from scm. If you have this information already you can improve performance by using PollingResult variant
      Specified by:
      buildProject in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building project. See findBranchId.
      pProjectId - Project id to build.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
    • buildProject

      public Long buildProject(Long pBranchId, Long pProjectId, BuildOptions pBuildOptions)
      Builds a FlexDeploy Project. This function will gather change logs and committer information from scm. If you have this information already you can improve performance by using PollingResult variant
      Specified by:
      buildProject in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building project. See findBranchId.
      pProjectId - Project id to build.
      pBuildOptions - Additional build object where optional options can be set.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
    • buildProject

      public Long buildProject(Long pBranchId, Long pProjectId, PollingResult pPollingResult)
      Builds a FlexDeploy Project using a PollingResult.
      Specified by:
      buildProject in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building project. See findBranchId.
      pProjectId - Project id to build.
      pPollingResult - PollingResult object containing change logs and committer information.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
      See Also:
    • buildProject

      public Long buildProject(Long pBranchId, Long pProjectId, PollingResult pPollingResult, BuildOptions pBuildOptions)
      Builds a FlexDeploy Project using a PollingResult.
      Specified by:
      buildProject in interface IFlexDeployFunctions
      Parameters:
      pBranchId - Branch to use when building project. See findBranchId.
      pProjectId - Project id to build.
      pPollingResult - PollingResult object containing change logs and committer information.
      pBuildOptions - Additional build object where optional options can be set.
      Returns:
      Long WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if pBranchId not found in project. if no row found for project. if default build environment not found
      FlexValidationException - if the requested project is a utility project. if the requested project is not active. if no build workflow or target group mapped for the project.
      See Also:
    • deployPackage

      public Long deployPackage(Long pProjectId, String pPackageName, String pEnvironmentCode, DeployOptions pDeployOptions)
      Deploys a FlexDeploy Package.
      Specified by:
      deployPackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to deploy.
      pPackageName - Name of package
      pEnvironmentCode - Code of the environment.
      pDeployOptions - Additional deploy object where optional options can be set.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if no row found for pProjectId. if no row found for pEnvironmentCode. if no row found for pPackageName.
      FlexValidationException - if pEnvironmentCode is missing. if the requested project is a utility project. if the requested project is not active. if no deploy workflow or target group mapped for the project. if package name given for standard project.
    • deployProject

      public Long deployProject(Long pProjectId, String pEnvironmentCode, DeployOptions pDeployOptions)
      Deploys a FlexDeploy Project.
      Specified by:
      deployProject in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to deploy.
      pEnvironmentCode - Code of the environment.
      pDeployOptions - Additional deploy object where optional options can be set.
      Returns:
      WorkflowRequest id
      Throws:
      FlexRowNotFoundException - if no row found for pProjectId. if no row found for pEnvironmentCode.
      FlexValidationException - if pEnvironmentCode is missing. if the requested project is a utility project. if the requested project is not active. if no deploy workflow or target group mapped for the project.
    • findProjectsForNewBranch

      public Set<Long> findProjectsForNewBranch(String pRepositoryName)
      Finds relevant FlexDeploy Projects for a new branch event. All webhook enabled projects using this repository will be returned. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findProjectsForNewBranch in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      Returns:
      Set of Project ids
      Since:
      5.3.0.1
    • findProjectsForNewBranch

      public Set<Long> findProjectsForNewBranch(String pRepositoryName, PollingResult pPollingResult)
      Finds relevant FlexDeploy Projects for a new branch event. Only projects whose sources use the files found in the polling result will be returned. If you want to return ALL projects regardless of changed files then use findProjectsForNewBranch. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findProjectsForNewBranch in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      pPollingResult - PollingResult object for determining relevant projects.
      Returns:
      Set of Project ids
      Since:
      5.3.0.1
      See Also:
    • findProjectsForChange

      public Set<Long> findProjectsForChange(String pRepositoryName, String pbranchName, PollingResult pPollingResult)
      Finds relevant FlexDeploy Projects for any given PollingResult and branch. A project must have a webhook trigger configured for this branch on the CI tab in order to be found by this function. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findProjectsForChange in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      pbranchName - Branch name for which the change occurred. e.g. 'master'
      pPollingResult - PollingResult object for determining relevant projects.
      Returns:
      Set of Project ids
      See Also:
    • findProjectsForChange

      public Set<Long> findProjectsForChange(String pRepositoryName, String pbranchName, List<String> pChangedFiles)
      Finds relevant FlexDeploy Projects for a list of changed files. A project must have a webhook trigger configured for this branch on the CI tab in order to be found by this function. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findProjectsForChange in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      pbranchName - branch name for which the change occurred. e.g. 'master'
      pChangedFiles - List of changed files from a push event. If no files are passed then all projects using given repository will be returned.
      Returns:
      Set of Project ids
      See Also:
    • findPackagesForChange

      public Set<ProjectPackagePojo> findPackagesForChange(String pRepositoryName, String pbranchName, PollingResult pPollingResult)
      Finds relevant FlexDeploy Packages for any given PollingResult. A package must have a webhook trigger configured with this branch on the CI tab in order to be found by this function. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findPackagesForChange in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      pbranchName - Branch name for which the change occurred. e.g. 'master'
      pPollingResult - PollingResult object for determining relevant packages.
      Returns:
      Set of ProjectPackages
      See Also:
    • findPackagesForChange

      public Set<ProjectPackagePojo> findPackagesForChange(String pRepositoryName, String pBranchName, List<String> pChangedFiles)
      Finds relevant FlexDeploy Packages for a list of changed files. A package must have a webhook trigger configured with this stream on the CI tab in order to be found by this function. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findPackagesForChange in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      pBranchName - Branch name for which the change occurred. e.g. 'master'
      pChangedFiles - List of changed files from a push event. If no files are passed, then all packages using given repository will be returned.
      Returns:
      Set of ProjectPackages
      See Also:
    • findPackagesForChange

      public Set<ProjectPackagePojo> findPackagesForChange(String pRepositoryName, String pBranchName, List<String> pChangedFiles, PackageSearchOptions pPackageSearchOptions)
      Finds relevant FlexDeploy Packages for a list of changed files. A package must have a webhook trigger configured with this stream on the CI tab in order to be found by this function. This function currently only compares against Git repositories and is not compatible with other scm types.
      Specified by:
      findPackagesForChange in interface IFlexDeployFunctions
      Parameters:
      pRepositoryName - Git repository name with the change. Name is of the form (username/repo). e.g. toddmotto/public-apis
      pBranchName - Branch name for which the change occurred. e.g. 'master'
      pChangedFiles - List of changed files from a push event. If no files are passed then all packages using given repository will be returned.
      pPackageSearchOptions - Package options to find the packages based on the values
      Returns:
      Set of ProjectPackages
      See Also:
    • findProjectId

      public Long findProjectId(String pProjectName)
      Finds the FlexDeploy Project id for any given name. This will only work properly if all project names are unique.
      Specified by:
      findProjectId in interface IFlexDeployFunctions
      Parameters:
      pProjectName - Case sensitive project name to search by
      Returns:
      Project id
      Throws:
      FlexRowNotFoundException - if no row found for pProjectName.
    • findProjectWithId

      public ProjectDataObject findProjectWithId(Long pProjectId)
      Finds Project using Id.
      Specified by:
      findProjectWithId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of Project to find.
      Throws:
      FlexRowNotFoundException - if no row found for pProjectId.
    • findProjectsWithName

      public List<ProjectDataObject> findProjectsWithName(String pProjectName)
      Finds FlexDeploy Projects for any given name
      Specified by:
      findProjectsWithName in interface IFlexDeployFunctions
      Parameters:
      pProjectName - Case-insensitive project name to search by
    • searchProjects

      public <any> searchProjects(ProjectDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Projects based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Projects matching search parameters.
      Specified by:
      searchProjects in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - ProjectDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Projects matching the search criteria.
    • findBranchId

      public Long findBranchId(Long pProjectId, String pBranchName)
      Finds a FlexDeploy branch id from the Branch name.
      Specified by:
      findBranchId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id on which the branch belongs.
      pBranchName - Name of the branch. e.g. 'feature/JIRA-12', 'master'.
      Returns:
      Branch id
      Throws:
      FlexRowNotFoundException - if no row found for pBranchName for pProjectId.
    • createBranch

      public Long createBranch(Long pProjectId, String pBranchName, String pVersionSyntax)
      Create a FlexDeploy Branch on a given project. Allows custom setting of the version syntax. Useful for when a branch is created in source control.
      Specified by:
      createBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project to create the branch on.
      pBranchName - Branch name to create.
      pVersionSyntax - Version Syntax to use for the branch. For example: "1.0.mybranch." + SequenceNumber. Note that this is a groovy script and literal strings should be enclosed in quotes.
      Returns:
      branch id
      Since:
      5.3.0.1
    • createBranch

      public Long createBranch(Long pProjectId, ProjectStreamPojo pBranch)
      Create a FlexDeploy Branch on a given project. Useful for when a branch is created in source control.
      Specified by:
      createBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project to create the branch on.
      pBranch - ProjectStreamDataObject object representing the branch to create.
      Returns:
      branch id
      Since:
      5.4.0.2
    • createBranch

      public Long createBranch(Long pProjectId, String pBranchName)
      Create a FlexDeploy Branch on a given project. The branch version syntax will default to 1.0.x.n where x is the branch name and n is the incrementing version. Useful for when a branch is created in source control.
      Specified by:
      createBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project to create the branch on.
      pBranchName - Branch name to create.
      Returns:
      Branch id
    • updateBranch

      public void updateBranch(Long pProjectId, Long pBranchId, ProjectStreamPojo pBranch)
      Updates a FlexDeploy Branch on a given project.
      Specified by:
      updateBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project to create the branch on.
      pBranchId - Id of the branch to update.
      pBranch - ProjectStreamPojo object representing the branch to update.
      Throws:
      FlexRowNotFoundException - if pBranchId does not exist for pProjectId.
      Since:
      5.4.0.2
    • patchBranch

      public void patchBranch(Long pProjectId, Long pBranchId, ProjectStreamDataObject pBranch)
      Patches a FlexDeploy Branch on a given project. This will apply in a patch format. Only the fields passed will be updated.
      Specified by:
      patchBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project to create the branch on.
      pBranchId - Id of the branch to update.
      pBranch - ProjectStreamDataObject object representing the branch to update.
      Throws:
      FlexRowNotFoundException - if pBranchId does not exist for pProjectId.
      Since:
      5.4.0.2
    • inactivateBranch

      public void inactivateBranch(Long pProjectId, String pBranchName)
      Inactive a FlexDeploy Branch on a project. Useful for when a branch is deleted from source control.
      Specified by:
      inactivateBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id for which the branch belongs.
      pBranchName - Branch name to inactivate.
    • activateBranch

      public void activateBranch(Long pProjectId, String pBranchName)
      Activate a FlexDeploy Branch on a project.
      Specified by:
      activateBranch in interface IFlexDeployFunctions
      Parameters:
      pProjectId - project id for which the branch belongs.
      pBranchName - Branch name to inactivate.
    • findIntegrationInstance

      public IntegrationInstancePojo findIntegrationInstance(String pIntegrationInstanceCode, String pType) throws FlexNotFoundException
      Gets an integration instance based on the code. If the code does not correspond to an integration instance it will not be returned.
      Specified by:
      findIntegrationInstance in interface IFlexDeployFunctions
      Parameters:
      pIntegrationInstanceCode - Code for the integration instance.
      pType - Type of the integration instance. {SCM, TEST, ITS, CMS, CLOUD, ARTIFACTREPO, CISERVER, SCANTOOL, MESSAGING, OTHERTOOLS}.
      Returns:
      Simple pojo of the Integration Instance.
      Throws:
      FlexNotFoundException - if no integration instance found for passed code.
      Since:
      5.4
    • createSCMInstance

      public Long createSCMInstance(String pSCMInstanceName, String pDescription, Boolean pIsActive, String pInstanceCode, List<PropertyValuePojo> pProperties, String pSCMType)
      Creates and configures an SCM Instance with the provided data.
      Specified by:
      createSCMInstance in interface IFlexDeployFunctions
      Parameters:
      pSCMInstanceName - - The unique name of the SCM instance.
      pDescription - - The description of the SCM instance.
      pIsActive - - Whether the SCM instance is active.
      pInstanceCode - - The code of the SCM instance.
      pProperties - - A list of objects containing the required property values for the specified SCM type. The objects must contain propertyName field as well as either propertyValue if the value is not encrypted or credentialId if the value is encrypted.
      pSCMType - - The SCM type of the instance. Must be a valid source control management system. Possible values are SVN, GIT, CVS, TFVC, PERF, PVCS, FILE, or NONE.
      Returns:
      Id of the created SCM instance.
      Throws:
      FlexValidationException - if an invalid value is passed in pSCMInstancePojo.
      Since:
      5.4.0.1
    • createSCMInstance

      public Long createSCMInstance(SCMInstancePojo pSCMInstancePojo)
      Creates and configures an SCM instance with the given data.
      Specified by:
      createSCMInstance in interface IFlexDeployFunctions
      Parameters:
      pSCMInstancePojo - - The object containing all of the required data for the SCM instance.
      Returns:
      The Id of the created SCM instance.
      Throws:
      FlexValidationException - if an invalid value is passed in pSCMInstancePojo.
      Since:
      5.4.0.1
    • updateSCMInstance

      public Long updateSCMInstance(Long pSCMInstanceId, String pSCMInstanceName, String pDescription, Boolean pIsActive, String pInstanceCode, List<PropertyValuePojo> pProperties, String pSCMType)
      Updates an SCM instance with the given data. Returns the Id of the SCM instance after updating. If a value is left null the attribute will not be updated.
      Specified by:
      updateSCMInstance in interface IFlexDeployFunctions
      Parameters:
      pSCMInstanceId - - The Id of the instance to be updated.
      pSCMInstanceName - - The unique name of the SCM instance.
      pDescription - - The description of the SCM instance.
      pIsActive - - Whether the SCM instance is active.",
      pInstanceCode - - The code of the SCM instance.
      pProperties - - A list of objects containing the required property values for the specified SCM type. The objects must contain propertyName field as well as either propertyValue if the value is not encrypted or credentialId if the value is encrypted.
      pSCMType - - The SCM type of the instance. Must be a valid source control management system. Possible values are SVN, GIT, CVS, TFVC, PERF, PVCS, FILE, or NONE.
      Returns:
      The Id of the updated SCM Instance
      Throws:
      FlexValidationException - if an invalid value is passed in pSCMInstancePojo.
      Since:
      5.4.0.1
    • updateSCMInstance

      public Long updateSCMInstance(Long pSCMInstanceId, SCMInstancePojo pSCMInstancePojo)
      Updates an SCM instance with the given data. Returns the Id of the SCM instance after updating. If a value is left null the attribute will not be updated.
      Specified by:
      updateSCMInstance in interface IFlexDeployFunctions
      Parameters:
      pSCMInstanceId - - The Id of the instance to be updated.
      pSCMInstancePojo - - Object containing all of the required data for the SCM instance.
      Returns:
      The Id of the updated SCM instance.
      Throws:
      FlexValidationException - if an invalid value is passed in pSCMInstancePojo.
      Since:
      5.4.0.1
    • getIntegrationInstance

      public IntegrationInstancePojo getIntegrationInstance(Long pIntegrationInstanceId, String pType)
      Gets an integration instance based on the id. If the id does not correspond to an integration instance it will not be returned.
      Specified by:
      getIntegrationInstance in interface IFlexDeployFunctions
      Parameters:
      pIntegrationInstanceId - Integration Instance id.
      pType - Type of the integration instance. {SCM, TEST, ITS, CMS, CLOUD, ARTIFACTREPO, CISERVER, SCANTOOL, MESSAGING, OTHERTOOLS}.
      Returns:
      Simple pojo of the Integration Instance.
      Throws:
      FlexRowNotFoundException - if no integration instance found for pIntegrationInstanceId.
      Since:
      5.4
    • findCMSInstance

      public CMSInstancePojo findCMSInstance(String pCMSInstanceCode)
      Gets a CMSInstance based on the CMS Instance Code passed. This method returns a simple object containing the metadata of the cms instance.
      Specified by:
      findCMSInstance in interface IFlexDeployFunctions
      Parameters:
      pCMSInstanceCode - Code of the instance you wish to retrieve.
      Returns:
      Simple pojo of the CMS Instance.
      Throws:
      FlexRowNotFoundException - if no instance found for pCMSInstanceCode.
      Since:
      5.4
    • getCMSInstance

      public CMSInstancePojo getCMSInstance(Long pCMSInstanceId)
      Gets a CMSInstance based on the CMS Instance Id passed. This method returns a simple object containing the metadata of the cms instance.
      Specified by:
      getCMSInstance in interface IFlexDeployFunctions
      Parameters:
      pCMSInstanceId - Id of the instance you wish to retrieve.
      Returns:
      Simple pojo of the CMS Instance.
      Throws:
      FlexRowNotFoundException - if no instance found for pCMSInstanceId.
      Since:
      5.4
    • getChangeManagementSystemByInstanceCode

      public ChangeManagementSystem getChangeManagementSystemByInstanceCode(String pCMSInstanceCode)
      Returns a CMS System for a particular CMS Instance by searching with Instance Code.
      Specified by:
      getChangeManagementSystemByInstanceCode in interface IFlexDeployFunctions
      Parameters:
      pCMSInstanceCode - Instance code to filter by.
      Returns:
      ChangeManagementSystem implementation.
      Throws:
      FlexRowNotFoundException - If no CMS instance was found given pCode.
    • getChangeManagementSystemByInstanceName

      public ChangeManagementSystem getChangeManagementSystemByInstanceName(String pcmsInstanceName)
      Returns a CMS System for a particular CMS Instance by searching with Instance Name.
      Specified by:
      getChangeManagementSystemByInstanceName in interface IFlexDeployFunctions
      Parameters:
      pcmsInstanceName - Instance name to filter by.
      Returns:
      ChangeManagementSystem implementation.
      Throws:
      FlexRowNotFoundException - If no CMS instance was found givenpName.
    • createIncidentForWorklowRequest

      @Deprecated public CMSObject createIncidentForWorklowRequest(Long pWorkflowRequestId, Map<String,Serializable> pIncidentFields, String pCMSInstanceCode, String pCMSInstanceName)
      Deprecated.
      Specified by:
      createIncidentForWorklowRequest in interface IFlexDeployFunctions
    • createIncidentForWorkflowRequest

      public CMSObject createIncidentForWorkflowRequest(Long pWorkflowRequestId, Map<String,Serializable> pIncidentFields, String pCMSInstanceCode, String pCMSInstanceName)
      Returns a CMSObject with incident details for a particular CMS Instance by searching with Instance Name and Instance Code. Null can be passed for code or name if you do not wish to filter by that argument. You can execute all available functions used internally such as createRequest and createIncident.
      Specified by:
      createIncidentForWorkflowRequest in interface IFlexDeployFunctions
      Parameters:
      pWorkflowRequestId - Associated workflow request id .
      pIncidentFields - Payload fields populated with key value to create an Incident.
      pCMSInstanceCode - Instance code to filter by.
      pCMSInstanceName - Instance name to filter by.
      Returns:
      CMSObject Incident details.
    • createIncidentByWorkflowType

      public CMSObject createIncidentByWorkflowType(Long pWorkflowRequestId, Map<String,Serializable> pIncidentFields)
      Returns a CMSObject with incident details. This method creates incident if project's folder has an external approval configured for the workflow type and environment.
      Specified by:
      createIncidentByWorkflowType in interface IFlexDeployFunctions
      Parameters:
      pWorkflowRequestId - Associated workflow request id .
      pIncidentFields - Payload fields populated with key value to create an Incident.
      Returns:
      CMSObject Incident details.
    • getChangeManagementSystemByInstanceId

      public ChangeManagementSystem getChangeManagementSystemByInstanceId(Long pCMSInstanceId)
      Returns a CMS System for a particular CMS Instance Id. The instance allows direct integration with the change management system and includes functions such as createTicket and createIncident.
      Specified by:
      getChangeManagementSystemByInstanceId in interface IFlexDeployFunctions
      Parameters:
      pCMSInstanceId - Instance id of the implementation you wish to retrieve.
      Returns:
      ChangeManagementSystem implementation
      Throws:
      FlexRowNotFoundException - If no instance found for pCMSInstanceId.
    • getUsersFromGroupId

      public List<FDUser> getUsersFromGroupId(Long pGroupId)
      Gets a list of FDUser objects that are members of the group with the given group Id.
      Specified by:
      getUsersFromGroupId in interface IFlexDeployFunctions
      Parameters:
      pGroupId - FlexDeploy Group id to use.
      Returns:
      List of FDUser objects.
      Since:
      5.4
    • downloadLogs

      public void downloadLogs(Long pWorkflowExecutionId, String pDestinationPath)
      Downloads the plugin logs from the workflow execution based on Id. The logs will be saved in order of execution to the specified path in a folder named after the workflow execution Id.
      Specified by:
      downloadLogs in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to capture logs for.
      pDestinationPath - The path where the log files folder will be saved.
      Throws:
      FlexValidationException - if pDestinationPath is not provided.
      Since:
      5.4
    • getPluginLogInputStreams

      public Map<Long,InputStream> getPluginLogInputStreams(Long pWorkflowExecutionId)
      Returns plugin logs from a workflow execution as a map with the key being the plugin execution id and value as an InputStream of log data.
      Specified by:
      getPluginLogInputStreams in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to capture logs for.
      Since:
      5.4
    • getPluginLogInputStreams

      public Map<Long,InputStream> getPluginLogInputStreams(Long pWorkflowExecutionId, Boolean pOnlyError)
      Returns plugin logs from a workflow execution as a map with the key being the plugin execution id and value as an InputStream of log data.
      Specified by:
      getPluginLogInputStreams in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to capture logs for.
      pOnlyError - Return only the failed plugin log input stream, otherwise all plugin logs for the workflow will be returned.
      Since:
      5.4
    • getPackage

      public PackageDetailsResponsePojo getPackage(Long pProjectId, String pPackageName)
      Returns a PackageDetailsResponsePojo given a Project Id and Package Name
      Specified by:
      getPackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id package is under.
      pPackageName - Name of package
      Returns:
      PackageDetailsResponsePojo
      Throws:
      FlexRowNotFoundException - If no project package found for pProjectId and pPackageName.
      Since:
      5.5.0.3
    • getPluginLogs

      public Collection<PluginLogPojo> getPluginLogs(Long pWorkflowExecutionId)
      Gets the plugin logs from the workflow execution based on Id.
      Specified by:
      getPluginLogs in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to capture logs for.
      Returns:
      A collection, one per plugin execution, of PluginLogPojos.
      Since:
      5.4
    • getFlexDeployBaseUrl

      public String getFlexDeployBaseUrl()
      Returns the FlexDeploy Server base url configured in System Settings.
      Specified by:
      getFlexDeployBaseUrl in interface IFlexDeployFunctions
      Returns:
      The base url of the current FlexDeploy service.
      Since:
      5.4
    • getFlexDeployHostname

      public String getFlexDeployHostname()
      Returns the FlexDeploy Server host name. This relies on the Server base url being configured in System Settings.
      Specified by:
      getFlexDeployHostname in interface IFlexDeployFunctions
      Returns:
      The hostname of the current FlexDeploy service.
      Since:
      9.0.0.3
    • getGroovyKey

      public String getGroovyKey()
      Specified by:
      getGroovyKey in class BaseFunctions
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in class BaseFunctions
    • executeUtility

      public Long executeUtility(Long pProjectId, String pEnvironmentCode)
      Executes a FlexDeploy Utility Project for a single environment on all instances configured in Project Configuration.
      Specified by:
      executeUtility in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to execute.
      pEnvironmentCode - Environment code to use for the utility request.
      Returns:
      WorkflowRequest id
      Throws:
      FlexValidationException - if pEnvironmentCode is not provided.
    • executeUtility

      public Long executeUtility(Long pProjectId, String pEnvironmentCode, ExecuteOptions pExecuteOptions)
      Executes a FlexDeploy Utility Project for a single environment with specified ExecuteOptions. If instance codes are not passed in the ExecuteOptions, then the project will get executed on all instances associated to the passed environment.
      Specified by:
      executeUtility in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project id to execute.
      pEnvironmentCode - Environment code to use for the utility request.
      pExecuteOptions - Execute options contains list of instances to execute on, with inputs and flexfields
      Returns:
      WorkflowRequest id
      Throws:
      FlexValidationException - if pEnvironmentCode is not provided.
    • findFolderId

      public Long findFolderId(String pFolderName)
      Finds the FlexDeploy Folder id for any given name. This will only work properly if all Folder Names are unique.
      Specified by:
      findFolderId in interface IFlexDeployFunctions
      Parameters:
      pFolderName - Case-sensitive folder name to search by
      Returns:
      Folder id
      Throws:
      FlexRowNotFoundException - If folder name is not found in FlexDeploy
    • findFolderWithId

      public FolderDataObject findFolderWithId(Long pFolderId)
      Finds Folder using Id.
      Specified by:
      findFolderWithId in interface IFlexDeployFunctions
      Parameters:
      pFolderId -
      Returns:
    • findFoldersWithName

      public List<FolderDataObject> findFoldersWithName(String pFolderName)
      Finds FlexDeploy Folders for any given name
      Specified by:
      findFoldersWithName in interface IFlexDeployFunctions
      Parameters:
      pFolderName - Case-insensitive project name to search by
      Returns:
    • searchFolders

      public <any> searchFolders(FolderDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Folders based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Folders matching search parameters.
      Specified by:
      searchFolders in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - FolderDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at the beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Folders matching the search criteria.
    • searchBranches

      public <any> searchBranches(ProjectStreamDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Branches based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Branches matching search parameters.
      Specified by:
      searchBranches in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - ProjectStreamDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Branches matching the search criteria.
    • getUser

      public FlxUserDataObject getUser(String pUsername)
      Returns user information for a given username.
      Specified by:
      getUser in interface IFlexDeployFunctions
      Parameters:
      pUsername - - Username of the user to retrieve.
      Returns:
      Object containing basic information for the given user if the user exists.
      Since:
      5.7.0.2
    • getCurrentlyDeployedVersionId

      public Long getCurrentlyDeployedVersionId(Long pProjectId, Long pEnvironmentId, Long pTargetGroupId)
      Returns currently deployed project version Id of the full deployment project.
      Specified by:
      getCurrentlyDeployedVersionId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project Id of the project to retrieve.
      pEnvironmentId - - Id of the environment.
      pTargetGroupId - - Id of the instance.
      Returns:
      currently deployed project version Id.
    • getCurrentlyDeployedVersionId

      public Long getCurrentlyDeployedVersionId(Long pProjectId, Long pEnvironmentId, Long pTargetGroupId, String pPackageName)
      Returns currently deployed project version Id of the partial deployment project.
      Specified by:
      getCurrentlyDeployedVersionId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project Id of the project to retrieve.
      pEnvironmentId - - Id of the environment.
      pTargetGroupId - - Id of the instance.
      pPackageName - - Name of the package.
      Returns:
      currently deployed project version Id.
      Throws:
      FlexValidationException - if pPackageName is not provided.
    • getPreviouslyDeployedVersionId

      public Long getPreviouslyDeployedVersionId(Long pProjectId, Long pEnvironmentId, Long pTargetGroup)
      Returns previously deployed project version Id of the full deployment project.
      Specified by:
      getPreviouslyDeployedVersionId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project Id of the project to retrieve.
      pEnvironmentId - - Id of the environment.
      pTargetGroup - - Id of the target group.
      Returns:
      previously deployed project version Id.
    • getPreviouslyDeployedVersionId

      public Long getPreviouslyDeployedVersionId(Long pProjectId, Long pEnvironmentId, Long pTargetGroupId, String pPackageName)
      Returns previously deployed project version Id of partial deployment project.
      Specified by:
      getPreviouslyDeployedVersionId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project Id of the project to retrieve.
      pEnvironmentId - - Id of the environment.
      pTargetGroupId - - Id of the instance.
      pPackageName - - Name of the package.
      Returns:
      previously deployed project version Id.
      Throws:
      FlexValidationException - if pPackageName is not provided.
    • createStream

      @Deprecated public Long createStream(Long pProjectId, ProjectStreamPojo pBranch)
      Deprecated.
      Specified by:
      createStream in interface IFlexDeployFunctions
    • createStream

      @Deprecated public Long createStream(Long pProjectId, String pbranchName)
      Deprecated.
      Specified by:
      createStream in interface IFlexDeployFunctions
    • createStream

      @Deprecated public Long createStream(Long pProjectId, String pbranchName, String pVersionSyntax)
      Deprecated.
      Specified by:
      createStream in interface IFlexDeployFunctions
    • findStreamId

      @Deprecated public Long findStreamId(Long pProjectId, String pbranchName)
      Deprecated.
      Specified by:
      findStreamId in interface IFlexDeployFunctions
    • inactivateStream

      @Deprecated public void inactivateStream(Long pProjectId, String pbranchName)
      Deprecated.
      Specified by:
      inactivateStream in interface IFlexDeployFunctions
    • activateStream

      @Deprecated public void activateStream(Long pProjectId, String pbranchName)
      Deprecated.
      Specified by:
      activateStream in interface IFlexDeployFunctions
    • patchStream

      @Deprecated public void patchStream(Long pProjectId, Long pBranchId, ProjectStreamDataObject pStream)
      Deprecated.
      Specified by:
      patchStream in interface IFlexDeployFunctions
    • updateStream

      @Deprecated public void updateStream(Long pProjectId, Long pBranchId, ProjectStreamPojo pStream)
      Deprecated.
      Specified by:
      updateStream in interface IFlexDeployFunctions
    • updateScanResult

      public void updateScanResult(Long pProjectId, String pScanId, ScanResultPojo pScanResultPojo, boolean pIsStatusSuccess)
      Updates a FlexDeploy ScanResult on a given project.
      Specified by:
      updateScanResult in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Project to update the scan results.
      pScanId - Id of the scan result to update.
      pScanResultPojo - ScanResultPojo object representing the scanResult to update.
      pIsStatusSuccess - is scan status success or not.
      Since:
      6.0
    • getScanResultForSonarqube

      public ScanResultPojo getScanResultForSonarqube(String pBaseUrl, String pProjectKey) throws FlexCheckedException
      get Scan result for SonarQube
      Specified by:
      getScanResultForSonarqube in interface IFlexDeployFunctions
      Parameters:
      pBaseUrl -
      pProjectKey -
      Returns:
      ScanResultPojo
      Throws:
      FlexCheckedException
      Since:
      6.0
    • getIssueTrackingSystemByInstanceCode

      public IssueTrackingSystem getIssueTrackingSystemByInstanceCode(String pITSInstanceCode)
      Returns an ITS System for a particular ITS Instance Code. The instance allows direct integration with the issue tracking system and includes functions such as getTicketStatus, getTicketURL.
      Specified by:
      getIssueTrackingSystemByInstanceCode in interface IFlexDeployFunctions
      Parameters:
      pITSInstanceCode - Instance code of the implementation you wish to retrieve.
      Returns:
      IssueTrackingSystem implementation
      Throws:
      FlexRowNotFoundException - If no instance found for pInstanceCode.
    • getIssueTrackingSystemByInstanceName

      public IssueTrackingSystem getIssueTrackingSystemByInstanceName(String pITSInstanceName)
      Returns an ITS System for a particular ITS Instance Name. The instance allows direct integration with the issue tracking system and includes functions such as getTicketStatus, getTicketURL.
      Specified by:
      getIssueTrackingSystemByInstanceName in interface IFlexDeployFunctions
      Parameters:
      pITSInstanceName - Instance Name of the implementation you wish to retrieve.
      Returns:
      IssueTrackingSystem implementation
      Throws:
      FlexRowNotFoundException - If no instance found for pInstanceName.
    • getIssueTrackingSystemByInstanceId

      public IssueTrackingSystem getIssueTrackingSystemByInstanceId(Long pITSInstanceId)
      Returns an ITS System for a particular ITS Instance Id. The instance allows direct integration with the issue tracking system and includes functions such as getTicketStatus, getTicketURL.
      Specified by:
      getIssueTrackingSystemByInstanceId in interface IFlexDeployFunctions
      Parameters:
      pITSInstanceId - Instance id of the implementation you wish to retrieve.
      Returns:
      IssueTrackingSystem implementation
      Throws:
      FlexRowNotFoundException - If no instance found for pITSInstanceId.
    • getMatchingProjectObjectId

      public Long getMatchingProjectObjectId(Long pProjectId, String pFile)
      Returns internal id for file in a project. File is path represented on File Catalog.
      Specified by:
      getMatchingProjectObjectId in interface IFlexDeployFunctions
      Parameters:
      pProjectId -
      pFile -
      Returns:
    • searchProjectPackages

      public <any> searchProjectPackages(ProjectPackageDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Packages based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Packages matching search parameters.
      Specified by:
      searchProjectPackages in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - ProjectPackageDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Packages matching the search criteria.
    • searchEnvironments

      public <any> searchEnvironments(EnvironmentDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Environments based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Environments matching search parameters.
      Specified by:
      searchEnvironments in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - EnvironmentDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Environments matching the search criteria.
    • searchTargetGroups

      public <any> searchTargetGroups(TargetGroupDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find TargetGroups based provided search parameters and pagination input. Returns a PaginatedResponse containing list of TargetGroups matching search parameters.
      Specified by:
      searchTargetGroups in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - TargetGroupDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at the beginning of the query result.
      Returns:
      PaginatedResponse containing the list of TargetGroups matching the search criteria.
    • getEnvironmentById

      public EnvironmentDataObject getEnvironmentById(Long pEnvironmentId)
      Returns Environment information for a given environment Id.
      Specified by:
      getEnvironmentById in interface IFlexDeployFunctions
      Parameters:
      pEnvironmentId - Environment id of the Environment to retrieve
      Returns:
      Object containing metadata about the given Environment
      Throws:
      FlexRowNotFoundException - If Environment not found for given pEnvironmentId
    • getEnvironmentByCode

      public EnvironmentDataObject getEnvironmentByCode(String pEnvironmentCode)
      Returns Environment information for a given environment code.
      Specified by:
      getEnvironmentByCode in interface IFlexDeployFunctions
      Parameters:
      pEnvironmentCode - Environment code of the Environment to retrieve
      Returns:
      Object containing metadata about the given Environment
      Throws:
      FlexRowNotFoundException - If Environment not found for given pEnvironmentCode
    • getEnvironmentByName

      public EnvironmentDataObject getEnvironmentByName(String pEnvironmentName)
      Returns Environment information for a given environmentName
      Specified by:
      getEnvironmentByName in interface IFlexDeployFunctions
      Parameters:
      pEnvironmentName - Environment name of the Environment to retrieve
      Returns:
      Object containing metadata about the given Environment
      Throws:
      FlexRowNotFoundException - If Environment not found for given pEnvironmentName
    • getTargetGroupById

      public TargetGroupDataObject getTargetGroupById(Long pTargetGroupId)
      Get the TargetGroup based on TargetGroup id passed.
      Specified by:
      getTargetGroupById in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupId -
      Returns:
      TargetGroupDataObject
      Throws:
      FlexRowNotFoundException - If TargetGroup not found for given pTargetGroupId
    • getTargetGroupByCode

      public TargetGroupDataObject getTargetGroupByCode(String pTargetGroupCode)
      Get the TargetGroup based on TargetGroup code passed.
      Specified by:
      getTargetGroupByCode in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupCode - TargetGroup code of the TargetGroup to retrieve
      Returns:
      TargetGroupDataObject
      Throws:
      FlexRowNotFoundException - If TargetGroup not found for given pTargetGroupCode
    • getTargetGroupByName

      public TargetGroupDataObject getTargetGroupByName(String pTargetGroupName)
      Get the TargetGroup based on TargetGroup name passed.
      Specified by:
      getTargetGroupByName in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupName -
      Returns:
      TargetGroupDataObject
      Throws:
      FlexRowNotFoundException - If TargetGroup not found for given pTargetGroupName
    • findEnvironment

      public List<EnvironmentPojo> findEnvironment(String pEnvironmentCode)
      Gets the environment with the specified environment code.
      Specified by:
      findEnvironment in interface IFlexDeployFunctions
      Parameters:
      pEnvironmentCode - Code of the environment.
      Returns:
      A List of pojo of the environment.
      Throws:
      FlexRowNotFoundException - If no environment is found for the given environment code
      Since:
      5.4
    • getEnvironment

      public EnvironmentPojo getEnvironment(Long pEnvironmentId)
      Gets the environment with the specified Id.
      Specified by:
      getEnvironment in interface IFlexDeployFunctions
      Parameters:
      pEnvironmentId - Id of the environment.
      Returns:
      A simple pojo of the environment.
      Throws:
      FlexRowNotFoundException - If no environment is found for the given id.
      Since:
      5.4
    • getWorkflowExecutionCommits

      public List<ScmCommitDataObject> getWorkflowExecutionCommits(Long pWorkflowExecutionId)
      Gets Commit details associated with workflow execution. Commits associated may be different for same Project Version deployed to two different environments, depending on what was previously deployed to those environments. This method indicates which commits were built or deployed as part of specific workflow execution.
      Specified by:
      getWorkflowExecutionCommits in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated commit details
      Returns:
      A simple pojoList of the commit details
      Since:
      6.5
    • getWorkflowExecutionWorkItems

      public List<WorkItemDataObject> getWorkflowExecutionWorkItems(Long pWorkflowExecutionId)
      Gets WorkItem details associated with workflow execution. WorkItems associated may be different for same Project Version deployed to two different environments, depending on what was previously deployed to those environments. This method indicates which WorkItems were built or deployed as part of specific workflow execution.
      Specified by:
      getWorkflowExecutionWorkItems in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated workitem details
      Returns:
      A simple pojoList of the workitem details
      Since:
      6.5
    • getWorkflowExecutionByWorkflowRequestId

      public List<WorkflowExecutionDataObject> getWorkflowExecutionByWorkflowRequestId(Long pWorkflowRequestId)
      Gets workflow execution details by workflow request id.
      Specified by:
      getWorkflowExecutionByWorkflowRequestId in interface IFlexDeployFunctions
      Parameters:
      pWorkflowRequestId - Workflow Request Id to retrieve associated workflow execution details.
      Returns:
      A simple pojoList of the workflow execution details.
      Since:
      6.5
    • getWorkflowExecutionById

      public WorkflowExecutionDataObject getWorkflowExecutionById(Long pWorkflowExecutionId)
      Gets workflow execution details for workflow execution id.
      Specified by:
      getWorkflowExecutionById in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated workflow execution details.
      Returns:
      A simple pojoList of the workflow execution details.
      Throws:
      FlexRowNotFoundException - If no workflow execution is found for the given id.
      Since:
      6.5
    • getWorkflowExecutionOutputs

      public List<CodeValueInputPOJO> getWorkflowExecutionOutputs(Long pWorkflowExecutionId)
      Gets workflow execution output details for workflow execution id.
      Specified by:
      getWorkflowExecutionOutputs in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated workflow execution output details.
      Returns:
      A simple pojoList of the workflow execution output details.
      Throws:
      FlexRowNotFoundException
      Since:
      6.5
    • getWorkflowExecutionInputs

      public List<CodeValueInputPOJO> getWorkflowExecutionInputs(Long pWorkflowExecutionId)
      Gets workflow execution inputs details for workflow execution id.
      Specified by:
      getWorkflowExecutionInputs in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated workflow execution input details.
      Returns:
      A simple pojoList of the workflow execution input details.
      Throws:
      FlexRowNotFoundException
      Since:
      6.5.0.5
    • getWorkflowExecutionFlexfields

      public List<CodeValueInputPOJO> getWorkflowExecutionFlexfields(Long pWorkflowExecutionId)
      Gets workflow execution flexfields details for workflow execution id.
      Specified by:
      getWorkflowExecutionFlexfields in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated workflow execution flexfields details.
      Returns:
      A simple pojoList of the workflow execution flexfields details.
      Throws:
      FlexRowNotFoundException
      Since:
      6.5.0.5
    • getWorkflowExecutionVariables

      public WorkflowExecutionVariables getWorkflowExecutionVariables(Long pWorkflowExecutionId)
      Gets workflow execution variables for workflow execution id. Return object contains inputs, outputs, flexfields, properties, etc...
      Specified by:
      getWorkflowExecutionVariables in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated workflow execution variables.
      Returns:
      A simple pojo of the workflow execution variables.
      Throws:
      FlexRowNotFoundException
      Since:
      6.5.0.5
    • getActiveBuildFlexfieldMetadata

      public List<FlexFieldMetadataDataObject> getActiveBuildFlexfieldMetadata()
      Gets active build flexfields metadata.
      Specified by:
      getActiveBuildFlexfieldMetadata in interface IFlexDeployFunctions
      Returns:
      A simple pojoList of the active build flexfield metadata details.
      Since:
      6.5.0.5
    • getActiveDeployUtilityFlexfieldMetadata

      public List<FlexFieldMetadataDataObject> getActiveDeployUtilityFlexfieldMetadata()
      Gets active deploy or utility flexfields metadata.
      Specified by:
      getActiveDeployUtilityFlexfieldMetadata in interface IFlexDeployFunctions
      Returns:
      A simple pojoList of the active deploy or utility flexfield metadata details.
      Since:
      6.5.0.5
    • getProjectVersionById

      public ProjectVersionDataObject getProjectVersionById(Long pProjectVersionId, Long pProjectId)
      Gets project version data object by project version id and project Id.
      Specified by:
      getProjectVersionById in interface IFlexDeployFunctions
      Parameters:
      pProjectVersionId - Project version Id to get the project version data object.
      pProjectId - Project Id to get the project version data object.
      Returns:
      A simple pojoList of the project version details.
      Throws:
      FlexRowNotFoundException - If no project version is found for the given project version id and project id.
      Since:
      6.5
    • searchProjectVersions

      public <any> searchProjectVersions(ProjectVersionDataObject pParameters, Integer pLimit, Integer pOffset)
      Find Project Versions based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Project Versions matching search parameters.
      Specified by:
      searchProjectVersions in interface IFlexDeployFunctions
      Parameters:
      pParameters - Parameters for the search criteria.
      pLimit - Limit for the number of rows to be returned.
      pOffset - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Project Versions matching the search criteria.
      Since:
      6.5
    • getPipelineStageGateTasks

      public List<TasksQueryResultPojo> getPipelineStageGateTasks(Long pPipelineStageExecId)
      Gets Task details based on pipeline stage execution id.
      Specified by:
      getPipelineStageGateTasks in interface IFlexDeployFunctions
      Parameters:
      pPipelineStageExecId - pipeline stage execution id to get the Tasks details.
      Returns:
      A simple pojo list of task details.
      Since:
      6.5
    • getApprovedPipelineStageGateTasks

      public List<TasksQueryResultPojo> getApprovedPipelineStageGateTasks(Long pPipelineStageExecId)
      Gets Task details based on pipeline stage execution id.
      Specified by:
      getApprovedPipelineStageGateTasks in interface IFlexDeployFunctions
      Parameters:
      pPipelineStageExecId - pipeline stage execution id to get the Tasks details.
      Returns:
      A simple pojo list of task details.
      Since:
      6.5
    • getWorkflowRequestTasks

      public List<TasksQueryResultPojo> getWorkflowRequestTasks(Long pWorkflowRequestId)
      Gets Task details based on workflow request id.
      Specified by:
      getWorkflowRequestTasks in interface IFlexDeployFunctions
      Parameters:
      pWorkflowRequestId - Workflow Request id to get the Tasks details.
      Returns:
      A simple pojo list of task details.
      Since:
      6.5
    • createProjectTrigger

      public ProjectTriggerDataObject createProjectTrigger(ProjectTriggerDataObject pPojo)
      Creates a project trigger with the provided data.Returns the project trigger details after creation.
      Specified by:
      createProjectTrigger in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing Project trigger details to create the project trigger.
      Returns:
      A simple pojo of the project trigger details.
      Since:
      6.5
    • getPipelineProjectGroups

      public List<PipelineProjectGroupDataObject> getPipelineProjectGroups(Long pPipelineDefinitionId)
      Returns a List of Project groups in a Pipeline.
      Specified by:
      getPipelineProjectGroups in interface IFlexDeployFunctions
      Parameters:
      pPipelineDefinitionId - The id of the Pipeline for which you want to fetch the Project Groups.
    • getProjectTriggerById

      public ProjectTriggerDataObject getProjectTriggerById(Long pProjectTriggerId) throws FlexRowNotFoundException
      Returns the project trigger information based on the project Trigger id.
      Specified by:
      getProjectTriggerById in interface IFlexDeployFunctions
      Parameters:
      pProjectTriggerId - Project Trigger Id to retrieve the project trigger details.
      Returns:
      A simple pojo of project trigger details.
      Throws:
      FlexRowNotFoundException - If no project trigger is found for the given project trigger id
      Since:
      6.5
    • searchProjectTriggers

      public <any> searchProjectTriggers(ProjectTriggerDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Project Triggers based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Project Triggers matching search parameters.
      Specified by:
      searchProjectTriggers in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - ProjectTriggerDataObject filled with criteria values.
      pLimit - Limit for the number of rows to be returned.
      pOffset - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Project Triggers matching the search criteria.
      Since:
      6.5
    • updateProjectTrigger

      public ProjectTriggerDataObject updateProjectTrigger(ProjectTriggerDataObject pPojo)
      Updates Project Trigger based on the project trigger details.
      Specified by:
      updateProjectTrigger in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing project trigger details to update the project trigger.
      Returns:
      A simple pojo of project trigger details.
      Throws:
      FlexRowNotFoundException - If no project trigger is found for the given project trigger details.
      Since:
      6.5
    • patchProjectTrigger

      public ProjectTriggerDataObject patchProjectTrigger(ProjectTriggerDataObject pPojo)
      Updates a project trigger with the provided data. This will only update fields that are passed in the pojo.
      Specified by:
      patchProjectTrigger in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing Project trigger details to update the project trigger.
      Returns:
      A simple pojo of project trigger details.
      Throws:
      FlexRowNotFoundException - If no project trigger is found for the given project trigger details.
      Since:
      6.5
    • deleteProjectTrigger

      public void deleteProjectTrigger(Long pProjectTriggerId)
      Deletes the project trigger based on the project Trigger id.
      Specified by:
      deleteProjectTrigger in interface IFlexDeployFunctions
      Parameters:
      pProjectTriggerId - Project trigger Id to delete the respective project trigger.
      Since:
      6.5
    • createFlxWorkItem

      public FlxWorkItemDataObject createFlxWorkItem(FlxWorkItemDataObject pPojo)
      Creates a FlexWorkItem with the provided data.Returns the WorkItem details after creation.
      Specified by:
      createFlxWorkItem in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing WorkItem details to create the WorkItem.
      Returns:
      A simple pojo of WorkItem details.
      Since:
      7.0.0.0
    • updateFlxWorkItem

      public FlxWorkItemDataObject updateFlxWorkItem(FlxWorkItemDataObject pPojo)
      Updates FlexWorkItem based on the provided details. This will updates like type, status, title, description, assignee and custom fields.
      Specified by:
      updateFlxWorkItem in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing WorkItem details to update the WorkItem.
      Returns:
      A simple pojo of WorkItem details.
      Since:
      7.0.0.0
    • patchFlxWorkItem

      public FlxWorkItemDataObject patchFlxWorkItem(FlxWorkItemDataObject pPojo)
      Patches a FlexWorkItem with the provided data. This will only update fields that are passed in the pojo. This will patches like type, status, title, description and assignee.
      Specified by:
      patchFlxWorkItem in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing WorkItem details to update the WorkItem.
      Returns:
      A simple pojo of WorkItem details.
      Since:
      7.0.0.0
    • findFlxWorkItemByNumber

      public FlxWorkItemDataObject findFlxWorkItemByNumber(String pWorkItemNumber)
      Gets FlexWorkItem based on WorkItem number.
      Specified by:
      findFlxWorkItemByNumber in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number to get the WorkItem details.
      Returns:
      A simple pojo of WorkItem details.
      Throws:
      FlexRowNotFoundException - If no FlexWorkItem is found for the given WorkItem number.
      Since:
      7.0.0.0
    • updateFlxWorkItemStatus

      public FlxWorkItemDataObject updateFlxWorkItemStatus(String pWorkItemNumber, String pStatusName)
      Updates a FlexWorkItem status.
      Specified by:
      updateFlxWorkItemStatus in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number.
      pStatusName - WorkItem status Name.
      Returns:
      A simple pojo of WorkItem details.
      Since:
      7.0.0.0
    • updateFlxWorkItemType

      public FlxWorkItemDataObject updateFlxWorkItemType(String pWorkItemNumber, String pTypeCode)
      Updates a FlexWorkItem Type.
      Specified by:
      updateFlxWorkItemType in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number.
      pTypeCode - WorkItem type code
      Returns:
      A simple pojo of WorkItem details.
      Since:
      7.0.0.0
    • updateFlxWorkItemAssignee

      public FlxWorkItemDataObject updateFlxWorkItemAssignee(String pWorkItemNumber, String pUserName)
      Updates a FlexWorkItem Assignee.
      Specified by:
      updateFlxWorkItemAssignee in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number.
      pUserName - user name.
      Returns:
      A simple pojo of WorkItem details.
      Since:
      7.0.0.0
    • getFlxWorkItemTypes

      public List<FlxWorkItemTypeDataObject> getFlxWorkItemTypes()
      Gets the FlexWorkItem types.
      Specified by:
      getFlxWorkItemTypes in interface IFlexDeployFunctions
      Returns:
      List of FlxWorkItemTypeDataObject objects
      Since:
      7.0.0.0
    • getFlxWorkItemStatuses

      public List<FlxWorkItemStatusDataObject> getFlxWorkItemStatuses()
      Gets the FlexWorkItem statuses.
      Specified by:
      getFlxWorkItemStatuses in interface IFlexDeployFunctions
      Returns:
      List of FlxWorkItemStatusDataObject objects
      Since:
      7.0.0.0
    • addWorkItemComment

      public FdCommentDataObject addWorkItemComment(String pWorkItemNumber, String pComment)
      Adds a WorkItem comment with the provided data.
      Specified by:
      addWorkItemComment in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number.
      pComment - comment.
      Returns:
      A simple pojo of FlexWorkItem comment details.
      Since:
      7.0.0.0
    • getWorkItemsForSuccessfulExecutions

      public List<WorkItemDataObject> getWorkItemsForSuccessfulExecutions(Long pSnapshotId, Long pEnvironmentId)
      Gets WorkItem details associated with successful execution for given snapshot and environment.
      Specified by:
      getWorkItemsForSuccessfulExecutions in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - Id of the snapshot.
      pEnvironmentId - Id of the environment.
      Returns:
      A simple pojoList of the WorkItem details.
      Since:
      7.0.0.0
    • getWorkItemsForAllExecutions

      public List<WorkItemDataObject> getWorkItemsForAllExecutions(Long pSnapshotId, Long pEnvironmentId)
      Gets WorkItem details associated with all execution for given snapshot and environment.
      Specified by:
      getWorkItemsForAllExecutions in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - Id of the snapshot.
      pEnvironmentId - Id of the environment.
      Returns:
      A simple pojoList of the WorkItem details.
      Since:
      7.0.0.0
    • getWorkItemsForFailedExecutions

      public List<WorkItemDataObject> getWorkItemsForFailedExecutions(Long pSnapshotId, Long pEnvironmentId)
      Gets WorkItem details associated with failed execution for given snapshot and environment.
      Specified by:
      getWorkItemsForFailedExecutions in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - Id of the snapshot.
      pEnvironmentId - Id of the environment.
      Returns:
      A simple pojoList of the WorkItem details.
      Since:
      7.0.0.0
    • getWorkItemsForSnapshotVersions

      public List<WorkItemDataObject> getWorkItemsForSnapshotVersions(Long pSnapshotId)
      Gets WorkItem details associated with snapshot versions.
      Specified by:
      getWorkItemsForSnapshotVersions in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - Id of the snapshot.
      Returns:
      A simple pojoList of the WorkItem details.
      Since:
      7.0.0.0
    • saveFlxWorkItemFieldData

      public List<FlxWorkItemFieldDataDataObject> saveFlxWorkItemFieldData(String pWorkItemNumber, String pFieldName, Serializable pValue)
      Saves FlexWorkItem field data on given WorkItem number, field name and value.
      Specified by:
      saveFlxWorkItemFieldData in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number.
      pFieldName - field name.
      pValue - field value.
      Returns:
      List of WorkItem field details.
      Since:
      7.0.0.0
    • getFlxWorkItemFieldData

      public List<FlxWorkItemFieldDataDataObject> getFlxWorkItemFieldData(String pWorkItemNumber)
      Returns List of WorkItem field details for FlexWorkItem number.
      Specified by:
      getFlxWorkItemFieldData in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber -
      Returns:
      List of WorkItem field details.
      Since:
      7.0.0.0
    • parseWorkItemRichText

      public String parseWorkItemRichText(String pWorkItemRichText)
      Parse Rich Text to retrieve raw text.
      Specified by:
      parseWorkItemRichText in interface IFlexDeployFunctions
      Parameters:
      pWorkItemRichText -
      Returns:
      Raw text.
      Since:
      7.0.0.0
    • getUsersFromGroupName

      public List<FDUser> getUsersFromGroupName(String pGroupName)
      Gets a list of FDUser objects that are members of the group with the given group name.
      Specified by:
      getUsersFromGroupName in interface IFlexDeployFunctions
      Parameters:
      pGroupName - FlexDeploy Group name to use.
      Returns:
      List of FDUser objects.
      Since:
      7.0.0.0
    • getReportsByWorkflowExecutionId

      public List<WorkflowExecutionReportDataObject> getReportsByWorkflowExecutionId(Long pWorkflowExecutionId)
      Gets a list of WorkflowExecutionReportDataObject objects that are associated with a workflow execution
      Specified by:
      getReportsByWorkflowExecutionId in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution ID
      Returns:
      List of WorkflowExecutionReportDataObject objects.
      Since:
      6.5.0.4
    • getReportDataByWorkflowExecutionReportId

      public InputStream getReportDataByWorkflowExecutionReportId(Long pWorkflowExecutionReportId)
      Get a report by Workflow Execution Report ID. To find the workflow execution report ID use getReportsByWorkflowExecutionId
      Specified by:
      getReportDataByWorkflowExecutionReportId in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionReportId - Workflow Execution Report ID
      Returns:
      Input stream of the file
      Since:
      6.5.0.4
    • getProjectBranchById

      public ProjectStreamDataObject getProjectBranchById(Long pBranchId, Long pProjectId) throws FlexRowNotFoundException
      Returns the project branch details for given branchId and projectId
      Specified by:
      getProjectBranchById in interface IFlexDeployFunctions
      Parameters:
      pBranchId -
      pProjectId -
      Returns:
      A pojo with Project branch details
      Throws:
      FlexRowNotFoundException - If no project branch is found for given branchId and projectId
      Since:
      6.5.0.5
    • getEndpointById

      public EndpointDataObject getEndpointById(Long pEndpointId)
      Returns Endpoint information for a given endpoint Id.
      Specified by:
      getEndpointById in interface IFlexDeployFunctions
      Parameters:
      pEndpointId - - Endpoint id of the Endpoint to retrieve.
      Returns:
      Object containing metadata about the given Endpoint.
      Throws:
      FlexRowNotFoundException - If Endpoint not found for given pEndpointId.
      Since:
      6.5.0.5
    • getEndpointByName

      public EndpointDataObject getEndpointByName(String pEndpointName)
      Returns Endpoint information for a given Endpoint Name.
      Specified by:
      getEndpointByName in interface IFlexDeployFunctions
      Parameters:
      pEndpointName - - Endpoint name of the Endpoint to retrieve.
      Returns:
      Object containing metadata about the given Endpoint.
      Throws:
      FlexRowNotFoundException - If Endpoint not found for given pEndpointName.
      Since:
      6.5.0.5
    • createEndpoint

      public EndpointDataObject createEndpoint(EndpointDataObject pEndpointDataObject)
      Create Endpoint with the provided data. Returns the Endpoint details after creation.
      Specified by:
      createEndpoint in interface IFlexDeployFunctions
      Parameters:
      pEndpointDataObject - - Object containing the Endpoint details to create the Endpoint.
      Returns:
      A data object of the Endpoint details.
      Since:
      6.5.0.5
    • updateEndpoint

      public EndpointDataObject updateEndpoint(EndpointDataObject pEndpointDataObject)
      Update Endpoint based on the Endpoint details.
      Specified by:
      updateEndpoint in interface IFlexDeployFunctions
      Parameters:
      pEndpointDataObject - - Object containing the Endpoint details to update the Endpoint.
      Returns:
      A data object of Endpoint details.
      Throws:
      FlexRowNotFoundException - If no Endpoint is found for the given Endpoint details.
      Since:
      6.5.0.5
    • patchEndpoint

      public EndpointDataObject patchEndpoint(EndpointDataObject pEndpointDataObject)
      Update Endpoint with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchEndpoint in interface IFlexDeployFunctions
      Parameters:
      pEndpointDataObject - - Object containing the Endpoint details to update the Endpoint.
      Returns:
      A data object of Endpoint details.
      Throws:
      FlexRowNotFoundException - If no Endpoint is found for the given Endpoint details.
      Since:
      6.5.0.5
    • searchEndpoints

      public <any> searchEndpoints(EndpointDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Endpoints based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Endpoints matching search parameters.
      Specified by:
      searchEndpoints in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - EndpointDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Endpoints matching the search criteria.
      Since:
      6.5.0.5
    • getGroupById

      public FlxGroupDataObject getGroupById(Long pGroupId)
      Returns Group information for a given group Id.
      Specified by:
      getGroupById in interface IFlexDeployFunctions
      Parameters:
      pGroupId - - Group id of the Group to retrieve.
      Returns:
      Object containing metadata about the given Group.
      Throws:
      FlexRowNotFoundException - If Group not found for given pGroupId.
      Since:
      6.5.0.5
    • getGroupByName

      public FlxGroupDataObject getGroupByName(String pGroupName)
      Returns Group information for a given group name.
      Specified by:
      getGroupByName in interface IFlexDeployFunctions
      Parameters:
      pGroupName - - Group name of the Group to retrieve.
      Returns:
      Object containing metadata about the given Group.
      Throws:
      FlexRowNotFoundException - If Group not found for given pGroupName.
      Since:
      6.5.0.5
    • createGroup

      public FlxGroupDataObject createGroup(FlxGroupDataObject pGroupDataObject)
      Create Group with the provided data. Returns the Group details after creation.
      Specified by:
      createGroup in interface IFlexDeployFunctions
      Parameters:
      pGroupDataObject - - Object containing the Group details to create the Group.
      Returns:
      A data object of the Group details.
      Since:
      6.5.0.5
    • patchGroup

      public FlxGroupDataObject patchGroup(FlxGroupDataObject pGroupDataObject)
      Update Group with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchGroup in interface IFlexDeployFunctions
      Parameters:
      pGroupDataObject - - Object containing the Group details to update the Group.
      Returns:
      A data object of the Group details.
      Throws:
      FlexRowNotFoundException - If no Group is found for the given Group details.
      Since:
      6.5.0.5
    • updateGroup

      public FlxGroupDataObject updateGroup(FlxGroupDataObject pGroupDataObject)
      Update Group based on the Group details.
      Specified by:
      updateGroup in interface IFlexDeployFunctions
      Parameters:
      pGroupDataObject - - Object containing the Group details to update the Group.
      Returns:
      A data object of the Group details.
      Throws:
      FlexRowNotFoundException - If no Group is found for the given Group details.
      Since:
      6.5.0.5
    • searchGroups

      public <any> searchGroups(FlxGroupDataObject pGroupObject, Integer pLimit, Integer pOffset)
      Find Groups based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Groups matching search parameters.
      Specified by:
      searchGroups in interface IFlexDeployFunctions
      Parameters:
      pGroupObject - - FlxGroupDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Groups matching the search criteria.
      Since:
      6.5.0.5
    • getSnapshotDetails

      public RelSnapshotDataObject getSnapshotDetails(Long pSnapshotId)
      RETURN a release snapshot data object by id.
      Specified by:
      getSnapshotDetails in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - Id of the snapshot.
      Returns:
      A pojo contain the release snapshot data object and child data.
      Since:
      6.5.0.5
    • isBotUsername

      public boolean isBotUsername(String pUsername)
      Return whether a username (case-insensitive) is a FlexDeploy bot username and not a FlexDeploy user.
      Specified by:
      isBotUsername in interface IFlexDeployFunctions
      Parameters:
      pUsername -
      Returns:
      true if a FlexDeploy bot username
      Since:
      6.5.0.5
    • getUserById

      public FlxUserDataObject getUserById(Long pUserId)
      Returns User information along with the user attributes and group detail for a given user Id.
      Specified by:
      getUserById in interface IFlexDeployFunctions
      Parameters:
      pUserId - - User id of the User to retrieve.
      Returns:
      Object containing metadata about the given User.
      Throws:
      FlexRowNotFoundException - If User not found for given pUserId.
      Since:
      6.5.0.5
    • createUser

      public FlxUserDataObject createUser(FlxUserDataObject pUserDataObj)
      Create User with the provided data. Returns the User details along with the user attributes and group detail after creation.
      Specified by:
      createUser in interface IFlexDeployFunctions
      Parameters:
      pUserDataObj - - Object containing the User details to create the User.
      Returns:
      A data object of the User details.
      Since:
      6.5.0.5
    • patchUser

      public FlxUserDataObject patchUser(FlxUserDataObject pUserDataObject)
      Update User with the provided data. This will only update fields that are passed in the dataObject. Along with user detail user attributes and group can be updated.
      Specified by:
      patchUser in interface IFlexDeployFunctions
      Parameters:
      pUserDataObject - - Object containing the User details to update the User.
      Returns:
      A data object of the Group details.
      Throws:
      FlexRowNotFoundException - If no User is found for the given User details.
      Since:
      6.5.0.5
    • updateUser

      public FlxUserDataObject updateUser(FlxUserDataObject pUserDataObject)
      Update User based on the User details. Along with user detail user attributes and group can be updated.
      Specified by:
      updateUser in interface IFlexDeployFunctions
      Parameters:
      pUserDataObject - - Object containing the User details to update the User.
      Returns:
      A data object of the User details.
      Throws:
      FlexRowNotFoundException - If no User is found for the given User details.
      Since:
      6.5.0.5
    • searchUsers

      public <any> searchUsers(FlxUserDataObject pUserObject, Integer pLimit, Integer pOffset)
      Find Users based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Tasks matching search parameters.
      Specified by:
      searchUsers in interface IFlexDeployFunctions
      Parameters:
      pUserObject - - FlxUserDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Users matching the search criteria.
      Since:
      6.5.0.5
    • deleteFlxWorkItem

      public void deleteFlxWorkItem(Long pFlexWorkItemId)
      Deletes a FlexWorkItem
      Specified by:
      deleteFlxWorkItem in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemId - - the id of the FlexWorkItem
      Since:
      6.5.0.5
    • searchFlxWorkItems

      public <any> searchFlxWorkItems(FlxWorkItemDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find FlexWorkItems based provided search parameters and pagination input. Returns a PaginatedResponse containing list of FlexWorkItems matching search parameters.
      Specified by:
      searchFlxWorkItems in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - The FlxWorkItemDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of FlexWorkItems matching the search criteria.
      Since:
      6.5.0.5
    • getFlxWorkItemStatusWithId

      public FlxWorkItemStatusDataObject getFlxWorkItemStatusWithId(Long pFlexWorkItemStatusId)
      Finds FlexWorkItem Status using Id.
      Specified by:
      getFlxWorkItemStatusWithId in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemStatusId - - Id of FlexWorkItem Status to find.
      Returns:
      The FlexWorkItemStatus that was found
      Throws:
      FlexRowNotFoundException - if no row found for pFlexWorkItemStatusId.
    • searchFlxWorkItemStatuses

      public <any> searchFlxWorkItemStatuses(FlxWorkItemStatusDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find FlexWorkItem Statuses based provided search parameters and pagination input. Returns a PaginatedResponse containing list of FlexWorkItem Statuses matching search parameters.
      Specified by:
      searchFlxWorkItemStatuses in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - FlxWorkItemStatusDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of FlexWorkItem Statuses matching the search criteria.
      Since:
      6.5.0.5
    • getFlxWorkItemTypeWithCode

      public FlxWorkItemTypeDataObject getFlxWorkItemTypeWithCode(String pFlexWorkItemTypeCode)
      Finds FlexWorkItem Type using Code.
      Specified by:
      getFlxWorkItemTypeWithCode in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemTypeCode - - Code of FlexWorkItem Type to find.
      Returns:
      the FlexWorkItem Type that was found
      Throws:
      FlexRowNotFoundException - if no row found for pFlexWorkItemTypeCode.
    • searchFlxWorkItemTypes

      public <any> searchFlxWorkItemTypes(FlxWorkItemTypeDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find FlexWorkItem Types based provided search parameters and pagination input. Returns a PaginatedResponse containing list of FlexWorkItem Types matching search parameters.
      Specified by:
      searchFlxWorkItemTypes in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - FlexWorkItemTypeDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of FlexWorkItem Types matching the search criteria.
      Since:
      6.5.0.5
    • getFlxWorkItemFieldWithId

      public FlxWorkItemFieldDataObject getFlxWorkItemFieldWithId(Long pFlexWorkItemFieldId)
      Finds FlexWorkItem Field using Id.
      Specified by:
      getFlxWorkItemFieldWithId in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemFieldId - - Id of FlexWorkItem Field to find.
      Returns:
      the FlexWorkItem Field that was found
      Throws:
      FlexRowNotFoundException - if no row found for pFlexWorkItemFieldId.
    • searchFlxWorkItemFields

      public <any> searchFlxWorkItemFields(FlxWorkItemFieldDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find FlexWorkItem Fields based provided search parameters and pagination input. Returns a PaginatedResponse containing list of FlexWorkItem Fields matching search parameters.
      Specified by:
      searchFlxWorkItemFields in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - FlexWorkItemFieldDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of FlexWorkItem Fields matching the search criteria.
      Since:
      6.5.0.5
    • saveFlxWorkItemFields

      public List<FlxWorkItemFieldDataObject> saveFlxWorkItemFields(List<FlxWorkItemFieldDataObject> pPojos, String pGroupCode)
      Updates all FlexWorkItem Fields within a group. Anything in the pojos list will be added/updated, and anything not in this list that is in the group will be removed.
      Specified by:
      saveFlxWorkItemFields in interface IFlexDeployFunctions
      Parameters:
      pPojos - - The FlexWorkItem Fields to be saved
      pGroupCode - - The code of the group that is being saved to
      Returns:
      the saved fields
      Since:
      6.5.0.5
    • patchFlxWorkItemField

      public FlxWorkItemFieldDataObject patchFlxWorkItemField(FlxWorkItemFieldDataObject pPojo)
      Patches a FlexWorkItem Field with the provided data. This will only update fields that are passed in the pojo. This will patches like type, status, title, description and assignee.
      Specified by:
      patchFlxWorkItemField in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing FlexWorkItem Field details to update the FlexWorkItem Field.
      Returns:
      A simple pojo of FlexWorkItem Field details.
      Since:
      6.5.0.5
    • getFlxWorkItemFieldGroupWithCode

      public PropertyKeyGroupDataObject getFlxWorkItemFieldGroupWithCode(String pFlexWorkItemFieldGroupCode)
      Finds a FlexWorkItem Field Group using Code.
      Specified by:
      getFlxWorkItemFieldGroupWithCode in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemFieldGroupCode - - Code of FlexWorkItem Field Group to find.
      Returns:
      The FlexWorkItem Field Group that was found
      Throws:
      FlexRowNotFoundException - if no row found for pFlexWorkItemFieldGroupCode.
    • searchFlxWorkItemFieldGroups

      public <any> searchFlxWorkItemFieldGroups(PropertyKeyGroupDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find FlexWorkItem Field Groups based provided search parameters and pagination input. Returns a PaginatedResponse containing list of FlexWorkItem Field Groups matching search parameters.
      Specified by:
      searchFlxWorkItemFieldGroups in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - PropertyKeyGroupDataObject that is filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of FlexWorkItem Field Groups matching the search criteria.
      Since:
      6.5.0.5
    • createFlxWorkItemFieldGroup

      public PropertyKeyGroupDataObject createFlxWorkItemFieldGroup(PropertyKeyGroupDataObject pDobj)
      Creates a FlexWorkItem Field Group with the provided data. Returns the FlexWorkItem Field Group after creation.
      Specified by:
      createFlxWorkItemFieldGroup in interface IFlexDeployFunctions
      Parameters:
      pDobj - - the PropertyKeyDefinitionDataObject with the data to be added to the field group
      Returns:
      the field group that was added
      Since:
      6.5.0.5
    • updateFlxWorkItemFieldGroup

      public PropertyKeyGroupDataObject updateFlxWorkItemFieldGroup(PropertyKeyGroupDataObject pDobj)
      Updates FlexWorkItem field group based on the FlexWorkItem field group details.
      Specified by:
      updateFlxWorkItemFieldGroup in interface IFlexDeployFunctions
      Parameters:
      pDobj - Object containing FlexWorkItem Field Group details to update the FlexWorkItem Field Group.
      Returns:
      the state of the FlexWorkItem Field Group after being updated
      Since:
      6.5.0.5
    • patchFlxWorkItemFieldGroup

      public PropertyKeyGroupDataObject patchFlxWorkItemFieldGroup(PropertyKeyGroupDataObject pPojo)
      Patches a FlexWorkItem Field Group with the provided data. Only modifies fields that are not null. Returns the FlexWorkItem Field Group after the patch.
      Specified by:
      patchFlxWorkItemFieldGroup in interface IFlexDeployFunctions
      Parameters:
      pPojo - - the data to use to patch the FlexWorkItem Field Group with
      Returns:
      The patched FlexWorkItem Field Group
      Since:
      6.5.0.5
    • deleteFlxWorkItemFieldGroup

      public void deleteFlxWorkItemFieldGroup(String pFlexWorkItemFieldGroupCode)
      Deletes a FlexWorkItem Field Group
      Specified by:
      deleteFlxWorkItemFieldGroup in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemFieldGroupCode - - the code of the FlexWorkItem Field Group
      Since:
      6.5.0.5
    • createFlxWorkItemField

      public FlxWorkItemFieldDataObject createFlxWorkItemField(FlxWorkItemFieldDataObject pDobj)
      Creates a FlexWorkItem Field with the provided data. Returns the created FlexWorkItem Field.
      Specified by:
      createFlxWorkItemField in interface IFlexDeployFunctions
      Parameters:
      pDobj - - an object containing the FlexWorkItem Field information
      Returns:
      the created FlexWorkItem Field
      Since:
      6.5.0.5
    • updateFlxWorkItemField

      public FlxWorkItemFieldDataObject updateFlxWorkItemField(FlxWorkItemFieldDataObject pDobj)
      Updates FlexWorkItem field based on the FlexWorkItem field details.
      Specified by:
      updateFlxWorkItemField in interface IFlexDeployFunctions
      Parameters:
      pDobj - Object containing FlexWorkItem Field details to update the FlexWorkItem Field.
      Returns:
      the state of the FlexWorkItem Field after being updated
      Since:
      6.5.0.5
    • deleteFlxWorkItemField

      public void deleteFlxWorkItemField(Long pFlexWorkItemFieldId)
      Deletes a FlexWorkItem Field
      Specified by:
      deleteFlxWorkItemField in interface IFlexDeployFunctions
      Parameters:
      pFlexWorkItemFieldId - - The id of the FlexWorkItem Field to delete
      Since:
      6.5.0.5
    • createPropertyKeyDefinition

      public PropertyKeyDefinitionDataObject createPropertyKeyDefinition(PropertyKeyDefinitionDataObject pPojo)
      Creates a property key definition with the provided data.
      Specified by:
      createPropertyKeyDefinition in interface IFlexDeployFunctions
      Parameters:
      pPojo - - Object containing property key definition information.
      Returns:
      PropertyKeyDefinitionDataObject representing the created property key definition.
      Since:
      6.5.0.5
    • updatePropertyKeyDefinition

      public PropertyKeyDefinitionDataObject updatePropertyKeyDefinition(PropertyKeyDefinitionDataObject pPojo)
      Updates a property key definition with the provided data.
      Specified by:
      updatePropertyKeyDefinition in interface IFlexDeployFunctions
      Parameters:
      pPojo - - Object containing property key definition information.
      Returns:
      PropertyKeyDefinitionDataObject representing the updated property key definition.
      Throws:
      FlexRowNotFoundException - If no property key is found for the given details.
      Since:
      6.5.0.5
    • patchPropertyKeyDefinition

      public PropertyKeyDefinitionDataObject patchPropertyKeyDefinition(PropertyKeyDefinitionDataObject pPojo)
      updates a property key definition with the provided data. This will only update fields that are passed in the pojo.
      Specified by:
      patchPropertyKeyDefinition in interface IFlexDeployFunctions
      Parameters:
      pPojo - containing property key definition information.
      Returns:
      PropertyKeyDefinitionDataObject representing the patched property key definition.
      Throws:
      FlexRowNotFoundException - If no property key is found for the given details.
      Since:
      6.5.0.5
    • getPropertyKeyDefinition

      public PropertyKeyDefinitionDataObject getPropertyKeyDefinition(Long pPropertyKeyDefinitionId)
      Retrieves a property key definition by its ID.
      Specified by:
      getPropertyKeyDefinition in interface IFlexDeployFunctions
      Parameters:
      pPropertyKeyDefinitionId - - ID of the property key definition to retrieve.
      Returns:
      PropertyKeyDefinitionDataObject representing the retrieved property key definition.
      Throws:
      FlexRowNotFoundException - If propkey not found for given pPropertyKeyDefinitionId
    • searchPropertyKeyDefinitions

      public <any> searchPropertyKeyDefinitions(PropertyKeyDefinitionDataObject pSearchParams, Integer pLimit, Integer pOffset)
      Find property key definitions based provided search parameters and pagination input. Returns a PaginatedResponse containing list of property key definitions matching search parameters.
      Specified by:
      searchPropertyKeyDefinitions in interface IFlexDeployFunctions
      Parameters:
      pSearchParams - - Object containing the search parameters for property key definitions.
      pLimit - Limit for the number of rows to be returned.
      pOffset - offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of property key definitions matching the search criteria.
      Since:
      6.5.0.5
    • getPropertyKeyDefinition

      public PropertyKeyDefinitionDataObject getPropertyKeyDefinition(String pKeyName)
      Retrieves a property key definition by its key name.
      Specified by:
      getPropertyKeyDefinition in interface IFlexDeployFunctions
      Parameters:
      pKeyName - - Name of the property key definition to retrieve.
      Returns:
      PropertyKeyDefinitionDataObject representing the retrieved property key definition.
      Throws:
      FlexRowNotFoundException - If propkey not found for the given pKeyName.
    • updateWorkflowPropertySet

      public PropertySetDataObject updateWorkflowPropertySet(PropertySetDataObject pPropertySet)
      Updates a property set with the provided data.
      Specified by:
      updateWorkflowPropertySet in interface IFlexDeployFunctions
      Parameters:
      pPropertySet - - Object containing property set information.
      Returns:
      PropertySetDataObject representing the updated property set.
      Throws:
      FlexRowNotFoundException - If no property set is found for the given details.
      Since:
      6.5.0.5
    • searchPropertySets

      public <any> searchPropertySets(PropertySetDataObject pSearchParams, Integer pLimit, Integer pOffset)
      Find property sets based provided search parameters and pagination input. Returns a PaginatedResponse containing list of property sets matching search parameters.
      Specified by:
      searchPropertySets in interface IFlexDeployFunctions
      Parameters:
      pSearchParams - - Object containing the search parameters for property sets.
      pLimit - Limit for the number of rows to be returned.
      pOffset - offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of property sets matching the search criteria.
      Since:
      6.5.0.5
    • getPropertySet

      public PropertySetDataObject getPropertySet(Long pPropertySetId)
      Retrieves a property set by its ID.
      Specified by:
      getPropertySet in interface IFlexDeployFunctions
      Parameters:
      pPropertySetId - - ID of the property set to retrieve.
      Returns:
      PropertySetDataObject representing the retrieved property set.
      Throws:
      FlexRowNotFoundException - If propSet not found for given pPropertySetId
    • getCredentialById

      public CredentialDataObject getCredentialById(Long pCredentialId)
      Returns Credential information for a given Credential Id.
      Specified by:
      getCredentialById in interface IFlexDeployFunctions
      Parameters:
      pCredentialId - - Credential id of the Credential to retrieve.
      Returns:
      Object containing metadata about the given Credential.
      Throws:
      FlexRowNotFoundException - If Credential not found for given pCredentialId.
      Since:
      6.5.0.5
    • createCredential

      public CredentialDataObject createCredential(CredentialDataObject pCredentialDataObject)
      Create Credential with the provided data. Returns the Credential details after creation.
      Specified by:
      createCredential in interface IFlexDeployFunctions
      Parameters:
      pCredentialDataObject - - Object containing the Credential details to create the Credential.
      Returns:
      A data object of the Credential details.
      Since:
      6.5.0.5
    • patchCredential

      public CredentialDataObject patchCredential(CredentialDataObject pCredentialDataObject)
      Update Credential with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchCredential in interface IFlexDeployFunctions
      Parameters:
      pCredentialDataObject - - Object containing the Credential details to update the Credential.
      Returns:
      A data object of Credential details.
      Throws:
      FlexRowNotFoundException - If no Credential is found for the given Credential details.
      Since:
      6.5.0.5
    • updateCredential

      public CredentialDataObject updateCredential(CredentialDataObject pCredentialDataObject)
      Update Credential with the provided data.
      Specified by:
      updateCredential in interface IFlexDeployFunctions
      Parameters:
      pCredentialDataObject - - Object containing the Credential details to update the Credential.
      Returns:
      A data object of Credential details.
      Throws:
      FlexRowNotFoundException - If no Credential is found for the given Credential details.
      Since:
      6.5.0.5
    • searchCredentials

      public <any> searchCredentials(CredentialDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find Credentials based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Credentials matching search parameters.
      Specified by:
      searchCredentials in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - CredentialDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of Credentials matching the search criteria.
      Since:
      6.5.0.5
    • getCredentialByName

      public CredentialDataObject getCredentialByName(String pCredentialName)
      Returns Credential information for a given Credential name.
      Specified by:
      getCredentialByName in interface IFlexDeployFunctions
      Parameters:
      pCredentialName - - Credential id of the Credential to retrieve.
      Returns:
      Object containing metadata about the given Credential.
      Throws:
      FlexRowNotFoundException - If Credential not found for given pCredentialName.
      Since:
      6.5.0.5
    • getCredentialSecretTextById

      public String getCredentialSecretTextById(Long pCredentialId) throws FlexCheckedException
      Returns the secret text value for a given Credential name. Credential must be of type SECRET TEXT
      Specified by:
      getCredentialSecretTextById in interface IFlexDeployFunctions
      Parameters:
      pCredentialId - - Credential id of the value to retrieve.
      Returns:
      the secret text value of the given credential id.
      Throws:
      FlexCheckedException
    • getCredentialSecretTextByName

      public String getCredentialSecretTextByName(String pCredentialName) throws FlexCheckedException
      Returns the secret text value for a given Credential name. Credential must be of type SECRET TEXT
      Specified by:
      getCredentialSecretTextByName in interface IFlexDeployFunctions
      Parameters:
      pCredentialName - - Credential Name of the value to retrieve.
      Returns:
      the secret text value of the given name.
      Throws:
      FlexCheckedException
    • getCredentialValueById

      public CredentialValuePojo getCredentialValueById(Long pCredentialId) throws FlexCheckedException
      Returns the plaintext value for a given Credential id.
      Specified by:
      getCredentialValueById in interface IFlexDeployFunctions
      Parameters:
      pCredentialId - - Credential id of the value to retrieve
      Returns:
      Object containing the secret values based on credential type. (E.g CredentialSecretTextValuePojo, CredentialSshKeyValuePojo, CredentialCertificateValuePojo).
      Throws:
      FlexCheckedException
    • getCredentialValueByName

      public CredentialValuePojo getCredentialValueByName(String pCredentialName) throws FlexCheckedException
      Returns the plaintext value for a given Credential id.
      Specified by:
      getCredentialValueByName in interface IFlexDeployFunctions
      Parameters:
      pCredentialName - - Credential name of the value to retrieve
      Returns:
      Object containing the secret values based on credential type. (E.g CredentialSecretTextValuePojo, CredentialSshKeyValuePojo, CredentialCertificateValuePojo).
      Throws:
      FlexCheckedException
    • createEnvironment

      public EnvironmentDataObject createEnvironment(EnvironmentDataObject pEnvDataObject)
      Create Environment with the provided data. Returns the Environment details after creation.
      Specified by:
      createEnvironment in interface IFlexDeployFunctions
      Parameters:
      pEnvDataObject - - Object containing the Environment details to create the Environment.
      Returns:
      A data object of the Environment details.
      Since:
      6.5.0.5
    • patchEnvironment

      public EnvironmentDataObject patchEnvironment(EnvironmentDataObject pEnvDataObject)
      Update Environment with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchEnvironment in interface IFlexDeployFunctions
      Parameters:
      pEnvDataObject - - Object containing the Environment details to update the Environment.
      Returns:
      A data object of Environment details.
      Throws:
      FlexRowNotFoundException - If no Environment is found for the given Environment details.
      Since:
      6.5.0.5
    • updateEnvironment

      public EnvironmentDataObject updateEnvironment(EnvironmentDataObject pEnvDataObject)
      Update Environment based on the Environment details.
      Specified by:
      updateEnvironment in interface IFlexDeployFunctions
      Parameters:
      pEnvDataObject - - Object containing the Environment details to update the Environment.
      Returns:
      A data object of Environment details.
      Throws:
      FlexRowNotFoundException - If no Environment is found for the given Environment details.
      Since:
      6.5.0.5
    • deleteEnvironment

      public void deleteEnvironment(Long pEnvironmentId)
      Deletes an Environment.
      Specified by:
      deleteEnvironment in interface IFlexDeployFunctions
      Parameters:
      pEnvironmentId - - the id of the Environment.
      Since:
      6.5.0.5
    • deleteEndpoint

      public void deleteEndpoint(Long pEndpointId)
      Deletes an Endpoint.
      Specified by:
      deleteEndpoint in interface IFlexDeployFunctions
      Parameters:
      pEndpointId - - the id of the Endpoint.
      Since:
      6.5.0.5
    • deleteCredential

      public void deleteCredential(Long pCredentialId)
      Deletes a Credential.
      Specified by:
      deleteCredential in interface IFlexDeployFunctions
      Parameters:
      pCredentialId - - the id of the Credential. No error is thrown if the credential is not found.
      Since:
      6.5.0.5
    • createTargetGroup

      public TargetGroupDataObject createTargetGroup(TargetGroupDataObject pTargetGroupDataObj)
      Create TargetGroup with the provided data. Returns the TargetGroup details after creation.
      Specified by:
      createTargetGroup in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupDataObj - - Object containing the TargetGroup details to create the TargetGroup.
      Returns:
      A data object of the TargetGroup details.
      Since:
      6.5.0.5
    • patchTargetGroup

      public TargetGroupDataObject patchTargetGroup(TargetGroupDataObject pTargetGroupDataObj) throws FlexRowNotFoundException
      Update TargetGroup with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchTargetGroup in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupDataObj - - Object containing the TargetGroup details to update the TargetGroup.
      Returns:
      A data object of the TargetGroup details.
      Throws:
      FlexRowNotFoundException - If no TargetGroup is found for the given TargetGroup details.
      Since:
      6.5.0.5
    • updateTargetGroup

      public TargetGroupDataObject updateTargetGroup(TargetGroupDataObject pTargetGroupDataObj) throws FlexRowNotFoundException
      Update TargetGroup based on the TargetGroup details.
      Specified by:
      updateTargetGroup in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupDataObj - - Object containing the TargetGroup details to update the TargetGroup.
      Returns:
      A data object of the TargetGroup details.
      Throws:
      FlexRowNotFoundException - If no TargetGroup is found for the given TargetGroup details.
      Since:
      6.5.0.5
    • deleteTargetGroup

      public void deleteTargetGroup(Long pTargetGroupId)
      Deletes a TargetGroup.
      Specified by:
      deleteTargetGroup in interface IFlexDeployFunctions
      Parameters:
      pTargetGroupId - - the id of the TargetGroup. No error is thrown if the target group does not exist.
      Since:
      6.5.0.5
    • assignGroupToUser

      public void assignGroupToUser(Long pGroupId, Long pUserId) throws FlexRowNotFoundException
      Assigns Group to User with the provided data.
      Specified by:
      assignGroupToUser in interface IFlexDeployFunctions
      Parameters:
      pGroupId - - Id of the Group that has to be assigned to the user.
      pUserId - - Id of the User to which Group has be assigned.
      Throws:
      FlexRowNotFoundException - If no Group or User is found for the given ids.
      Since:
      6.5.0.6
    • unassignGroupFromUser

      public void unassignGroupFromUser(Long pGroupId, Long pUserId) throws FlexRowNotFoundException
      Unassigns Group from User with the provided data.
      Specified by:
      unassignGroupFromUser in interface IFlexDeployFunctions
      Parameters:
      pGroupId - - Id of the Group that has to be unassigned from the user.
      pUserId - - Id of the User from which Group has be unassigned.
      Throws:
      FlexRowNotFoundException - If no Group or User is found for the given details.
      Since:
      6.5.0.6
    • assignGroupToUser

      public void assignGroupToUser(String pGroupName, String pUserName) throws FlexValidationException
      Assigns Group to User with the provided data.
      Specified by:
      assignGroupToUser in interface IFlexDeployFunctions
      Parameters:
      pGroupName - - Name of the Group that has to be assigned to the user.
      pUserName - - Name of the User to which Group has be assigned.
      Throws:
      FlexValidationException - If no Group or User is found for the given details.
      Since:
      6.5.0.6
    • unassignGroupFromUser

      public void unassignGroupFromUser(String pGroupName, String pUserName) throws FlexValidationException
      Unassigns Group from User with the provided data.
      Specified by:
      unassignGroupFromUser in interface IFlexDeployFunctions
      Parameters:
      pGroupName - - Name of the Group that has to be unassigned from the user.
      pUserName - - Name of the User from which Group has be unassigned.
      Throws:
      FlexValidationException - If no Group or User is found for the given details.
      Since:
      6.5.0.6
    • createFolder

      public FolderDataObject createFolder(FolderDataObject pFolderDataObject)
      Create Folder with the provided data. Returns the Folder details after creation.
      Specified by:
      createFolder in interface IFlexDeployFunctions
      Parameters:
      pFolderDataObject - - Object containing the Folder details to create the Folder.
      Returns:
      A data object of the Folder details.
      Since:
      6.5.0.6
    • patchFolder

      public FolderDataObject patchFolder(FolderDataObject pFolderDataObject) throws FlexRowNotFoundException
      Update Folder with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchFolder in interface IFlexDeployFunctions
      Parameters:
      pFolderDataObject - - Object containing the Folder details to update the Folder.
      Returns:
      A data object of Folder details.
      Throws:
      FlexRowNotFoundException - If no Folder is found for the given Folder details.
      Since:
      6.5.0.6
    • updateFolder

      public FolderDataObject updateFolder(FolderDataObject pFolderDataObject) throws FlexRowNotFoundException
      Update Folder based on the Folder details.
      Specified by:
      updateFolder in interface IFlexDeployFunctions
      Parameters:
      pFolderDataObject - - Object containing the Folder details to update the Folder.
      Returns:
      A data object of Folder details.
      Throws:
      FlexRowNotFoundException - If no Folder is found for the given Folder details.
      Since:
      6.5.0.6
    • deleteFolder

      public void deleteFolder(Long pFolderId)
      Deletes a Folder.
      Specified by:
      deleteFolder in interface IFlexDeployFunctions
      Parameters:
      pFolderId - - the id of the Folder.
      Since:
      6.5.0.6
    • findReleases

      public List<ReleasePojo> findReleases(String pName) throws FlexRowNotFoundException
      Finds Releases matching the specified name. Search uses an ignore case and contains on the Release Name. Unlike getRelease this method returns a list of Releases.
      Specified by:
      findReleases in interface IFlexDeployFunctions
      Parameters:
      pName - Name to search by
      Returns:
      A List of Release objects containing Release information.
      Throws:
      FlexRowNotFoundException - if no releases match the naming criteria pName
      Since:
      5.3.0.1
    • findReleases

      public List<ReleasePojo> findReleases(String pName, Integer pLimit, Integer pOffset) throws FlexRowNotFoundException
      Finds Releases matching the specified name. Search uses an ignore case and contains on the Release Name. Unlike getRelease this method returns a list of Releases.
      Specified by:
      findReleases in interface IFlexDeployFunctions
      Parameters:
      pName - Name to search by
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      A List of Release objects containing Release information.
      Throws:
      FlexRowNotFoundException - if no releases match the naming criteria pName
      Since:
      5.3.0.1
    • getRelease

      public ReleasePojo getRelease(Long pId) throws FlexRowNotFoundException
      Gets a release by a specific id.
      Specified by:
      getRelease in interface IFlexDeployFunctions
      Parameters:
      pId - Release Id
      Returns:
      Object containing Release metadata
      Throws:
      FlexRowNotFoundException - if no Release is found for the given pId
      Since:
      5.3.0.1
    • patchWorkItemComment

      public FdCommentDataObject patchWorkItemComment(String pCommentId, String pComment)
      Update a WorkItem comment with the provided data.
      Specified by:
      patchWorkItemComment in interface IFlexDeployFunctions
      Parameters:
      pCommentId - - WorkItem comment id.
      pComment - - WorkItem comment.
      Returns:
      A simple pojo of FlexWorkItem comment details.
      Since:
      6.5.0.6
    • createRelease

      public Long createRelease(Long pFolderId, String pReleaseName, String pPipelineName, String pDescription, String pCronSchedule)
      Create an empty scheduled FlexDeploy Release that defaults to 'STARTED' status.
      Specified by:
      createRelease in interface IFlexDeployFunctions
      Parameters:
      pFolderId - Folder location for the Release.
      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.
      Returns:
      Release id
      Throws:
      FlexValidationException - when creation of release gets failed.
    • updateRelease

      public RelDefinitionDataObject updateRelease(RelDefinitionDataObject pReleasePojo) throws FlexRowNotFoundException
      Updates a Release with the provided data.
      Specified by:
      updateRelease in interface IFlexDeployFunctions
      Parameters:
      pReleasePojo - - Object containing release information.
      Returns:
      Object of the updated Release
      Throws:
      FlexRowNotFoundException - if no release is found for the given release details.
    • patchRelease

      public RelDefinitionDataObject patchRelease(RelDefinitionDataObject pReleasePojo) throws FlexRowNotFoundException
      Updates a release with the provided data. This will only update fields that are passed in the pojo. Returns the release after updating.
      Specified by:
      patchRelease in interface IFlexDeployFunctions
      Parameters:
      pReleasePojo - - Object containing release information.
      Returns:
      Object of the updated Release
      Throws:
      FlexRowNotFoundException - if no release is found for the given release details.
    • createRelease

      public Long createRelease(String pReleaseName, String pPipelineName, String pDescription, String pCronSchedule)
      Create an empty scheduled FlexDeploy Release that defaults to 'STARTED' status.
      Specified by:
      createRelease in interface IFlexDeployFunctions
      Parameters:
      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.
      Returns:
      Release id
      Throws:
      FlexValidationException - when creation of release gets failed.
    • createRelease

      public Long createRelease(String pReleaseName, String pPipelineName, String pDescription)
      Create an empty FlexDeploy Release that defaults to 'STARTED' status.
      Specified by:
      createRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Name to give Release.
      pPipelineName - Pipeline name to use for the Release.
      pDescription - Optional description to give the Release.
      Returns:
      Release id
      Throws:
      FlexValidationException - when creation of release gets failed.
    • endRelease

      public void endRelease(String pReleaseName)
      End a FlexDeploy Release.
      Specified by:
      endRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Release name to end.
    • endRelease

      public void endRelease(Long pReleaseId)
      End a FlexDeploy Release.
      Specified by:
      endRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - Release id to end.
    • forceEndRelease

      public void forceEndRelease(Long pReleaseId)
      Force a FlexDeploy Release to end.
      Specified by:
      forceEndRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - Release id to end.
    • forceEndRelease

      public void forceEndRelease(String pReleaseName) throws FlexRowNotFoundException
      Force a FlexDeploy Release to end.
      Specified by:
      forceEndRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Release name to end.
      Throws:
      FlexRowNotFoundException - if Release is not found
    • pauseRelease

      public void pauseRelease(String pReleaseName) throws FlexRowNotFoundException
      Pause a FlexDeploy Release.
      Specified by:
      pauseRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Release name to pause.
      Throws:
      FlexRowNotFoundException - if Release is not found
      Since:
      5.3.0.2
    • pauseRelease

      public void pauseRelease(Long pReleaseId) throws FlexRowNotFoundException
      Pause a FlexDeploy Release.
      Specified by:
      pauseRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - Release id to pause.
      Throws:
      FlexRowNotFoundException - if Release is not found
      Since:
      5.3.0.2
    • startRelease

      public void startRelease(String pReleaseName) throws FlexRowNotFoundException
      Start a FlexDeploy Release.
      Specified by:
      startRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Release name to start.
      Throws:
      FlexRowNotFoundException - if Release is not found
    • startRelease

      public void startRelease(Long pReleaseId) throws FlexRowNotFoundException
      Start a FlexDeploy Release.
      Specified by:
      startRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - Release id to start.
      Throws:
      FlexRowNotFoundException - if Release is not found
    • addProjectsToRelease

      public void addProjectsToRelease(String pReleaseName, List<ReleaseProjectsPojo> pReleaseProjects) throws FlexRowNotFoundException
      Add FlexDeploy projects to a given release. If project already exists in Release then it will be updated. Project Groups (CSV String) on input pojo is Project Group Name.
      Specified by:
      addProjectsToRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Release name to add projects to.
      pReleaseProjects - List of ReleaseProjects to add.
      Throws:
      FlexRowNotFoundException - if Release is not found
    • removeProjectsFromRelease

      public void removeProjectsFromRelease(String pReleaseName, List<ReleaseProjectsPojo> pReleaseProjects) throws FlexRowNotFoundException
      Remove FlexDeploy projects from a given release.
      Specified by:
      removeProjectsFromRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseName - Release name to remove projects from.
      pReleaseProjects - List of ReleaseProjects to remove.
      Throws:
      FlexRowNotFoundException - if Release is not found
    • updateReleaseProperty

      public void updateReleaseProperty(Long pReleaseDefId, String pPropertyKeyCode, Serializable pNewValue) throws FlexRowNotFoundException
      Updates a release's property with the provided property key code.
      Specified by:
      updateReleaseProperty in interface IFlexDeployFunctions
      Parameters:
      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.
      Throws:
      FlexRowNotFoundException
      Since:
      5.7.0.3
    • getReleaseProjectInfo

      @Deprecated public List<ReleaseProjectDetailsPojo> getReleaseProjectInfo(Long pReleaseDefId) throws FlexRowNotFoundException
      Deprecated.
      Gets release project info based on the release definition Id. Returns basic project info for the release with given Id.
      Specified by:
      getReleaseProjectInfo in interface IFlexDeployFunctions
      Parameters:
      pReleaseDefId - Release Definition Id.
      Returns:
      All Projects associated to the release.
      Throws:
      FlexRowNotFoundException
      Since:
      5.4
    • getReleaseProjects

      public List<RelProjectDataObject> getReleaseProjects(Long pRelDefinitionId)
      Specified by:
      getReleaseProjects in interface IFlexDeployFunctions
    • approveTask

      public void approveTask(String pUsername, String pTaskIdentifier, String pNotes)
      Approve a FlexDeploy Task. Approval, scheduled or human tasks are all compatible. When using this function the execution will run as the username that is passed. Due to this, precaution should be taken to be sure that only relevant users have access to edit the use of this method and/or view webhook payloads which contain the task identifier.
      Specified by:
      approveTask in interface IFlexDeployFunctions
      Parameters:
      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.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to approve it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
    • rejectTask

      public void rejectTask(String pUsername, String pTaskIdentifier, String pNotes)
      Reject a FlexDeploy Task. Approval, scheduled or human tasks are all compatible. When using this function the execution will run as the username that is passed. Due to this, precaution should be taken to be sure that only relevant users have access to edit the use of this method.
      Specified by:
      rejectTask in interface IFlexDeployFunctions
      Parameters:
      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.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to reject it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
    • completeManualStepByTaskId

      public void completeManualStepByTaskId(String pUsername, Long pTaskId)
      Approve a manual step Human task. Execution will run as the username that is passed.
      Specified by:
      completeManualStepByTaskId in interface IFlexDeployFunctions
      Parameters:
      pUsername - - Username to complete the task as.
      pTaskId - - Task ID of the human task/manual step to approve.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to approve it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
      Since:
      5.7.0.4
    • rejectManualStepByTaskId

      public void rejectManualStepByTaskId(String pUsername, Long pTaskId)
      Reject a manual step Human task. Execution will run as the username that is passed.
      Specified by:
      rejectManualStepByTaskId in interface IFlexDeployFunctions
      Parameters:
      pUsername - - Username to complete the task as.
      pTaskId - - Task ID of the human task/manual step to reject.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to reject it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
      Since:
      7.0.0.0
    • completeManualStepBySnapshotId

      public void completeManualStepBySnapshotId(String pUsername, Long pSnapshotId)
      Approve a manual step Human task. Execution will run as the username that is passed.
      Specified by:
      completeManualStepBySnapshotId in interface IFlexDeployFunctions
      Parameters:
      pUsername - - Username to approve the task as.
      pSnapshotId - - Snapshot Id which has a manual step waiting to be approved.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to approve it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
      Since:
      5.7.0.4
    • rejectManualStepBySnapshotId

      public void rejectManualStepBySnapshotId(String pUsername, Long pSnapshotId)
      Reject a manual step Human task. Execution will run as the username that is passed.
      Specified by:
      rejectManualStepBySnapshotId in interface IFlexDeployFunctions
      Parameters:
      pUsername - - Username to reject the task as.
      pSnapshotId - - Snapshot Id which has a manual step waiting to be rejected.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to reject it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
      Since:
      7.0.0.0
    • getUsersFromRoleId

      public List<FDUser> getUsersFromRoleId(Long pRoleId)
      Gets a list of the users that are members of the pipeline role with the specified role Id.
      Specified by:
      getUsersFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      Returns:
      List of FDUser objects.
      Since:
      5.4.0.0
    • getUsersFromRoleId

      public List<FDUser> getUsersFromRoleId(Long pRoleId, Long pRelDefId)
      Gets a list of the users that are members of the pipeline role with the specified role id and release definition id to get Users overridden at the release.
      Specified by:
      getUsersFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      pRelDefId - Release definition id.
      Returns:
      List of FDUser objects.
      Since:
      7.0.0.0
    • getGroupsFromRoleId

      public List<FlxGroupDataObject> getGroupsFromRoleId(Long pRoleId)
      Gets a list of the Groups that are members of the pipeline role with the specified role Id.
      Specified by:
      getGroupsFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      Returns:
      List of FDGroup objects.
      Since:
      7.0.0.0
    • getGroupsFromRoleId

      public List<FlxGroupDataObject> getGroupsFromRoleId(Long pRoleId, Long pRelDefId)
      Gets a list of the Groups that are members of the pipeline role with the specified role id and release definition id to get Groups overridden at the release.
      Specified by:
      getGroupsFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      pRelDefId - Release definition id..
      Returns:
      List of FDGroup objects.
      Since:
      7.0.0.0
    • updateSnapshotVariable

      public Long updateSnapshotVariable(Long pSnapshotId, String pVariableCode, Serializable pNewValue)
      Updates a snapshot's variable with the provided variable code.
      Specified by:
      updateSnapshotVariable in interface IFlexDeployFunctions
      Parameters:
      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 that the variable will be updated to.
      Returns:
      - The Id of the snapshot that has had its variable updated.
      Throws:
      FlexValidationException
      Since:
      7.0.0.0
    • getWorkItemStatus

      public String getWorkItemStatus(WorkItemDataObject pWorkItem)
      Gets WorkItem Status.
      Specified by:
      getWorkItemStatus in interface IFlexDeployFunctions
      Parameters:
      pWorkItem - Object.
      Returns:
      WorkItem Status.
      Since:
      7.0.0.0
    • createSnapshot

      public Long createSnapshot(Long pReleaseId)
      Create a Snapshot for a given Release. The Release must be in state 'STARTED' before a snapshot can be created.
      Specified by:
      createSnapshot in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - Release to create the snapshot for.
      Returns:
      Snapshot id
      Throws:
      FlexValidationException - when failing to submit snapshot.
      FlexCheckedException
    • downloadSnapshotCommitDetails

      public void downloadSnapshotCommitDetails(Long pSnapshotId, String pDestinationPath)
      Gets the commit details of a snapshot and downloads a csv file to the destination path. File name will be SNAPSHOTID_SNAPSHOTNAME. SNAPSHOTNAME will have the time section removed in the file name.
      Specified by:
      downloadSnapshotCommitDetails in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - - Id of the snapshot whose commit details will be returned.
      pDestinationPath - - Path where the csv will be downloaded.
      Throws:
      FlexValidationException - if pDestinationPath is not provided.
      Since:
      5.4.0.1
    • getSnapshotCommitDetailInputStreams

      public InputStream getSnapshotCommitDetailInputStreams(Long pSnapshotId)
      Gets the commit details of a snapshot and returns an input stream of the data.
      Specified by:
      getSnapshotCommitDetailInputStreams in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - - Id of the snapshot which details will be returned
      Returns:
      List of Input streams of the snapshot content details.
      Since:
      5.4.0.1
    • getSnapshotCommitDetails

      public List<ReleaseSnapshotCommitDetailsPojo> getSnapshotCommitDetails(Long pSnapshotId)
      Gets the commit details of a snapshot and returns an object with the data.
      Specified by:
      getSnapshotCommitDetails in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - - Id of the snapshot whose commit details will be returned.
      Returns:
      List of objects for each row of release snapshot content table for snapshot Id provided.
    • getPipelineStageExecutionInfo

      public StageExecutionInformation getPipelineStageExecutionInfo(Long pStageExecId)
      Gets pipeline stage execution info based on the stage exec Id given.
      Specified by:
      getPipelineStageExecutionInfo in interface IFlexDeployFunctions
      Parameters:
      pStageExecId - Pipeline Stage Execution Id.
      Returns:
      Stage Execution Info.
      Since:
      5.4
    • getPipelineStepProjectsExecution

      public StepProjectsRequestPojo getPipelineStepProjectsExecution(Long pStageExecId, Long pStepId)
      Get the project request and execution statuses for a given pipeline step execution
      Specified by:
      getPipelineStepProjectsExecution in interface IFlexDeployFunctions
      Parameters:
      pStageExecId - The pipeline stage execution id
      pStepId - The pipeline stage step id to get results for.
      Returns:
      An object containing step execution information and project requests
      Since:
      5.5.0.2
    • getPipelineStepProjectsExecution

      public StepProjectsRequestPojo getPipelineStepProjectsExecution(Long pStageExecId, String pStepName)
      Get the project request and execution statuses for a given pipeline step execution
      Specified by:
      getPipelineStepProjectsExecution in interface IFlexDeployFunctions
      Parameters:
      pStageExecId - The pipeline stage execution id
      pStepName - The pipeline stage step name to get results for.
      Returns:
      An object containing step execution information and project requests
      Since:
      5.5.0.2
    • getBuildWorkflowExecutionsFromProjectVersionIds

      public List<WorkflowExecutionDataObject> getBuildWorkflowExecutionsFromProjectVersionIds(List<Long> pProjectVersionIds)
      Get the build workflow execution details for given project version id(s)
      Specified by:
      getBuildWorkflowExecutionsFromProjectVersionIds in interface IFlexDeployFunctions
      Parameters:
      pProjectVersionIds - Project version ID(s)
      Returns:
      A list of build workflow execution details for given project version id(s)
      Since:
      7.0.0.0
    • assignTag

      public TagAssignmentDataObject assignTag(FlexDeploySecurityConstants.SecurityObjectType pObjectType, Long pObjectId, String pTagName)
      Assigns tag to the object with the provided data.
      Specified by:
      assignTag in interface IFlexDeployFunctions
      Parameters:
      pObjectType - - Type of the object to which the tag has to be assigned.
      pObjectId - - Id of the object to which the tag has to be assigned.
      pTagName - - Name of the tag that has to be assigned.
      Returns:
      A data object of the tag assignment details.
      Since:
      7.0.0.0
    • unassignTag

      public void unassignTag(FlexDeploySecurityConstants.SecurityObjectType pObjectType, Long pObjectId, String pTagName)
      Unassigns tag from the object with the provided data.
      Specified by:
      unassignTag in interface IFlexDeployFunctions
      Parameters:
      pObjectType - - Type of the object from which the tag has to be unassigned.
      pObjectId - - Id of the object from which the tag has to be unassigned.
      pTagName - - Name of the tag that has to be unassigned.
      Since:
      7.0.0.0
    • createSnapshot

      public Long createSnapshot(Long pReleaseId, List<SnapshotVersionInputPojo> pVersions, List<CodeValueInputPOJO> pInputs)
      Create a Snapshot for a given Release, Versions, Inputs. The Release must be in state 'STARTED' before a snapshot can be created.
      Specified by:
      createSnapshot in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - Release to create the snapshot for.
      pVersions - Project version details to set while creating the snapshot.
      pInputs - Inputs to provide while creating the snapshot.
      Returns:
      Snapshot id.
    • getEmailAddressesFromRoleId

      public List<String> getEmailAddressesFromRoleId(Long pRoleId)
      Gets a list of email addresses that are members of the pipeline role with the specified role Id.
      Specified by:
      getEmailAddressesFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      Returns:
      A list of email addresses.
      Since:
      7.0.0.0
    • getEmailAddressesFromRoleId

      public List<String> getEmailAddressesFromRoleId(Long pRoleId, Long pRelDefId)
      Gets a list of email addresses that are members of the pipeline role with the specified role id and release definition id to get emails overridden at the release.
      Specified by:
      getEmailAddressesFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      pRelDefId - Release definition id.
      Returns:
      A list of email addresses.
      Since:
      7.0.0.0
    • getAllUsersFromRoleId

      public List<FDUser> getAllUsersFromRoleId(Long pRoleId)
      Gets a list of all the users that are part of Assigned Users as well as all the active users belongs to the Assigned Groups for the pipeline role with the specified pipeline role id.
      Specified by:
      getAllUsersFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      Returns:
      List of FDUser objects.
      Since:
      7.0.0.0
    • getAllUsersFromRoleId

      public List<FDUser> getAllUsersFromRoleId(Long pRoleId, Long pRelDefId)
      Gets a list of all the users that are part of Assigned Users as well as all the active users belongs to the Assigned Groups for the pipeline role with the specified pipeline role id and release definition id to get Users overridden at the release.
      Specified by:
      getAllUsersFromRoleId in interface IFlexDeployFunctions
      Parameters:
      pRoleId - Pipeline role id.
      pRelDefId - Release definition id.
      Returns:
      List of FDUser objects.
      Since:
      7.0.0.0
    • getTaskById

      public TasksQueryExtResultRow getTaskById(Long pTaskId)
      Gets the task details based on the task id passed.
      Specified by:
      getTaskById in interface IFlexDeployFunctions
      Parameters:
      pTaskId - id of the task.
      Returns:
      TasksQueryExtResultRow.
      Throws:
      FlexRowNotFoundException - if no task found for a given pTaskId.
      Since:
      7.0.0.1
    • getPendingTasksByChangeTicket

      public List<TasksQueryResultPojo> getPendingTasksByChangeTicket(String pChangeTicket)
      Find Pending Tasks for given change ticket.
      Specified by:
      getPendingTasksByChangeTicket in interface IFlexDeployFunctions
      Parameters:
      pChangeTicket - change ticket number.
      Returns:
      A simple pojo list of pending task details.
      Since:
      7.0.0.1
    • searchTasks

      public <any> searchTasks(TasksQueryResultPojo pPojo, Integer pLimit, Integer pOffset)
      Find Tasks based provided search parameters and pagination input. Returns a PaginatedResponse containing list of Tasks matching search parameters.
      Specified by:
      searchTasks in interface IFlexDeployFunctions
      Parameters:
      pPojo - - TasksQueryResultPojo filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Tasks matching the search criteria.
      Since:
      7.0.0.1
    • approveTaskById

      public void approveTaskById(Long pTaskId, String pNotes)
      Approves a FlexDeploy Approval or Scheduled Window task.
      Specified by:
      approveTaskById in interface IFlexDeployFunctions
      Parameters:
      pTaskId - Task id to be approved.
      pNotes - Optional notes to assign to the approval.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to approve it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
      Since:
      7.0.0.1
    • rejectTaskById

      public void rejectTaskById(Long pTaskId, String pNotes)
      Rejects a FlexDeploy Approval or Scheduled Window task.
      Specified by:
      rejectTaskById in interface IFlexDeployFunctions
      Parameters:
      pTaskId - Task id to be rejected.
      pNotes - Optional notes to assign to the approval.
      Throws:
      FlexSecurityViolationException - User doesn't have permission to approve it.
      FlexValidationException - Task not found. It may have already been approved or rejected.
      Since:
      7.0.0.1
    • createComment

      public FdCommentDataObject createComment(FdCommentDataObject pCommentDataObj)
      Create Comment with the provided data. Returns the Comment details after creation.
      Specified by:
      createComment in interface IFlexDeployFunctions
      Parameters:
      pCommentDataObj - - Object containing the Comment details to create the Comment.
      Returns:
      A data object of the Comment details.
      Since:
      7.0.0.3
    • patchComment

      public FdCommentDataObject patchComment(FdCommentDataObject pCommentDataObj)
      Update Comment with the provided data. This will only update fields that are passed in the dataObject.
      Specified by:
      patchComment in interface IFlexDeployFunctions
      Parameters:
      pCommentDataObj - - Object containing the Comment details to update the Comment.
      Returns:
      A data object of Comment details.
      Throws:
      FlexRowNotFoundException - If no Comment is found for the given Comment details.
      Since:
      7.0.0.3
    • deleteComment

      public void deleteComment(Long pCommentId)
      Deletes a Comment.
      Specified by:
      deleteComment in interface IFlexDeployFunctions
      Parameters:
      pCommentId - - the id of the Comment. No error is thrown if the Comment is not found.
      Since:
      7.0.0.3
    • getReleaseById

      public RelDefinitionDataObject getReleaseById(Long pRelDefinitionId)
      Returns Release information for a given release definition Id.
      Specified by:
      getReleaseById in interface IFlexDeployFunctions
      Parameters:
      pRelDefinitionId - - Release definition id of the Release to retrieve
      Returns:
      Object containing metadata about the given Release
      Throws:
      FlexRowNotFoundException - If Release not found for given pRelDefinitionId
      Since:
      7.0.0.3
    • getReleaseByName

      public RelDefinitionDataObject getReleaseByName(String pRelDefinitionName)
      Returns Release information for a given release name.
      Specified by:
      getReleaseByName in interface IFlexDeployFunctions
      Parameters:
      pRelDefinitionName - - Release name of the Release to retrieve
      Returns:
      Object containing metadata about the given Release
      Throws:
      FlexRowNotFoundException - If Release not found for given pRelDefinitionName
      Since:
      7.0.0.3
    • createReleaseProjects

      public List<RelProjectDataObject> createReleaseProjects(Long pReleaseId, List<RelProjectDataObject> pPojos)
      Create Release Project with the provided data. Returns the list of Release Projects detail after creation.
      Specified by:
      createReleaseProjects in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - - release id to create release projects under.
      pPojos - - A list containing the Release Projects detail to create the Release Projects.
      Returns:
      A list of the Release Project details.
      Since:
      7.0.0.3
    • patchReleaseProject

      public RelProjectDataObject patchReleaseProject(RelProjectDataObject pRelProjectDataObj)
      Updates a release with the provided data. This will only update fields that are passed in the pRelProjectDataObj. Returns the release project details after updating. Project Groups String is CSV of project group id and not project group names.
      Specified by:
      patchReleaseProject in interface IFlexDeployFunctions
      Parameters:
      pRelProjectDataObj - - Object containing release project information.
      Returns:
      Object of the updated Release project details.
      Throws:
      FlexRowNotFoundException - if no release is found for the given release project details.
      Since:
      7.0.0.3
    • updateReleaseProject

      public RelProjectDataObject updateReleaseProject(RelProjectDataObject pRelProjectDataObj)
      Updates a Release with the provided data. Project Groups String is CSV of project group id and not project group names.
      Specified by:
      updateReleaseProject in interface IFlexDeployFunctions
      Parameters:
      pRelProjectDataObj - - Object containing release project information.
      Returns:
      Object of the updated Release project details.
      Throws:
      FlexRowNotFoundException - if no release is found for the given release project details.
      Since:
      7.0.0.3
    • deleteReleaseProjects

      public void deleteReleaseProjects(List<Long> pRelProjectIds)
      Delete Release projects from release.
      Specified by:
      deleteReleaseProjects in interface IFlexDeployFunctions
      Parameters:
      pRelProjectIds - - A list of ids of the Release projects to be deleted. No error is thrown if the release project id is not found.
      Since:
      7.0.0.3
    • searchReleases

      public <any> searchReleases(RelDefinitionDataObject pPojo, Integer pLimit, Integer pOffset)
      Find Releases based on provided search parameters and pagination input. Returns a PaginatedResponse containing list of Releases matching search parameters.
      Specified by:
      searchReleases in interface IFlexDeployFunctions
      Parameters:
      pPojo - - RelDefinitionDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Releases matching the search criteria.
      Since:
      7.0.0.3
    • searchReleaseProjects

      public <any> searchReleaseProjects(RelProjectDataObject pPojo, Integer pLimit, Integer pOffset)
      Find Release Projects based on provided search parameters and pagination input. Returns a PaginatedResponse containing list of Releases matching search parameters.
      Specified by:
      searchReleaseProjects in interface IFlexDeployFunctions
      Parameters:
      pPojo - - RelProjectDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of query result.
      Returns:
      PaginatedResponse containing the list of Release Projects matching the search criteria.
      Since:
      7.0.0.3
    • deleteReleaseProject

      public void deleteReleaseProject(Long pRelProjectId)
      Delete Release project from release.
      Specified by:
      deleteReleaseProject in interface IFlexDeployFunctions
      Parameters:
      pRelProjectId - - The id of the Release project to be deleted. No error is thrown if the release project id is not found.
      Since:
      7.0.0.3
    • createReleaseProject

      public RelProjectDataObject createReleaseProject(RelProjectDataObject pPojo)
      Create Release Project with the provided data. Returns the list of Release Project details after creation.
      Specified by:
      createReleaseProject in interface IFlexDeployFunctions
      Parameters:
      pPojo - - Object containing the Release Project details to create the Release Poject.
      Returns:
      A data object of the created Release Project details.
      Since:
      7.0.0.3
    • copyRelease

      public RelDefinitionDataObject copyRelease(CopyReleaseInput pCopyReleaseInput)
      Create a Release from the source release based on the provided data. Returns the Release details after creation.
      Specified by:
      copyRelease in interface IFlexDeployFunctions
      Parameters:
      pCopyReleaseInput - - Object containing the source Release details to create the Release.
      Returns:
      A data object of the created Release details.
      Since:
      7.0.0.3
    • createWorkItem

      public FlxWorkItemDataObject createWorkItem(FlxWorkItemDataObject pPojo)
      Specified by:
      createWorkItem in interface IFlexDeployFunctions
    • updateWorkItem

      public WorkItemDataObject updateWorkItem(WorkItemDataObject pPojo)
      Updates a WorkItem based on the provided details.
      Specified by:
      updateWorkItem in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing WorkItem details to update the WorkItem.
      Returns:
      A simple pojo of WorkItem details.
    • patchWorkItem

      public WorkItemDataObject patchWorkItem(WorkItemDataObject pPojo)
      Patches a WorkItem with the provided data. This will only update fields that are passed in the pojo.
      Specified by:
      patchWorkItem in interface IFlexDeployFunctions
      Parameters:
      pPojo - Object containing WorkItem details to update the WorkItem.
      Returns:
      A simple pojo of WorkItem details.
    • getWorkItemById

      public WorkItemDataObject getWorkItemById(Long pWorkItemId)
      Gets the WorkItem details based on WorkItem id.
      Specified by:
      getWorkItemById in interface IFlexDeployFunctions
      Parameters:
      pWorkItemId - WorkItem id to get the WorkItem details.
      Returns:
      A simple pojo of WorkItem details.
      Throws:
      FlexRowNotFoundException - If no WorkItem is found for the given WorkItem id.
    • updateWorkItemStatus

      public FlxWorkItemDataObject updateWorkItemStatus(String pWorkItemNumber, String pStatusName)
      Specified by:
      updateWorkItemStatus in interface IFlexDeployFunctions
    • updateWorkItemType

      public FlxWorkItemDataObject updateWorkItemType(String pWorkItemNumber, String pTypeCode)
      Specified by:
      updateWorkItemType in interface IFlexDeployFunctions
    • updateWorkItemAssignee

      public FlxWorkItemDataObject updateWorkItemAssignee(String pWorkItemNumber, String pUserName)
      Specified by:
      updateWorkItemAssignee in interface IFlexDeployFunctions
    • getWorkItemTypes

      public List<FlxWorkItemTypeDataObject> getWorkItemTypes()
      Specified by:
      getWorkItemTypes in interface IFlexDeployFunctions
    • getWorkItemStatuses

      public List<FlxWorkItemStatusDataObject> getWorkItemStatuses()
      Specified by:
      getWorkItemStatuses in interface IFlexDeployFunctions
    • saveWorkItemFieldData

      public List<FlxWorkItemFieldDataDataObject> saveWorkItemFieldData(String pWorkItemNumber, String pFieldName, Serializable pValue)
      Specified by:
      saveWorkItemFieldData in interface IFlexDeployFunctions
    • getWorkItemFieldData

      public List<FlxWorkItemFieldDataDataObject> getWorkItemFieldData(String pWorkItemNumber)
      Specified by:
      getWorkItemFieldData in interface IFlexDeployFunctions
    • getReleaseWorkItems

      public List<WorkItemDataObject> getReleaseWorkItems(Long pReleaseId)
      Get WorkItems associated with Release Id.
      Specified by:
      getReleaseWorkItems in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - - Release Id.
      Returns:
      A list of WorkItemDataObjects.
      Since:
      8.0.0.1
    • addWorkItemsToRelease

      public void addWorkItemsToRelease(Long pReleaseId, Long pInstanceId, List<String> pWorkItemNumbers)
      Add WorkItems to an existing Release.
      Specified by:
      addWorkItemsToRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - - Release Definition Id to link workitems to.
      pInstanceId - - Issue tracking instance for workitems. If not provided, Issue tracking instances configured on the release's folder will be used.
      pWorkItemNumbers - - A list of WorkItems Numbers to be added to the Release.
      Since:
      8.0.0.1
    • removeWorkItemsFromRelease

      public void removeWorkItemsFromRelease(Long pReleaseId, Long pInstanceId, List<String> pWorkItemNumbers, boolean pRemoveAssociatedProjects)
      Remove WorkItems and associated Projects from given Release.
      Specified by:
      removeWorkItemsFromRelease in interface IFlexDeployFunctions
      Parameters:
      pReleaseId - - Release Id to remove workitems from.
      pInstanceId - - Issue tracking instance for workitems. If not provided, all the workitems that match the input WorkItem Numbers will be removed.
      pWorkItemNumbers - - WorkItems Numbers to be removed from the Release.
      pRemoveAssociatedProjects - - Pass true to remove projects associated with the input WorkItems.
      Since:
      8.0.0.1
    • exportConfigurations

      public File exportConfigurations()
      Export configurations as zip file. This only works on Isolated Network Source server. This method can be used to automate export of archive, but result zip file should be deleted once it is no longer needed.
      Specified by:
      exportConfigurations in interface IFlexDeployFunctions
      Returns:
      File representing zip of configuration data.
      Since:
      8.0.0.1
    • exportBuild

      public File exportBuild(Long pWorkflowExecutionId)
      Export build archive as zip file. This only works on Isolated Network Source server. This also contains artifacts of build. This method can be used to automate export of archive, but result zip file should be deleted once it is no longer needed.
      Specified by:
      exportBuild in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - WorkflowExecutionId for which build archive is to be exported.
      Returns:
      File representing archive data.
      Since:
      8.0.0.1
    • exportSnapshot

      public File exportSnapshot(Long pSnapshotId)
      Export snapshot archive as zip file. This only works on Isolated Network Source server. This also contains artifacts for all snapshot version along with project, workflow and topology configurations that are applicable for the release. This method can be used to automate export of archive, but result zip file should be deleted once it is no longer needed.
      Specified by:
      exportSnapshot in interface IFlexDeployFunctions
      Parameters:
      pSnapshotId - - SnapshotId for which archive is to be exported.
      Returns:
      File representing archive data.
      Since:
      8.0.0.1
    • getProjectProperties

      public List<PropertyValuePojo> getProjectProperties(Long pProjectId)
      Get the list of project properties for a given project id.
      Specified by:
      getProjectProperties in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the Project.
      Returns:
      - List of Project Properties associated to the Project.
      Throws:
      FlexValidationException - if no project is found for given project id.
      Since:
      8.0.0.1
    • getProjectPropertyValue

      public Serializable getProjectPropertyValue(Long pProjectId, String pPropertyKeyCode)
      Get the project property value for a given project id and property key code.
      Specified by:
      getProjectPropertyValue in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the project.
      pPropertyKeyCode - - The code of the property.
      Returns:
      - A serializable value of the project property
      Throws:
      FlexValidationException - if an invalid Project id and/or Property Key Code passed.
      Since:
      8.0.0.1
    • updateProjectProperty

      public void updateProjectProperty(Long pProjectId, String pPropertyKeyCode, Serializable pNewValue)
      Update a project property with the provided property key code and project id.
      Specified by:
      updateProjectProperty in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Id of the project 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.
      Throws:
      FlexValidationException - if an invalid Project id and/or Property Key Code passed.
      Since:
      8.0.0.1
    • getTargetProperties

      public List<PropertyKeyDataObject> getTargetProperties(Long pTargetId)
      Get the list of Target properties for a given target id.
      Specified by:
      getTargetProperties in interface IFlexDeployFunctions
      Parameters:
      pTargetId - - Id of the Target.
      Returns:
      - List of Target Properties associated to the Target.
      Throws:
      FlexRowNotFoundException - if Target id does not exist.
      Since:
      8.0.0.2
    • updateTargetProperties

      public List<PropertyKeyDataObject> updateTargetProperties(Long pTargetId, List<PropertyKeyDataObject> pPropertiesToUpdate)
      Updates a Target's properties with the provided data. This will replace all the target property values so that only those passed in the list remain. Default values will be applied to null values. Returns a list of the Target properties after updating.
      Specified by:
      updateTargetProperties in interface IFlexDeployFunctions
      Parameters:
      pTargetId - - Id of the Target that is to be updated.
      pPropertiesToUpdate - - List of property values to be updated on Target.
      Returns:
      - List of updated properties.
      Throws:
      FlexRowNotFoundException - If Target id does not exist.
      FlexValidationException - If Property Definition id is not valid.
      Since:
      8.0.0.2
    • patchTargetProperties

      public List<PropertyKeyDataObject> patchTargetProperties(Long pTargetId, List<PropertyKeyDataObject> pPropertiesToUpdate)
      Updates a Target's properties with the provided data. This will only update properties that are passed in the list. Returns a list of the Target properties after updating.
      Specified by:
      patchTargetProperties in interface IFlexDeployFunctions
      Parameters:
      pTargetId - - Id of the Target that is to be updated.
      pPropertiesToUpdate - - List of property values to be updated on Target.
      Returns:
      - List of updated properties.
      Throws:
      FlexRowNotFoundException - If Target id does not exist.
      FlexValidationException - If Property Definition id is not valid.
      Since:
      8.0.0.2
    • uploadAttachmentsToIncident

      public void uploadAttachmentsToIncident(String pCMSInstanceCode, String pIncidentNumber, Map<String,InputStream> pAttachments) throws ApiException
      Uploads attachments to an existing Jira or ServiceNow CMS Incident.
      Specified by:
      uploadAttachmentsToIncident in interface IFlexDeployFunctions
      Parameters:
      pCMSInstanceCode - The CMS Instance Code.
      pIncidentNumber - The incident number to which attachments need to be uploaded.
      pAttachments - The attachments to be uploaded to the CMS Incident. This map should contain the name of attachment(along with the extension) and the attachment in the form of InputStream.
      Throws:
      ApiException - Throws if attachment cannot be uploaded in the CMS Incident.
    • uploadAttachmentsToTicket

      public void uploadAttachmentsToTicket(String pCMSInstanceCode, String pTicketNumber, Map<String,InputStream> pAttachments) throws ApiException
      Uploads attachments to an existing Jira or ServiceNow CMS Ticket.
      Specified by:
      uploadAttachmentsToTicket in interface IFlexDeployFunctions
      Parameters:
      pCMSInstanceCode - The CMS Instance Code.
      pTicketNumber - The ticket number to which attachments need to be uploaded.
      pAttachments - The attachments to be uploaded to the CMS ticket. This map should contain the name of attachment(along with the extension) and the attachment in the form of InputStream.
      Throws:
      ApiException - Throws if attachment cannot be uploaded in the CMS Ticket.
    • createStandaloneRelease

      public Long createStandaloneRelease(Long pProjectId, Long pBranchId, String pReleaseName, Long pBuildEnvironmentId, Long pPipelineId)
      Creates a Standalone Release for standard project that defaults to 'STARTED' status.
      Specified by:
      createStandaloneRelease in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Project id for Standalone Release.
      pBranchId - - Branch id of the project.
      pReleaseName - - Name of Standalone Release to create.
      pBuildEnvironmentId - - Build environment id of the project(optional).
      pPipelineId - - Pipeline id for Standalone Release(optional - It can take default value from Release settings)..
      Returns:
      Release id
      Throws:
      FlexValidationException - If invalid inputs are given.
    • createStandaloneRelease

      public Long createStandaloneRelease(Long pProjectId, Long pBranchId, String pPackageName, String pReleaseName, Long pBuildEnvironmentId, Long pPipelineId)
      Creates a Standalone Release for partial project that defaults to 'STARTED' status.
      Specified by:
      createStandaloneRelease in interface IFlexDeployFunctions
      Parameters:
      pProjectId - - Project id for Standalone Release.
      pBranchId - - Branch id of the project.
      pPackageName - - Package name of the project.
      pReleaseName - - Name of Standalone Release to create.
      pBuildEnvironmentId - - Build environment id of the project(optional).
      pPipelineId - - Pipeline id for Standalone Release(optional - It can take default value from Release settings).
      Returns:
      Release id
      Throws:
      FlexValidationException - If invalid inputs are given.
    • searchWorkflows

      public <any> searchWorkflows(WorkflowDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Specified by:
      searchWorkflows in interface IFlexDeployFunctions
    • searchByTag

      public <any> searchByTag(String pTagName, Boolean pShowInactive, List<FlexDeploySecurityConstants.SecurityObjectType> pSearchEntities, Integer pLimit, Integer pOffset)
      Specified by:
      searchByTag in interface IFlexDeployFunctions
    • searchByTag

      public <any> searchByTag(String pTagName, Boolean pShowInactive, Integer pLimit, Integer pOffset)
      Specified by:
      searchByTag in interface IFlexDeployFunctions
    • getCmsTicketById

      public CmsTicketDataObject getCmsTicketById(Long pCmsTicketId)
      Returns CMS Ticket information for a given CMS Ticket Id.
      Specified by:
      getCmsTicketById in interface IFlexDeployFunctions
      Parameters:
      pCmsTicketId - - CMS Ticket id of the CMS Ticket to retrieve.
      Returns:
      Object containing metadata about the given CMS Ticket.
      Throws:
      FlexRowNotFoundException - If CMS Ticket not found for given pCmsTicketId.
      Since:
      8.0.0.5
    • getCmsTicketsByNumber

      public List<CmsTicketDataObject> getCmsTicketsByNumber(String pCmsTicketNumber)
      Returns a list of CMS Ticket information for a given CMS Ticket Number.
      Specified by:
      getCmsTicketsByNumber in interface IFlexDeployFunctions
      Parameters:
      pCmsTicketNumber - - Ticket Number of the CMS Ticket to retrieve.
      Returns:
      Returns a list of CMS Ticket information.
      Throws:
      FlexRowNotFoundException - If CMS Ticket not found for given pCmsTicketNumber.
      Since:
      8.0.0.5
    • createCmsTicket

      public CmsTicketDataObject createCmsTicket(CmsTicketDataObject pCmsTicketDataObject)
      Create CMS Ticket with the provided data. Returns the CMS Ticket details after creation.
      Specified by:
      createCmsTicket in interface IFlexDeployFunctions
      Parameters:
      pCmsTicketDataObject - - Object containing the CMS Ticket details to create the CMS Ticket.
      Returns:
      A data object of the CMS Ticket details.
      Since:
      8.0.0.5
    • updateCmsTicket

      public CmsTicketDataObject updateCmsTicket(CmsTicketDataObject pCmsTicketDataObject)
      Update CMS Ticket based on the CMS Ticket details.
      Specified by:
      updateCmsTicket in interface IFlexDeployFunctions
      Parameters:
      pCmsTicketDataObject - - Object containing the CMS Ticket details to update the CMS Ticket.
      Returns:
      A data object of CMS Ticket details.
      Throws:
      FlexRowNotFoundException - If no CMS Ticket is found for the given CMS Ticket details.
      Since:
      8.0.0.5
    • patchCmsTicket

      public CmsTicketDataObject patchCmsTicket(CmsTicketDataObject pCmsTicketDataObject)
      Update CMS Ticket with the provided data. This will only update fields that are passed in the data object.
      Specified by:
      patchCmsTicket in interface IFlexDeployFunctions
      Parameters:
      pCmsTicketDataObject - - Object containing the CMS Ticket details to update the CMS Ticket.
      Returns:
      A data object of CMS Ticket details.
      Throws:
      FlexRowNotFoundException - If no CMS Ticket is found for the given CMS Ticket details.
      Since:
      8.0.0.5
    • deleteCmsTicket

      public void deleteCmsTicket(Long pCmsTicketId)
      Deletes a CMS Ticket.
      Specified by:
      deleteCmsTicket in interface IFlexDeployFunctions
      Parameters:
      pCmsTicketId - - the id of the CMS Ticket.
      Since:
      8.0.0.5
    • searchCmsTickets

      public <any> searchCmsTickets(CmsTicketDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find CMS Ticket based on provided search parameters and pagination input. Returns a PaginatedResponse containing list of CMS Tickets matching search parameters.
      Specified by:
      searchCmsTickets in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - CmsTicketDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of CMS Ticket matching the search criteria.
      Since:
      8.0.0.5
    • getWorkItemsByNumber

      public List<WorkItemDataObject> getWorkItemsByNumber(String pWorkItemNumber)
      Gets a list of WorkItems based on WorkItem number.
      Specified by:
      getWorkItemsByNumber in interface IFlexDeployFunctions
      Parameters:
      pWorkItemNumber - WorkItem number to get the WorkItem details.
      Returns:
      A list of WorkItem details.
      Since:
      8.0.0.5
    • searchWorkItems

      public <any> searchWorkItems(WorkItemDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Find WorkItems based on provided search parameters and pagination input. Returns a PaginatedResponse containing list of WorkItems matching search parameters.
      Specified by:
      searchWorkItems in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - - The WorkItemDataObject filled with criteria values.
      pLimit - - Limit for the number of rows to be returned.
      pOffset - - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing the list of WorkItems matching the search criteria.
      Since:
      8.0.0.5
    • getReleaseProperties

      public List<RelPropertyDataObject> getReleaseProperties(Long pReleaseDefinitionId)
      Get the list of Release properties details for a given Release definition id.
      Specified by:
      getReleaseProperties in interface IFlexDeployFunctions
      Parameters:
      pReleaseDefinitionId - - Id of the Release.
      Returns:
      - List of Release Properties details associated to the Release.
      Throws:
      FlexValidationException - if no Release properties are found for given Release definition id.
      Since:
      8.0.0.5
    • getReleaseProperty

      public RelPropertyDataObject getReleaseProperty(Long pRelDefId, String pPropertyKeyCode)
      Get the Release property detail for a given Release definition id and Property key code.
      Specified by:
      getReleaseProperty in interface IFlexDeployFunctions
      Parameters:
      pRelDefId - - Id of the Release.
      pPropertyKeyCode - - The code of the release property.
      Returns:
      - Object containing metadata about of the given release definition id and property key code.
      Throws:
      FlexValidationException - if an invalid Release definition id and/or Property Key Code passed.
      Since:
      8.0.0.5
    • updateReleaseProperties

      public List<RelPropertyDataObject> updateReleaseProperties(Long pReleaseDefinitionId, List<RelPropertyDataObject> pInputs)
      Updates a Release properties with the provided data. This will only update properties that are passed in the list. Returns the list of the Release properties details after updating.
      Specified by:
      updateReleaseProperties in interface IFlexDeployFunctions
      Parameters:
      pReleaseDefinitionId - - Id of the Release definition that is to be updated.
      pInputs - - List of properties to be updated on Release.
      Returns:
      Returns the list of the Release properties details after updating.
      Since:
      8.0.0.5
    • createIntegrationInstanceAndProperties

      public IntegrationInstancePojo createIntegrationInstanceAndProperties(IntegrationInstancePojo pPojo)
      Creates and configures the properties of an Integration instance using the provided data object. This method ensures that all necessary attributes are populated and validated before creating the Integration instance.
      Specified by:
      createIntegrationInstanceAndProperties in interface IFlexDeployFunctions
      Parameters:
      pPojo - - The object containing all the required information for setting up the Integration instance
      Returns:
      Returns the pojo of Integration instance details.
      Throws:
      FlexAPIException
      Since:
      8.0.0.7
    • updateIntegrationInstanceAndProperties

      public IntegrationInstancePojo updateIntegrationInstanceAndProperties(IntegrationInstancePojo pPojo)
      Updates an existing Integration instance and its associated properties with the provided data. Only the fields and properties present in the passed IntegrationInstancePojo will be updated. This method returns the updated Integration instance object, reflecting the changes made.
      Specified by:
      updateIntegrationInstanceAndProperties in interface IFlexDeployFunctions
      Parameters:
      pPojo - - The object containing all of the required data for the Integration instance to update.
      Returns:
      Returns the pojo of updated Integration instance details.
      Throws:
      FlexAPIException
      Since:
      8.0.0.7
    • patchIntegrationInstanceAndProperties

      public IntegrationInstancePojo patchIntegrationInstanceAndProperties(IntegrationInstancePojo pPojo)
      Updates an Integration instance and its properties with the provided data. This will only update Integration instance details and properties that are passed in the pPojo, leaving other details unchanged. It returns the Integration instance details after updating.
      Specified by:
      patchIntegrationInstanceAndProperties in interface IFlexDeployFunctions
      Parameters:
      pPojo - - The object containing all of the required data for the Integration instance to update.
      Returns:
      Returns the pojo of updated Integration instance details.
      Throws:
      FlexAPIException
      Since:
      8.0.0.7
    • findProjectPackagesForFilesByProjectId

      public List<ProjectPackagePojo> findProjectPackagesForFilesByProjectId(Long pProjectId, List<String> pFiles, PackageSearchOptions pPackageSearchOptions)
      Finds relevant FlexDeploy Packages for a list of files and with an optional package search options.
      Specified by:
      findProjectPackagesForFilesByProjectId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Id of the project to be used to find matching packages.
      pFiles - List of files from a webhooks event. If no files, no packages will be returned.
      pPackageSearchOptions - Package search options like Active package, project scm type, package type and files include/exclude paths.
      Returns:
      List of ProjectPackages
    • findProjectPackagesForFilesByProjectType

      public List<ProjectPackagePojo> findProjectPackagesForFilesByProjectType(String pProjectType, List<String> pFiles, PackageSearchOptions pPackageSearchOptions)
      Finds relevant FlexDeploy Packages for a list of files and project type with an optional package search options.
      Specified by:
      findProjectPackagesForFilesByProjectType in interface IFlexDeployFunctions
      Parameters:
      pProjectType - The type of the project, use to search for projects.
      pFiles - List of files from a webhooks event. If no files, no packages will be returned.
      pPackageSearchOptions - Package search options like Active package, project scm type, package type and files include/exclude paths.
      Returns:
      List of ProjectPackages
    • findProjectPackagesByProjectId

      public List<ProjectPackagePojo> findProjectPackagesByProjectId(Long pProjectId, PackageSearchOptions pPackageSearchOptions)
      Finds relevant FlexDeploy Packages for a projectId and with an optional package search options. This function currently only look for projects with no scm type selected.
      Specified by:
      findProjectPackagesByProjectId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Id of the project to be used to find matching packages.
      pPackageSearchOptions - Package search options like Active package, project scm type, package type and files include/exclude paths.
      Returns:
      List of ProjectPackages
    • findProjectPackagesByProjectType

      public List<ProjectPackagePojo> findProjectPackagesByProjectType(String pProjectType, PackageSearchOptions pPackageSearchOptions)
      Finds relevant FlexDeploy Packages for a project type and with an optional package search options.
      Specified by:
      findProjectPackagesByProjectType in interface IFlexDeployFunctions
      Parameters:
      pProjectType - The type of the project, use to search for projects.
      pPackageSearchOptions - Package search options like Active package, project scm type, package type and files include/exclude paths.
      Returns:
      List of ProjectPackages
    • ensureWorkItems

      public List<WorkItemDataObject> ensureWorkItems(Long pProjectId, List<String> pWorkItemNumbers)
      Creates work items for a specified project by verifying their existence within the project's configured Issue Tracking System instances. It validates the provided work item numbers and populates metadata for successfully matched work items into the FlexDeploy database, enabling links to build, release, and other processes.
      Specified by:
      ensureWorkItems in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Id of the Project.
      pWorkItemNumbers - A list of work item numbers to validate and create.
      Returns:
      A list of WorkItemDataObject instances representing the successfully validated work items.
    • getOrCreateBranchId

      public Long getOrCreateBranchId(Long pProjectId, String pBranchName)
      Retrieves the Id of a branch in a FlexDeploy project. If the branch does not exist, it creates a new one with the given name
      Specified by:
      getOrCreateBranchId in interface IFlexDeployFunctions
      Parameters:
      pProjectId - id of the project
      pBranchName - name of the branch
      Returns:
      Branch id Creates the branch if it does not already exist
      Throws:
      FlexCheckedException - if the branch is not found and cannot be created.
    • getOrCreateBranchId

      protected Long getOrCreateBranchId(Long pProjectId, String pBranchName, Boolean pCreateBranch)
    • createOrUpdatePackage

      public Long createOrUpdatePackage(Long pProjectId, String pPackageName, String pDescription, Long pBranchId, PollingResult pPollingResult)
      Creates a new package for the specified project and branch, if it doesn't already exist, Or updates the existing one. Automatically updates the package contents based on the provided PollingResult,including any newly detected files.
      Specified by:
      createOrUpdatePackage in interface IFlexDeployFunctions
      Parameters:
      pProjectId - Parent project id to create package under.
      pPackageName - Package name to use.
      pDescription - Description to give the package.
      pBranchId - Branch to use when populating files if new files are found.
      pPollingResult - PollingResult object to use for finding differences.
      Returns:
      Package id.
      Throws:
      FlexValidationException - if project other than SCM Type GIT is invalid.
      See Also:
    • getBuildWorkflowExecutionFiles

      public <any> getBuildWorkflowExecutionFiles(Long pWorkflowExecutionId, Integer pLimit, Integer pOffset)
      Retrieves the files associated with the specified package build workflow execution Id.
      Specified by:
      getBuildWorkflowExecutionFiles in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated build files.
      pLimit - Limit for the number of rows to be returned.
      pOffset - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing a list of ProjectVersionFileDetailResult objects.
      Throws:
      FlexRowNotFoundException - If no workflow execution is found for the given id.
    • getDeployWorkflowExecutionFiles

      public <any> getDeployWorkflowExecutionFiles(Long pWorkflowExecutionId, Integer pLimit, Integer pOffset)
      Retrieves the files associated with the specified package deploy workflow execution Id.
      Specified by:
      getDeployWorkflowExecutionFiles in interface IFlexDeployFunctions
      Parameters:
      pWorkflowExecutionId - Workflow Execution Id to retrieve associated deploy files.
      pLimit - Limit for the number of rows to be returned.
      pOffset - Offset number from which the limit starts. Pass 0 to start at beginning of the query result.
      Returns:
      PaginatedResponse containing a list of PackageDeploymentFileResults objects.
      Throws:
      FlexRowNotFoundException - If no workflow execution is found for the given id.
    • initializeOrRefreshCredentialValuesInCache

      public void initializeOrRefreshCredentialValuesInCache(int pBatchSize, int pDelayBetweenBatchesMillis)
      Loads or refreshes the elements of the credential cache in batches. The system setting Credential Cache Timeout (sec) governs how long credential store results remain valid. To ensure timely cache updates and avoid delays in execution, this method should be invoked from a scheduled events script at an appropriate interval.
      Specified by:
      initializeOrRefreshCredentialValuesInCache in interface IFlexDeployFunctions
      Parameters:
      pBatchSize - Processing entries in configurable batch sizes
      pDelayBetweenBatchesMillis - Applying a delay between batches
    • inactivateProjectVersion

      public ProjectVersionDataObject inactivateProjectVersion(Long pProjectVersionId, String pInactivationReason)
      Inactivates an active project version.
      Specified by:
      inactivateProjectVersion in interface IFlexDeployFunctions
      Parameters:
      pProjectVersionId - The id of the project version that you wish to inactivate.
      pInactivationReason - (Optional) The reason that the project version is being inactivated.
      Returns:
      ProjectVersionDataObject - A representation of the project version.
    • activateProjectVersion

      public ProjectVersionDataObject activateProjectVersion(Long pProjectVersionId)
      Activates an inactive project version.
      Specified by:
      activateProjectVersion in interface IFlexDeployFunctions
      Parameters:
      pProjectVersionId - The id of the project version that you wish to activate.
      Returns:
      ProjectVersionDataObject - A representation of the project version.
    • addWorkItemToProjectVersion

      public void addWorkItemToProjectVersion(Long pProjectVersionId, Long pWorkItemId)
      Adds a work item to a project version.
      Specified by:
      addWorkItemToProjectVersion in interface IFlexDeployFunctions
      Parameters:
      pProjectVersionId - The id of the project version to which you want to add a work item.
      pWorkItemId - The id of the work item that you wish to add.
    • removeWorkItemFromProjectVersion

      public void removeWorkItemFromProjectVersion(Long pProjectVersionId, Long pWorkItemId)
      Removes a work item from a project version.
      Specified by:
      removeWorkItemFromProjectVersion in interface IFlexDeployFunctions
      Parameters:
      pProjectVersionId - The id of the project version to which you want to remove a work item.
      pWorkItemId - The id of the work item that you wish to add.
    • getPendingOrApprovedContent

      public List<SnapshotCompareItem> getPendingOrApprovedContent(Long pStageExecId)
      Snapshot content that will deploy or has already deployed in this stage, excluding utility projects.
      Specified by:
      getPendingOrApprovedContent in interface IFlexDeployFunctions
      Parameters:
      pStageExecId - The pipeline stage execution id.
      Returns:
      List of SnapshotCompareItem
    • getPendingOrApprovedCommits

      public List<ScmCommitDataObject> getPendingOrApprovedCommits(Long pStageExecId)
      Commits in the snapshot that will deploy or have already deployed in this stage.
      Specified by:
      getPendingOrApprovedCommits in interface IFlexDeployFunctions
      Parameters:
      pStageExecId - The pipeline stage execution id.
      Returns:
      List of ScmCommitDataObject
    • getPendingOrApprovedWorkItems

      public List<WorkItemDataObject> getPendingOrApprovedWorkItems(Long pStageExecId)
      Work items in the snapshot that will deploy or have already deployed in this stage.
      Specified by:
      getPendingOrApprovedWorkItems in interface IFlexDeployFunctions
      Parameters:
      pStageExecId - The pipeline stage execution id.
      Returns:
      List of WorkItemDataObject
    • getPipelineById

      public PipelineDefinitionDataObject getPipelineById(Long pPipelineId)
      Finds Pipeline by using its unique ID.
      Specified by:
      getPipelineById in interface IFlexDeployFunctions
      Parameters:
      pPipelineId - - Id of Pipeline to find.
      Returns:
      PipelineDefinitionDataObject- containing the pipeline definition details.
      Throws:
      FlexRowNotFoundException - if no row found for pPipelineId.
    • searchPipelines

      public <any> searchPipelines(PipelineDefinitionDataObject pCriteriaObject, Integer pLimit, Integer pOffset)
      Finds pipelines based on the provided search criteria and pagination input.
      Specified by:
      searchPipelines in interface IFlexDeployFunctions
      Parameters:
      pCriteriaObject - PipelineDefinitionDataObject containing the search criteria values.
      pLimit - Maximum number of rows to return.
      pOffset - Starting offset for the result set. Pass 0 to begin from the start of the query result.
      Returns:
      PaginatedResponse of PipelineDefinitionDataObject matching the specified criteria.
    • prepareRollBackWorkflowRequest

      public RollbackWorkflowRequestInput prepareRollBackWorkflowRequest(Long pWorkflowExecutionId)
      Specified by:
      prepareRollBackWorkflowRequest in interface IFlexDeployFunctions
    • rollBack

      public WorkflowRequestDataObject rollBack(RollbackWorkflowRequestInput pRollbackWorkflowRequestInput)
      Submits a rollback workflow request.
      Specified by:
      rollBack in interface IFlexDeployFunctions
      Parameters:
      pRollbackWorkflowRequestInput - Object containing rollback configuration (project, environment, instance selection, and optionally build file inputs for package-based rollback).
      Returns:
      WorkflowRequestDataObject for the submitted rollback workflow request.