Class DataSetListServiceImpl
java.lang.Object
org.qubership.atp.dataset.service.direct.impl.DataSetListServiceImpl
- All Implemented Interfaces:
DataSetListService,IdentifiedService<DataSetList>,LabelProviderService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckOnDuplicate(UUID visibilityArea, String newNameDsl) Check new name of DSL on duplicate.Copy of dataSetLists and dataSets in it.Copy data set list.Creates DSL.voidDeletes DS by id.voidevictAllAffectedDatasetsFromContextCacheByDslId(UUID updatedDataSetListId) Evict affected datasets from ATP_DATASETS_DATASET_LIST_CONTEXT_CACHE cache.booleanexistsById(UUID dataSetListId) Check if dsl exists.getAffectedAttributes(UUID dataSetListId) Get affected attribute by dsl.getAffectedAttributes(UUID dataSetListId, Integer page, Integer size) Get affected attribute by dsl.getAffectedAttributesCount(UUID dataSetListId) Get affected DSL count by dataSetListId.getAffectedDataSetLists(UUID dataSetListId, Integer limit, Integer offset) Get affected DSL by dataSetListId.getAll()Returns dataSet lists bulk.Returns dataSet lists.To get as tree without any filters.getAsTree(UUID id, boolean evaluate, Collection<UUID> dataSetsFilter, boolean isSortEnabled) To get as tree with filter by datasets only.getAsTree(UUID id, boolean evaluate, Collection<UUID> dataSetsFilter, Collection<UUID> attributesFilter, Integer startIndex, Integer endIndex, boolean isSortEnabled, boolean expandAll) To get as tree with filter by datasets and attributes.getByNameUnderVisibilityArea(UUID visibilityArea, String name) getChildren(UUID dataSetListId, boolean evaluate, String label) Returns all datasets under targetDataSetList.Returns dataSetListLabels.getListOfDsIdsAndNameAndDslId(List<UUID> dataSetListIds) Get list of dsId, dsNme, dslId for each datasetlist.getModifiedWhen(UUID dataSetListId) Get modifiedWhen by dataSetListId.Adds new dataSetListLabel with name provided.booleanRename dsl or add test plan to dsl.booleanvoidrevert(UUID sagaSessionId, RevertRequest request) booleanDeletes dataSetListLabel.voidupdateModifiedFields(UUID dataSetListId, UUID modifiedBy, Timestamp modifiedWhen) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.qubership.atp.dataset.service.direct.DataSetListService
getAll, getChildren
-
Constructor Details
-
DataSetListServiceImpl
public DataSetListServiceImpl()
-
-
Method Details
-
getAsFlat
- Specified by:
getAsFlatin interfaceDataSetListService
-
getAsTree
@Nullable public UiManDataSetList getAsTree(UUID id, boolean evaluate, @Nullable Collection<UUID> dataSetsFilter, @Nullable Collection<UUID> attributesFilter, Integer startIndex, Integer endIndex, boolean isSortEnabled, boolean expandAll) To get as tree with filter by datasets and attributes.- Specified by:
getAsTreein interfaceDataSetListService
-
getAsTree
To get as tree without any filters.- Specified by:
getAsTreein interfaceDataSetListService
-
getAsTree
public UiManDataSetList getAsTree(UUID id, boolean evaluate, Collection<UUID> dataSetsFilter, boolean isSortEnabled) To get as tree with filter by datasets only.- Specified by:
getAsTreein interfaceDataSetListService
-
checkOnDuplicate
Check new name of DSL on duplicate.- Specified by:
checkOnDuplicatein interfaceDataSetListService
-
create
@Transactional @Nonnull public DataSetList create(@Nonnull UUID visibilityArea, @Nonnull String name, @Nullable UUID testPlanId) Creates DSL.- Specified by:
createin interfaceDataSetListService
-
get
- Specified by:
getin interfaceIdentifiedService<DataSetList>
-
getAll
- Specified by:
getAllin interfaceIdentifiedService<DataSetList>
-
getAll
Returns dataSet lists. May filter by label if present.- Specified by:
getAllin interfaceDataSetListService
-
getAll
Returns dataSet lists bulk.- Specified by:
getAllin interfaceDataSetListService
-
modify
@Transactional public boolean modify(@Nonnull UUID dataSetListId, @Nullable String name, @Nullable UUID testPlanId, boolean clearTestPlan) Rename dsl or add test plan to dsl.- Specified by:
modifyin interfaceDataSetListService- Parameters:
dataSetListId- dsl id.name- new name of dsl.testPlanId- new test plan id for dsl.clearTestPlan- true if you want test plan in dsl be null.- Returns:
- success or failure of update entity.
-
rename
- Specified by:
renamein interfaceDataSetListService
-
getByNameUnderVisibilityArea
- Specified by:
getByNameUnderVisibilityAreain interfaceDataSetListService
-
getChildren
@Nonnull public List<DataSet> getChildren(@Nonnull UUID dataSetListId, boolean evaluate, @Nullable String label) Description copied from interface:DataSetListServiceReturns all datasets under targetDataSetList.- Specified by:
getChildrenin interfaceDataSetListService- Parameters:
dataSetListId- - id of targetDataSetList.evaluate- - should apply structure changes or not.label- label name to filter with
-
getListOfDsIdsAndNameAndDslId
@Nonnull public List<DatasetResponse> getListOfDsIdsAndNameAndDslId(@Nonnull List<UUID> dataSetListIds) Get list of dsId, dsNme, dslId for each datasetlist.- Specified by:
getListOfDsIdsAndNameAndDslIdin interfaceDataSetListService- Parameters:
dataSetListIds- dsl ids.- Returns:
- list of DsIdNameDslId.
-
getAffectedAttributes
public PaginationResponse<TableResponse> getAffectedAttributes(UUID dataSetListId, Integer page, Integer size) Get affected attribute by dsl.- Specified by:
getAffectedAttributesin interfaceDataSetListService
-
getAffectedAttributes
Get affected attribute by dsl.- Specified by:
getAffectedAttributesin interfaceDataSetListService
-
updateModifiedFields
- Specified by:
updateModifiedFieldsin interfaceDataSetListService
-
getAffectedDataSetLists
public List<AffectedDataSetList> getAffectedDataSetLists(@Nonnull UUID dataSetListId, @Nullable Integer limit, @Nullable Integer offset) Description copied from interface:DataSetListServiceGet affected DSL by dataSetListId.- Specified by:
getAffectedDataSetListsin interfaceDataSetListService- Parameters:
dataSetListId- DSL idlimit- number of rows that are returnedoffset- number of rows that are skipped- Returns:
- list with DSL id and DSL name
-
getModifiedWhen
Description copied from interface:DataSetListServiceGet modifiedWhen by dataSetListId.- Specified by:
getModifiedWhenin interfaceDataSetListService- Parameters:
dataSetListId- dataSetListId- Returns:
Timestampof modified
-
getAffectedAttributesCount
Description copied from interface:DataSetListServiceGet affected DSL count by dataSetListId.- Specified by:
getAffectedAttributesCountin interfaceDataSetListService- Parameters:
dataSetListId- DSL id- Returns:
- affected DSL count
-
delete
Deletes DS by id.- Specified by:
deletein interfaceDataSetListService
-
copy
@Transactional public DataSetList copy(@Nonnull UUID visibilityArea, @Nonnull UUID dataSetListId, @Nonnull String name, @Nullable Boolean withData, @Nullable UUID testPlanId) Copy data set list.- Specified by:
copyin interfaceDataSetListService
-
copy
@Transactional public Map<UUID,org.apache.commons.lang3.tuple.Pair<UUID, copyUUID>> (String name, Map<UUID, Set<UUID>> data) Copy of dataSetLists and dataSets in it.- Specified by:
copyin interfaceDataSetListService- Parameters:
name- - new DSL namedata- - DSL to copy with it's DSs to copy- Returns:
- - structure wich contains mapping of old DS and pair of new DS and DSL
-
mark
Adds new dataSetListLabel with name provided.- Specified by:
markin interfaceLabelProviderService- Parameters:
dataSetListId- - id of target dataSetList or dataSet.name- - name of label.
-
getLabels
Returns dataSetListLabels.- Specified by:
getLabelsin interfaceLabelProviderService
-
unmark
Deletes dataSetListLabel.- Specified by:
unmarkin interfaceLabelProviderService- Parameters:
dataSetListId- - id of target dataSetList or dataSet.
-
existsById
Description copied from interface:DataSetListServiceCheck if dsl exists.- Specified by:
existsByIdin interfaceDataSetListService- Specified by:
existsByIdin interfaceIdentifiedService<DataSetList>- Parameters:
dataSetListId- DSL id- Returns:
- 'true' if dsl exists, otherwise 'false'
-
evictAllAffectedDatasetsFromContextCacheByDslId
Evict affected datasets from ATP_DATASETS_DATASET_LIST_CONTEXT_CACHE cache.- Specified by:
evictAllAffectedDatasetsFromContextCacheByDslIdin interfaceDataSetListService- Parameters:
updatedDataSetListId- updated dataset list id
-
revert
- Specified by:
revertin interfaceDataSetListService
-