Class RestWorkbenchClient

    • Method Detail

      • createAsyncWorkbenchClient

        public static WorkbenchClient createAsyncWorkbenchClient​(String appUrl,
                                                                 String userId,
                                                                 String password)
        Creates Business Central REST client which will execute each operation asynchronously. The status of the operation can be checked by retrieving the details about the job with ID provided in the request.
      • createWorkbenchClient

        public static WorkbenchClient createWorkbenchClient​(String appUrl,
                                                            String userId,
                                                            String password)
        Creates Business Central REST client which will wait for successful completion of each operation.
      • createWorkbenchClient

        public static WorkbenchClient createWorkbenchClient​(String appUrl,
                                                            String userId,
                                                            String password,
                                                            int jobTimeoutSeconds,
                                                            int projectJobTimeoutSeconds,
                                                            int cloneRepoTimeoutSeconds)
        Creates Business Central REST client which will wait for successful completion of each operation using specified timeouts.
      • getProject

        public org.guvnor.rest.client.ProjectResponse getProject​(String spaceName,
                                                                 String projectName)
        Description copied from interface: WorkbenchClient
        [GET] /spaces/{spaceName}/project/{projectName}
        Specified by:
        getProject in interface WorkbenchClient
      • cloneRepository

        public org.guvnor.rest.client.CloneProjectJobRequest cloneRepository​(String spaceName,
                                                                             org.guvnor.rest.client.CloneProjectRequest cloneProjectRequest)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/git/clone
        Specified by:
        cloneRepository in interface WorkbenchClient
      • createProject

        public org.guvnor.rest.client.CreateProjectJobRequest createProject​(String spaceName,
                                                                            org.guvnor.rest.client.CreateProjectRequest createProjectRequest)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/
        Specified by:
        createProject in interface WorkbenchClient
      • deleteProject

        public org.guvnor.rest.client.DeleteProjectRequest deleteProject​(String spaceName,
                                                                         String projectName)
        Description copied from interface: WorkbenchClient
        [DELETE] /spaces/{spaceName}/projects/{projectName}
        Specified by:
        deleteProject in interface WorkbenchClient
      • createSpace

        public org.guvnor.rest.client.SpaceRequest createSpace​(org.guvnor.rest.client.Space spaceName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces
        Specified by:
        createSpace in interface WorkbenchClient
      • compileProject

        public org.guvnor.rest.client.CompileProjectRequest compileProject​(String spaceName,
                                                                           String projectName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/maven/compile
        Specified by:
        compileProject in interface WorkbenchClient
      • compileProject

        public org.guvnor.rest.client.CompileProjectRequest compileProject​(String spaceName,
                                                                           String projectName,
                                                                           String branchName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/branches/{branchName}/maven/compile
        Specified by:
        compileProject in interface WorkbenchClient
      • installProject

        public org.guvnor.rest.client.InstallProjectRequest installProject​(String spaceName,
                                                                           String projectName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/maven/install
        Specified by:
        installProject in interface WorkbenchClient
      • installProject

        public org.guvnor.rest.client.InstallProjectRequest installProject​(String spaceName,
                                                                           String projectName,
                                                                           String branchName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/branches/{branchName}/maven/install
        Specified by:
        installProject in interface WorkbenchClient
      • testProject

        public org.guvnor.rest.client.TestProjectRequest testProject​(String spaceName,
                                                                     String projectName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/maven/test
        Specified by:
        testProject in interface WorkbenchClient
      • testProject

        public org.guvnor.rest.client.TestProjectRequest testProject​(String spaceName,
                                                                     String projectName,
                                                                     String branchName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/branches/{branchName}/maven/test
        Specified by:
        testProject in interface WorkbenchClient
      • deployProject

        public org.guvnor.rest.client.DeployProjectRequest deployProject​(String spaceName,
                                                                         String projectName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/maven/deploy
        Specified by:
        deployProject in interface WorkbenchClient
      • deployProject

        public org.guvnor.rest.client.DeployProjectRequest deployProject​(String spaceName,
                                                                         String projectName,
                                                                         String branchName)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/branches/{branchName}/maven/deploy
        Specified by:
        deployProject in interface WorkbenchClient
      • spacesScreen_postSpace

        public javax.ws.rs.core.Response spacesScreen_postSpace​(org.kie.workbench.common.screens.library.api.SpacesScreenService.NewSpace newSpace)
        Description copied from interface: WorkbenchClient
        [POST] /spacesScreen/spaces
        Specified by:
        spacesScreen_postSpace in interface WorkbenchClient
      • addBranch

        public org.guvnor.rest.client.AddBranchJobRequest addBranch​(String spaceName,
                                                                    String projectName,
                                                                    org.guvnor.rest.client.AddBranchRequest addBranchRequest)
        Description copied from interface: WorkbenchClient
        [POST] /spaces/{spaceName}/projects/{projectName}/branches
        Specified by:
        addBranch in interface WorkbenchClient
      • removeBranch

        public org.guvnor.rest.client.RemoveBranchJobRequest removeBranch​(String spaceName,
                                                                          String projectName,
                                                                          String branchName)
        Description copied from interface: WorkbenchClient
        [DELETE] /spaces/{spaceName}/projects/{projectName}/branches/{branchName}
        Specified by:
        removeBranch in interface WorkbenchClient