Class MarketPlaceCatalogServiceController


  • @Controller
    @RequestMapping("/")
    public class MarketPlaceCatalogServiceController
    extends AbstractController
    • Constructor Detail

      • MarketPlaceCatalogServiceController

        public MarketPlaceCatalogServiceController()
    • Method Detail

      • getSolutionsDetails

        @RequestMapping(value="/solutions/{solutionId}/{revisionId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> getSolutionsDetails​(javax.servlet.http.HttpServletRequest request,
                                                            @PathVariable("solutionId")
                                                            String solutionId,
                                                            @PathVariable("revisionId")
                                                            String revisionId,
                                                            javax.servlet.http.HttpServletResponse response)
      • getSearchSolutions

        @RequestMapping(value="/searchSolutions",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLSolution>> getSearchSolutions​(javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response,
                                                                 @RequestParam(value="search",required=true)
                                                                 String search)
      • getPaginatedList

        @RequestMapping(value="/paginatedSolutions",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.transport.RestPageResponse<org.acumos.cds.domain.MLPSolution>> getPaginatedList​(@RequestBody
                                                                                                                           JsonRequest<MLSolution> mlSolution)
        Parameters:
        mlSolution - Solution
        Returns:
        List of Paginated ML Solutions in JSON format.
      • updateSolutionDetails

        @RequestMapping(value="/solutions/{solutionId}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> updateSolutionDetails​(javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response,
                                                              @PathVariable("solutionId")
                                                              String solutionId,
                                                              @RequestBody
                                                              JsonRequest<MLSolution> mlSolution)
      • deleteSolutionArtifacts

        @RequestMapping(value="/solutions/{solutionId}/{revisionId}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> deleteSolutionArtifacts​(javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response,
                                                                @PathVariable("solutionId")
                                                                String solutionId,
                                                                @PathVariable("revisionId")
                                                                String revisionId,
                                                                @RequestBody
                                                                JsonRequest<MLSolution> mlSolution)
      • getSolutionsRevisionList

        @RequestMapping(value="/solutions/{solutionId}/revisions",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<org.acumos.cds.domain.MLPSolutionRevision>> getSolutionsRevisionList​(javax.servlet.http.HttpServletRequest request,
                                                                                                      javax.servlet.http.HttpServletResponse response,
                                                                                                      @PathVariable("solutionId")
                                                                                                      String solutionId)
        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        solutionId - solution ID
        Returns:
        List of Published ML Solutions in JSON format.
      • getSolutionsRevisionArtifactList

        @RequestMapping(value="/solutions/{solutionId}/revisions/{revisionId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLArtifact>> getSolutionsRevisionArtifactList​(javax.servlet.http.HttpServletRequest request,
                                                                               javax.servlet.http.HttpServletResponse response,
                                                                               @PathVariable("solutionId")
                                                                               String solutionId,
                                                                               @PathVariable("revisionId")
                                                                               String revisionId)
        Parameters:
        request - HttpServletRequest
        response - HttpServletResponse
        solutionId - solution ID
        revisionId - revision ID
        Returns:
        List of Published ML Solutions in JSON format.
      • addSolutionTag

        @RequestMapping(value="/addTag/{solutionId}/tag/{tag}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> addSolutionTag​(javax.servlet.http.HttpServletRequest request,
                                                       @PathVariable("solutionId")
                                                       String solutionId,
                                                       @PathVariable("tag")
                                                       String tag,
                                                       javax.servlet.http.HttpServletResponse response)
      • dropSolutionTag

        @RequestMapping(value="/dropTag/{solutionId}/tag/{tag}",
                        method=DELETE,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> dropSolutionTag​(javax.servlet.http.HttpServletRequest request,
                                                        @PathVariable("solutionId")
                                                        String solutionId,
                                                        @PathVariable("tag")
                                                        String tag,
                                                        javax.servlet.http.HttpServletResponse response)
      • getTagsList

        @RequestMapping(value="/tags",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RestPageResponseBE> getTagsList​(@RequestBody
                                                            JsonRequest<org.acumos.cds.transport.RestPageRequest> restPageReq)
        Parameters:
        restPageReq - rest page request
        Returns:
        Rest page response
      • getPreferredTagsList

        @RequestMapping(value="/preferredTags/{userId}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RestPageResponseBE> getPreferredTagsList​(@RequestBody
                                                                     JsonRequest<org.acumos.cds.transport.RestPageRequest> restPageReq,
                                                                     @PathVariable("userId")
                                                                     String userId)
      • getSolutionUserAccess

        @RequestMapping(value="solution/userAccess/{solutionId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RestPageResponseBE> getSolutionUserAccess​(javax.servlet.http.HttpServletRequest request,
                                                                      @PathVariable("solutionId")
                                                                      String solutionId,
                                                                      javax.servlet.http.HttpServletResponse response)
      • addSolutionUserAccess

        @RequestMapping(value="solution/userAccess/{solutionId}/add",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<User> addSolutionUserAccess​(javax.servlet.http.HttpServletRequest request,
                                                        @PathVariable("solutionId")
                                                        String solutionId,
                                                        @RequestBody
                                                        JsonRequest<List<String>> userId,
                                                        javax.servlet.http.HttpServletResponse response)
      • dropSolutionUserAccess

        @RequestMapping(value="solution/userAccess/{solutionId}/delete/{userId}",
                        method=DELETE,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<User> dropSolutionUserAccess​(javax.servlet.http.HttpServletRequest request,
                                                         @PathVariable("solutionId")
                                                         String solutionId,
                                                         @PathVariable("userId")
                                                         String userId,
                                                         javax.servlet.http.HttpServletResponse response)
      • incrementSolutionViewCount

        @RequestMapping(value="solution/updateViewCount/{solutionId}",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> incrementSolutionViewCount​(javax.servlet.http.HttpServletRequest request,
                                                                   @PathVariable("solutionId")
                                                                   String solutionId,
                                                                   javax.servlet.http.HttpServletResponse response)
      • createSolutionRating

        @RequestMapping(value="solution/createRating",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> createSolutionRating​(javax.servlet.http.HttpServletRequest request,
                                                             @RequestBody
                                                             JsonRequest<org.acumos.cds.domain.MLPSolutionRating> mlpSolutionRating,
                                                             javax.servlet.http.HttpServletResponse response)
      • updateSolutionRating

        @RequestMapping(value="solution/updateRating",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> updateSolutionRating​(javax.servlet.http.HttpServletRequest request,
                                                             @RequestBody
                                                             JsonRequest<org.acumos.cds.domain.MLPSolutionRating> mlpSolutionRating,
                                                             javax.servlet.http.HttpServletResponse response)
      • getMySharedModels

        @RequestMapping(value="solutions/shared/{userId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLSolution>> getMySharedModels​(javax.servlet.http.HttpServletRequest request,
                                                                @PathVariable("userId")
                                                                String userId,
                                                                javax.servlet.http.HttpServletResponse response)
      • createSolutionFavorite

        @RequestMapping(value="solution/createFavorite",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> createSolutionFavorite​(javax.servlet.http.HttpServletRequest request,
                                                               @RequestBody
                                                               JsonRequest<org.acumos.cds.domain.MLPSolutionFavorite> mlpSolutionFavorite,
                                                               javax.servlet.http.HttpServletResponse response)
      • deleteSolutionFavorite

        @RequestMapping(value="solution/deleteFavorite",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolution> deleteSolutionFavorite​(javax.servlet.http.HttpServletRequest request,
                                                               @RequestBody
                                                               JsonRequest<org.acumos.cds.domain.MLPSolutionFavorite> mlpSolutionFavorite,
                                                               javax.servlet.http.HttpServletResponse response)
      • getFavoriteSolutions

        @RequestMapping(value="solution/getFavoriteSolutions/{userId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<MLSolution>> getFavoriteSolutions​(javax.servlet.http.HttpServletRequest request,
                                                                   @PathVariable("userId")
                                                                   String userId,
                                                                   javax.servlet.http.HttpServletResponse response)
      • readArtifactSolutions

        @RequestMapping(value="/readArtifactSolutions/{artifactId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public String readArtifactSolutions​(@PathVariable("artifactId")
                                            String artifactId,
                                            javax.servlet.http.HttpServletRequest request,
                                            javax.servlet.http.HttpServletResponse response)
      • getSolutionRatings

        @RequestMapping(value="solution/getRating/{solutionId}",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.transport.RestPageResponse<MLSolutionRating>> getSolutionRatings​(@PathVariable
                                                                                                            String solutionId,
                                                                                                            @RequestBody
                                                                                                            JsonRequest<org.acumos.cds.transport.RestPageRequest> pageRequest)
      • createTag

        @RequestMapping(value="tags/create",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.domain.MLPTag> createTag​(javax.servlet.http.HttpServletRequest request,
                                                                    @RequestBody
                                                                    JsonRequest<org.acumos.cds.domain.MLPTag> mlpTag,
                                                                    javax.servlet.http.HttpServletResponse response)
      • getUserRatings

        @RequestMapping(value="/solutions/ratings/{solutionId}/user/{userId}",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.domain.MLPSolutionRating> getUserRatings​(javax.servlet.http.HttpServletRequest request,
                                                                                    @PathVariable("solutionId")
                                                                                    String solutionId,
                                                                                    @PathVariable("userId")
                                                                                    String userId,
                                                                                    javax.servlet.http.HttpServletResponse response)
      • findPortalSolutions

        @RequestMapping(value="/portal/solutions",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RestPageResponseBE<MLSolution>> findPortalSolutions​(javax.servlet.http.HttpServletRequest request,
                                                                                @RequestBody
                                                                                JsonRequest<RestPageRequestPortal> restPageReqPortal,
                                                                                javax.servlet.http.HttpServletResponse response)
      • findPublicPortalSolutions

        @RequestMapping(value="/portal/solutions/public",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RestPageResponseBE<MLSolution>> findPublicPortalSolutions​(javax.servlet.http.HttpServletRequest request,
                                                                                      @RequestBody
                                                                                      JsonRequest<RestPageRequestPortal> restPageReqPortal,
                                                                                      javax.servlet.http.HttpServletResponse response)
      • searchSolutionsByKeyword

        @RequestMapping(value="/searchSolutionBykeyword",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RestPageResponseBE<MLSolution>> searchSolutionsByKeyword​(javax.servlet.http.HttpServletRequest request,
                                                                                     @RequestBody
                                                                                     JsonRequest<RestPageRequestPortal> restPageReqPortal,
                                                                                     javax.servlet.http.HttpServletResponse response)
      • getUserAccessSolutions

        @RequestMapping(value="userAccess/solution/{userId}",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.transport.RestPageResponse<org.acumos.cds.domain.MLPSolution>> getUserAccessSolutions​(@PathVariable("userId")
                                                                                                                                 String userId,
                                                                                                                                 @RequestBody
                                                                                                                                 JsonRequest<org.acumos.cds.transport.RestPageRequest> pageRequest)
      • getAvgRatingsForSol

        @RequestMapping(value="solution/avgRating/{solutionId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<MLSolutionWeb> getAvgRatingsForSol​(@PathVariable
                                                               String solutionId)
      • fetchProtoFile

        @RequestMapping(value="/getProtoFile",
                        method=GET,
                        produces="text/plain")
        @ResponseBody
        public String fetchProtoFile​(@RequestParam(value="solutionId",required=true)
                                     String solutionId,
                                     @RequestParam(value="version",required=true)
                                     String version)
                              throws AcumosServiceException
        Parameters:
        solutionId - Solution ID
        version - Version
        Returns:
        Protobuf file details
        Throws:
        AcumosServiceException
      • fetchLicenseFile

        @RequestMapping(value="/getLicenseFile",
                        method=GET,
                        produces="text/plain")
        @ResponseBody
        public String fetchLicenseFile​(@RequestParam(value="solutionId",required=true)
                                       String solutionId,
                                       @RequestParam(value="version",required=true)
                                       String version)
                                throws AcumosServiceException
        Parameters:
        solutionId - Solution ID
        version - Version
        Returns:
        License file details
        Throws:
        AcumosServiceException
      • getCloudEnabledList

        @RequestMapping(value="/cloudEnabled",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getCloudEnabledList​(javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
      • getAuthors

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/authors",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<Author>> getAuthors​(@PathVariable
                                                     String solutionId,
                                                     @PathVariable
                                                     String revisionId,
                                                     javax.servlet.http.HttpServletResponse response)
      • addAuthors

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/authors",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<Author>> addAuthors​(javax.servlet.http.HttpServletRequest request,
                                                     @PathVariable
                                                     String solutionId,
                                                     @PathVariable
                                                     String revisionId,
                                                     @RequestBody
                                                     JsonRequest<Author> authorReq,
                                                     javax.servlet.http.HttpServletResponse response)
      • removeAuthor

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/removeAuthor",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<Author>> removeAuthor​(javax.servlet.http.HttpServletRequest request,
                                                       @PathVariable
                                                       String solutionId,
                                                       @PathVariable
                                                       String revisionId,
                                                       @RequestBody
                                                       JsonRequest<Author> authorReq,
                                                       javax.servlet.http.HttpServletResponse response)
      • getPublisher

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/publisher",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> getPublisher​(javax.servlet.http.HttpServletRequest request,
                                                 @PathVariable
                                                 String solutionId,
                                                 @PathVariable
                                                 String revisionId,
                                                 javax.servlet.http.HttpServletResponse response)
      • addPublisher

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/publisher",
                        method=PUT,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<String> addPublisher​(javax.servlet.http.HttpServletRequest request,
                                                 @PathVariable
                                                 String solutionId,
                                                 @PathVariable
                                                 String revisionId,
                                                 @RequestBody
                                                 String publisher,
                                                 javax.servlet.http.HttpServletResponse response)
      • addRevisionDocument

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/{catalogId}/document",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        @Async("repositoryTaskExecutor")
        public CompletableFuture<JsonResponse<org.acumos.cds.domain.MLPDocument>> addRevisionDocument​(javax.servlet.http.HttpServletRequest request,
                                                                                                      @PathVariable
                                                                                                      String solutionId,
                                                                                                      @PathVariable
                                                                                                      String revisionId,
                                                                                                      @PathVariable
                                                                                                      String catalogId,
                                                                                                      @RequestParam("file")
                                                                                                      org.springframework.web.multipart.MultipartFile file,
                                                                                                      javax.servlet.http.HttpServletResponse response)
      • removeRevisionDocument

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/{catalogId}/document/{documentId}",
                        method=DELETE,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<org.acumos.cds.domain.MLPDocument> removeRevisionDocument​(javax.servlet.http.HttpServletRequest request,
                                                                                      @PathVariable
                                                                                      String solutionId,
                                                                                      @PathVariable
                                                                                      String revisionId,
                                                                                      @PathVariable
                                                                                      String catalogId,
                                                                                      @PathVariable
                                                                                      String documentId,
                                                                                      javax.servlet.http.HttpServletResponse response)
      • getRevisionDocument

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/{catalogId}/document",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<org.acumos.cds.domain.MLPDocument>> getRevisionDocument​(javax.servlet.http.HttpServletRequest request,
                                                                                         @PathVariable
                                                                                         String solutionId,
                                                                                         @PathVariable
                                                                                         String revisionId,
                                                                                         @PathVariable
                                                                                         String catalogId,
                                                                                         javax.servlet.http.HttpServletResponse response)
      • copyRevisionDocuments

        @RequestMapping(value="/solution/{solutionId}/revision/{revisionId}/{catalogId}/copyDocuments/{fromRevisionId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<List<org.acumos.cds.domain.MLPDocument>> copyRevisionDocuments​(javax.servlet.http.HttpServletRequest request,
                                                                                           @PathVariable
                                                                                           String solutionId,
                                                                                           @PathVariable
                                                                                           String revisionId,
                                                                                           @PathVariable
                                                                                           String catalogId,
                                                                                           @PathVariable
                                                                                           String fromRevisionId,
                                                                                           javax.servlet.http.HttpServletResponse response)
      • getSolRevDescription

        @RequestMapping(value="/solution/revision/{revisionId}/{catalogId}/description",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RevisionDescription> getSolRevDescription​(javax.servlet.http.HttpServletRequest request,
                                                                      @PathVariable
                                                                      String revisionId,
                                                                      @PathVariable
                                                                      String catalogId,
                                                                      javax.servlet.http.HttpServletResponse response)
      • addSolRevDescription

        @RequestMapping(value="/solution/revision/{solutionId}/{revisionId}/{catalogId}/description",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<RevisionDescription> addSolRevDescription​(javax.servlet.http.HttpServletRequest request,
                                                                      @PathVariable
                                                                      String solutionId,
                                                                      @PathVariable
                                                                      String revisionId,
                                                                      @PathVariable
                                                                      String catalogId,
                                                                      @RequestBody
                                                                      JsonRequest<RevisionDescription> revisionDescription,
                                                                      javax.servlet.http.HttpServletResponse response)
      • getSolutionImage

        @RequestMapping(value="/solutions/{solutionId}/picture",
                        method=GET,
                        produces="image/jpeg")
        @ResponseBody
        public org.springframework.http.ResponseEntity<byte[]> getSolutionImage​(@PathVariable("solutionId")
                                                                                String solutionId,
                                                                                @RequestHeader(value="If-Modified-Since",required=false)
                                                                                String ifModifiedSince)
      • updateSolutionImage

        @RequestMapping(value="/solutions/{solutionId}/picture",
                        method=POST,
                        produces="application/json")
        @ResponseBody
        public JsonResponse<Boolean> updateSolutionImage​(javax.servlet.http.HttpServletRequest request,
                                                         @RequestParam("file")
                                                         org.springframework.web.multipart.MultipartFile file,
                                                         @PathVariable("solutionId")
                                                         String solutionId,
                                                         javax.servlet.http.HttpServletResponse response)
      • verifySolutionRevision

        @Async("repositoryTaskExecutor")
        @RequestMapping(value="/solutions/{solutionId}/revisions/{revisionId}/verify/{workflowId}",
                        method=GET,
                        produces="application/json")
        @ResponseBody
        public CompletableFuture<JsonResponse<VerifySolutionActionResponse>> verifySolutionRevision​(javax.servlet.http.HttpServletRequest request,
                                                                                                    @PathVariable("solutionId")
                                                                                                    String solutionId,
                                                                                                    @PathVariable("revisionId")
                                                                                                    String revisionId,
                                                                                                    @PathVariable("workflowId")
                                                                                                    String workflowId,
                                                                                                    javax.servlet.http.HttpServletResponse response)