Class DataSetListController

java.lang.Object
org.qubership.atp.dataset.service.rest.server.DataSetListController

@RestController @RequestMapping("/dsl") public class DataSetListController extends Object
  • Constructor Details

    • DataSetListController

      public DataSetListController()
  • Method Details

    • create

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),#vaId,\'CREATE\')") @PutMapping("/va/{vaId}") public org.springframework.http.ResponseEntity<UUID> create(@PathVariable("vaId") UUID vaId, @RequestParam("name") String name, @RequestParam(value="testPlan",required=false) UUID testPlanId, javax.servlet.http.HttpServletRequest request)
      Creates new DSL with name provided.
    • delete

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'DELETE\')") @DeleteMapping("/{dataSetListId}") @ResponseStatus(NO_CONTENT) public void delete(@PathVariable("dataSetListId") UUID dataSetListId)
      Deletes selected DSL.
    • getDataSetLists

      @GetMapping public List<DataSetList> getDataSetLists()
      Returns all dataSetLists. // Method is UNUSED
    • getDataSetLists

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),#visibilityArea,\'READ\')") @GetMapping("/va/{vaId}") public List<DataSetList> getDataSetLists(@PathVariable("vaId") UUID visibilityArea, @RequestParam(value="label",required=false) String labelName)
      Returns all dataSetLists for selected visibility area.
    • getDataSetListInfo

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}") public Object getDataSetListInfo(@PathVariable("dataSetListId") UUID dataSetListId, @PathVariable(value="filterDs",required=false) List<UUID> filterByDatasets, @PathVariable(value="filterAttr",required=false) List<UUID> filterByAttributes, @RequestParam(value="flat",required=false) QueryParamFlag flat, @RequestParam(value="new",required=false) QueryParamFlag newOne, @RequestParam(value="evaluate",required=false) QueryParamFlag evaluate)
      Returns FlatDataImpl if flag is specified
      or DataSetList otherwise.
    • getDataSetListInfo

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @PostMapping("/{dataSetListId}/filters") public Object getDataSetListInfo(@PathVariable("dataSetListId") UUID dataSetListId, @RequestBody(required=false) @Nullable FilterPair<List<UUID>,List<UUID>> body, @RequestParam(value="evaluate",required=false) QueryParamFlag evaluate, @RequestParam(value="startIndex",required=false) Integer startIndex, @RequestParam(value="endIndex",required=false) Integer endIndex, @RequestParam(value="sort",required=false) Boolean isSortEnabled, @RequestParam(value="expandAll",required=false,defaultValue="true") boolean expandAll)
      Returns DataSetList information with filters.
    • getDataSetInfoByDataSetListIdAndId

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/ds/{ds}") public Object getDataSetInfoByDataSetListIdAndId(@PathVariable("dataSetListId") UUID dataSetListId, @PathVariable("ds") UUID dsId)
    • getDataSetListFullInfo

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/full") public List<DataSet> getDataSetListFullInfo(@PathVariable("dataSetListId") UUID dataSetListId)
      Returns datasets full information of the selected DSL.
    • getDataSets

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/ds") public List<DataSet> getDataSets(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam(value="skipEvaluate",required=false) QueryParamFlag skipEvaluate, @RequestParam(value="label",required=false) String labelName)
    • getDataSetsWithNameAndDataSetList

      @PreAuthorize("@entityAccess.isAuthenticated()") @PostMapping("/ds/all") public List<DatasetResponse> getDataSetsWithNameAndDataSetList(@RequestBody List<UUID> dataSetListIds)
      List of dataset with DataSetId, Name, DataSetListId.
    • rename

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'UPDATE\')") @PostMapping("/{dataSetListId}") public org.springframework.http.ResponseEntity<Boolean> rename(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam(value="name",required=false) String name, @RequestParam(value="testPlan",required=false) UUID testPlanId, @RequestParam(value="clearTestPlan",required=false) QueryParamFlag clearTestPlan, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen)
      Modify dsl: rename or add test plan.
    • addLabel

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'UPDATE\')") @PutMapping("/{dataSetListId}/label") public org.springframework.http.ResponseEntity<Label> addLabel(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam("name") String name, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen)
      Adds new dataSetListLabel with name provided.
    • getLabels

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/label") public List<Label> getLabels(@PathVariable("dataSetListId") UUID dataSetListId)
      Returns dataSetListLabels.
    • deleteLabel

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'UPDATE\')") @DeleteMapping("/{dataSetListId}/label/{labelId}") public org.springframework.http.ResponseEntity<Boolean> deleteLabel(@PathVariable("dataSetListId") UUID dataSetListId, @PathVariable("labelId") UUID labelId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen)
      Deletes dataSetListLabel.
    • copy

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),#vaId,\'CREATE\')") @PutMapping("/va/{vaId}/dsl/{dataSetListId}/copy") public UUID copy(@PathVariable("dataSetListId") UUID dataSetListId, @PathVariable("vaId") UUID vaId, @RequestParam("name") String name, @RequestParam(value="type",required=false) Boolean withData, @RequestParam(value="testPlan",required=false) UUID testPlanId) throws Exception
      Create copy of dataSetList.
      Parameters:
      dataSetListId - - dsl id
      vaId - - visibility area id
      name - - new dsl name
      withData - - true - with, false - without
      Returns:
      - id of new dsl
      Throws:
      Exception
    • copy

      @PreAuthorize("@entityAccess.isAuthenticated()") @PostMapping("/copy") public List<CopyDataSetListsResponse> copy(@RequestBody CopyDataSetListsRequest request)
      Create copies of dataSetLists.
    • copyBulk

      @PreAuthorize("@entityAccess.isAuthenticated()") @PostMapping("/ds/clone/bulk") public Map<UUID,org.apache.commons.lang3.tuple.Pair<UUID,UUID>> copyBulk(@RequestParam("name") String name, @RequestBody Map<UUID,Set<UUID>> data)
      Create copy of dataSetLists and dataSets in it.
      Parameters:
      name - - new DSL name
      data - - DSL to copy with it's DSs to copy
      Returns:
      - structure which contains mapping of old DS and pair of new DS and DSL
    • getAffectedAttributes

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/getAffected") public PaginationResponse<TableResponse> getAffectedAttributes(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam(required=false) Integer page, @RequestParam(required=false) Integer size)
      Get affected attribute by dsl.
    • getAffectedAttributesCount

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/getAffectedCount") public Long getAffectedAttributesCount(@PathVariable("dataSetListId") UUID dataSetListId)
      Get affected attribute count by dsl.
    • getAffectedDataSetLists

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/getAffectedDSL") @ResponseStatus(PARTIAL_CONTENT) public org.springframework.http.ResponseEntity<List<AffectedDataSetList>> getAffectedDataSetLists(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam(value="limit",required=false,defaultValue="10") Integer limit, @RequestParam(value="offset",required=false,defaultValue="0") Integer offset)
    • getModifiedWhen

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/modifiedWhen") public org.springframework.http.ResponseEntity<Timestamp> getModifiedWhen(@PathVariable("dataSetListId") UUID dataSetListId)
    • getCyclesCheck

      @PreAuthorize("@entityAccess.isAuthenticated()") @GetMapping("/cyclesCheck") public CyclesCheckResult getCyclesCheck()
      Checks DSL on cycles and returns results.
    • getDependencies

      @PreAuthorize("@entityAccess.isAuthenticated()") @PostMapping("/dependencies") public List<DataSetListDependencyNode> getDependencies(@RequestBody List<UUID> dataSetListIds)
      Get dsl dependencies tree.
    • existsById

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/{dataSetListId}/exists") public org.springframework.http.ResponseEntity<Void> existsById(@PathVariable("dataSetListId") UUID dataSetListId)
    • getDependenciesRecursive

      @PreAuthorize("@entityAccess.isAuthenticated()") @PostMapping("/dependenciesRecursive") public List<DataSetListDependencyNode> getDependenciesRecursive(@RequestBody List<UUID> dataSetListIds)
      Get dsl dependencies tree.
    • exportDataSetList

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @PostMapping(path="/{dataSetListId}/export/excel") public org.springframework.http.ResponseEntity<org.springframework.core.io.InputStreamResource> exportDataSetList(@PathVariable("dataSetListId") UUID dataSetListId)
      Export data set list to excel file.
    • importDataSetList

      @PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).DATASET_LIST.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'UPDATE\')") @PostMapping("/{dataSetListId}/import/excel") public DatasetListImportResponse importDataSetList(@RequestParam UUID projectId, @PathVariable UUID dataSetListId, javax.servlet.http.HttpServletRequest request, @RequestParam(value="versioning",required=false,defaultValue="false") Boolean isJavers) throws Exception
      Import data set list from excel file.
      Throws:
      Exception