Class AttributeController
java.lang.Object
org.qubership.atp.dataset.service.rest.server.AttributeController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> bulkDeleteListValues(UUID attributeId, List<UUID> listValueIds, UUID dataSetListId, Long modifiedWhen) org.springframework.http.ResponseEntity<AttributeCreateResponse> create(UUID dataSetListId, String name, Integer ordering, AttributeTypeName attributeType, UUID typeDataSetListId, List<String> listValues, Long modifiedWhen, javax.servlet.http.HttpServletRequest request) Creates new attribute with provided parameters.org.springframework.http.ResponseEntity<ListValue> createListValue(UUID attributeId, String value, UUID dataSetListId, Long modifiedWhen, javax.servlet.http.HttpServletRequest request) Creates list value.Creates list values.org.springframework.http.ResponseEntity<Boolean> Deletes selected attribute.org.springframework.http.ResponseEntity<Void> deleteAllByDsl(UUID dataSetListId, Long modifiedWhen) Deletes attributes from the selected dataSetsList.org.springframework.http.ResponseEntity<Void> deleteListValue(UUID attributeId, UUID listValueId, UUID dataSetListId, Long modifiedWhen) Deletes list value from attribute.Returns attribute.getAttributes(UUID dataSetListId) getAttributesInItfFormat(UUID dataSetListId) getOptions(UUID attributeId) Returns options of attribute.getParametersValuesAndDataSetIdsForAttributeValuesSorting(UUID dataSetListId, List<UUID> attrFilterIds, UUID targetAttrId) Filtering of attribute values in all datasets.org.springframework.http.ResponseEntity<Boolean> Renames selected attribute.voidsetPosition(UUID attributeId, Integer position) org.springframework.http.ResponseEntity<Boolean> updateDslReference(UUID attributeId, UUID uuid) Update DSL reference.voidupdateOrdering(List<Pair<UUID, Integer>> attributesOrdering) Update ordering of attributes.
-
Constructor Details
-
AttributeController
public AttributeController()
-
-
Method Details
-
create
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'CREATE\')") @PutMapping("/dsl/{dataSetListId}") public org.springframework.http.ResponseEntity<AttributeCreateResponse> create(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam("name") String name, @RequestParam("ordering") Integer ordering, @RequestParam("type") AttributeTypeName attributeType, @RequestParam(value="typeDataSetListId",required=false) UUID typeDataSetListId, @RequestBody(required=false) List<String> listValues, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen, javax.servlet.http.HttpServletRequest request) Creates new attribute with provided parameters. -
delete
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'DELETE\')") @DeleteMapping("/{attributeId}") @ResponseStatus(NO_CONTENT) public org.springframework.http.ResponseEntity<Boolean> delete(@PathVariable("attributeId") UUID attributeId, @RequestParam(value="dataSetListId",required=false) UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen) Deletes selected attribute. -
deleteAllByDsl
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'DELETE\')") @DeleteMapping("/dsl/{dataSetListId}/all") @ResponseStatus(NO_CONTENT) public org.springframework.http.ResponseEntity<Void> deleteAllByDsl(@PathVariable("dataSetListId") UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen) Deletes attributes from the selected dataSetsList. -
getAttributes
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/dsl/{dataSetListId}") public Collection<Attribute> getAttributes(@PathVariable("dataSetListId") UUID dataSetListId) -
getAttributesInItfFormat
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@dataSetListServiceImpl.get(#dataSetListId).getVisibilityArea().getId(),\'READ\')") @GetMapping("/dsl/{dataSetListId}/itf") public Object getAttributesInItfFormat(@PathVariable("dataSetListId") UUID dataSetListId) -
rename
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @PostMapping("/{attributeId}") public org.springframework.http.ResponseEntity<Boolean> rename(@PathVariable("attributeId") UUID attributeId, @RequestParam("name") String name, @RequestParam(value="dataSetListId",required=false) UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen) Renames selected attribute. -
updateDslReference
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @PutMapping("/{attributeId}/dataSetListReference") public org.springframework.http.ResponseEntity<Boolean> updateDslReference(@PathVariable("attributeId") UUID attributeId, @RequestParam("value") UUID uuid) Update DSL reference. -
get
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'READ\')") @GetMapping("/{attributeId}") public Attribute get(@PathVariable("attributeId") UUID attributeId) Returns attribute. -
getOptions
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'READ\')") @GetMapping("/{attributeId}/options") public Object getOptions(@PathVariable("attributeId") UUID attributeId) Returns options of attribute. -
createListValue
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @PutMapping("/{attributeId}/listValues") public org.springframework.http.ResponseEntity<ListValue> createListValue(@PathVariable("attributeId") UUID attributeId, @RequestParam("value") String value, @RequestParam(value="dataSetListId",required=false) UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen, javax.servlet.http.HttpServletRequest request) Creates list value. -
createListValues
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @PostMapping("/{attributeId}/listValues") public org.springframework.http.ResponseEntity<List<UUID>> createListValues(@PathVariable("attributeId") UUID attributeId, @RequestBody List<String> values, @RequestParam(value="dataSetListId",required=false) UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen) Creates list values. -
deleteListValue
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @DeleteMapping("/{attributeId}/listValues/{listValueId}") @ResponseStatus(NO_CONTENT) public org.springframework.http.ResponseEntity<Void> deleteListValue(@PathVariable("attributeId") UUID attributeId, @PathVariable("listValueId") UUID listValueId, @RequestParam(value="dataSetListId",required=false) UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen) Deletes list value from attribute. -
bulkDeleteListValues
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @DeleteMapping("/{attributeId}/bulk") @ResponseStatus(NO_CONTENT) public org.springframework.http.ResponseEntity<Void> bulkDeleteListValues(@PathVariable("attributeId") UUID attributeId, @RequestParam("listValues") List<UUID> listValueIds, @RequestParam(value="dataSetListId",required=false) UUID dataSetListId, @RequestParam(value="modifiedWhen",required=false) Long modifiedWhen) -
updateOrdering
@PreAuthorize("@entityAccess.isAuthenticated()") @PutMapping("/updateOrdering") public void updateOrdering(@RequestBody List<Pair<UUID, Integer>> attributesOrdering) Update ordering of attributes.- Parameters:
attributesOrdering- info about attributes for updating ({ID, ordering})
-
setPosition
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#attributeId).getDataSetList().getVisibilityArea().getId(),\'UPDATE\')") @PostMapping("/{attributeId}/position") public void setPosition(@PathVariable("attributeId") UUID attributeId, @RequestBody Integer position) -
getParametersValuesAndDataSetIdsForAttributeValuesSorting
@PreAuthorize("@entityAccess.checkAccess(T(org.qubership.atp.dataset.model.UserManagementEntities).ATTRIBUTE.getName(),@attributeServiceImpl.get(#targetAttrId).getDataSetList().getVisibilityArea().getId(),\'READ\')") @PostMapping("/{dataSetListId}/existedValues") public Map<String,List<UUID>> getParametersValuesAndDataSetIdsForAttributeValuesSorting(@PathVariable("dataSetListId") UUID dataSetListId, @RequestBody(required=true) List<UUID> attrFilterIds, @RequestParam(value="targetAttrId",required=true) UUID targetAttrId) Filtering of attribute values in all datasets.- Parameters:
dataSetListId- DatasetList UUIDattrFilterIds- contains attribute Ids as path to target attribute or the targetAttrIdtargetAttrId- attribute UUID to filtering values- Returns:
- attribute values and dataset Ids as Map
-