Class ParameterServiceImpl
java.lang.Object
org.qubership.atp.dataset.service.direct.impl.ParameterServiceImpl
- All Implemented Interfaces:
IdentifiedService<Parameter>,ParameterService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbulkUpdate(UUID dataSetListId, List<UUID> attrPathIds, List<UUID> dataSetsIds, UUID attributeId, String value, org.springframework.web.multipart.MultipartFile file) booleanUpdates list ofParameter.bulkUploadAttachment(UUID dataSetListId, List<UUID> dataSetsIds, UUID attributeId, org.springframework.web.multipart.MultipartFile file, List<UUID> attrPathIds) voidclearAttachment(UUID parameterId) Copy Parameters to attribute.Create parameter.booleanbooleanvoiddeleteParamSelectJavers(UUID attributeId, UUID dataSetId, UUID datasetListId, List<UUID> attrPathIds, boolean isJavers) Delete parameter without snapshot.booleanexistsById(UUID id) getAll()getByAttributeIdAndDatasetIds(UUID attributeId, Set<UUID> datasetIds) Get patameters by attribute id and dataset ids.getByDataSetIdAttributeId(UUID dataSetId, UUID attrId) get parameter by dataset and attribute id.getOrCreateByDataSetIdAttributeId(UUID dataSetId, UUID attrId) Get parameter by dataset and attribute id.getOrCreateOverlap(UUID dsId, UUID targetAttrId, List<UUID> attrPathIds) getOverlap(UUID dsId, UUID attributeId, List<UUID> attributePathIds) getOverlaps(UUID targetAttributeId, Predicate<AttributePath> filter) List<?> getParametersAffectedByListValue(UUID listValueId, boolean withDsl) getParametersAffectedByListValues(List<UUID> listValueIds) set(UUID dsId, UUID targetAttrId, List<UUID> attrPathIds, String stringValue, UUID dsRef, UUID listValueRef) Creates or updates value ofParameterorParameterOverlap.setParamSelectJavers(UUID dsId, UUID targetAttrId, List<UUID> attrPathIds, String stringValue, UUID dsRef, UUID listValueRef, boolean isJavers) Creates or updates value ofParameterorParameterOverlap.booleanupload(UUID parameterUuid, String contentType, String fileName, InputStream file) upload(UUID datasetId, UUID attributeId, List<UUID> attrPathIds, String contentType, String fileName, InputStream file)
-
Constructor Details
-
ParameterServiceImpl
public ParameterServiceImpl()
-
-
Method Details
-
create
@Transactional @Nonnull public Parameter create(@Nonnull UUID dsId, @Nonnull UUID attrId, @Nullable String text, @Nullable UUID listValueReference, @Nullable UUID referenceDataSet) Create parameter.- Specified by:
createin interfaceParameterService
-
setParamSelectJavers
@NotNull @Transactional @CacheEvict(value="ATP_DATASETS_DATASET_LIST_CONTEXT_CACHE_OS", key="#dsId") public Parameter setParamSelectJavers(@NotNull UUID dsId, @NotNull UUID targetAttrId, @Nullable List<UUID> attrPathIds, @Nullable String stringValue, @Nullable UUID dsRef, @Nullable UUID listValueRef, boolean isJavers) Creates or updates value ofParameterorParameterOverlap. Without Snapshot- Specified by:
setParamSelectJaversin interfaceParameterService- Parameters:
attrPathIds- should be specified if you want an overlap value.isJavers- Specifies whether Javers is enabled or disabled (Versioning)
-
set
@Nonnull @Transactional public Parameter set(@Nonnull UUID dsId, @Nonnull UUID targetAttrId, @Nullable List<UUID> attrPathIds, @Nullable String stringValue, @Nullable UUID dsRef, @Nullable UUID listValueRef) Creates or updates value ofParameterorParameterOverlap.- Specified by:
setin interfaceParameterService- Parameters:
attrPathIds- should be specified if you want an overlap value.
-
set
@Nonnull public Parameter set(@Nonnull UUID dsId, @Nonnull UUID targetAttrId, @Nonnull String value, List<UUID> attrPathIds) - Specified by:
setin interfaceParameterService
-
bulkUpdateValue
@Transactional public boolean bulkUpdateValue(@Nullable String stringValue, @Nullable UUID dsRef, @Nullable UUID listValueRef, @Nonnull List<UUID> parameterIds) Updates list ofParameter. Do not use it for file orParameterOverlap.- Specified by:
bulkUpdateValuein interfaceParameterService
-
upload
public FileData upload(UUID datasetId, UUID attributeId, List<UUID> attrPathIds, String contentType, String fileName, InputStream file) - Specified by:
uploadin interfaceParameterService
-
upload
- Specified by:
uploadin interfaceParameterService
-
bulkUploadAttachment
public List<FileData> bulkUploadAttachment(UUID dataSetListId, List<UUID> dataSetsIds, UUID attributeId, org.springframework.web.multipart.MultipartFile file, List<UUID> attrPathIds) - Specified by:
bulkUploadAttachmentin interfaceParameterService
-
bulkUpdate
public List<Object> bulkUpdate(UUID dataSetListId, List<UUID> attrPathIds, List<UUID> dataSetsIds, UUID attributeId, String value, org.springframework.web.multipart.MultipartFile file) - Specified by:
bulkUpdatein interfaceParameterService
-
clearAttachment
- Specified by:
clearAttachmentin interfaceParameterService
-
update
- Specified by:
updatein interfaceParameterService
-
get
- Specified by:
getin interfaceIdentifiedService<Parameter>
-
existsById
- Specified by:
existsByIdin interfaceIdentifiedService<Parameter>
-
getAll
- Specified by:
getAllin interfaceIdentifiedService<Parameter>
-
delete
- Specified by:
deletein interfaceParameterService
-
delete
@Transactional public boolean delete(@Nonnull UUID attributeId, @Nonnull UUID dataSetId, UUID datasetListId, List<UUID> attrPathIds) - Specified by:
deletein interfaceParameterService
-
deleteParamSelectJavers
@Transactional public void deleteParamSelectJavers(@Nonnull UUID attributeId, @Nonnull UUID dataSetId, UUID datasetListId, List<UUID> attrPathIds, boolean isJavers) Delete parameter without snapshot.- Specified by:
deleteParamSelectJaversin interfaceParameterService
-
copy
@Transactional public Parameter copy(@Nonnull DataSet newParentDs, @Nonnull Parameter parameter, @Nullable Map<UUID, UUID> attributes) Copy Parameters to attribute.- Specified by:
copyin interfaceParameterService- Parameters:
attributes- - mapping of old and new attributes if ds copied to another dsl.
-
getByDataSetIdAttributeId
get parameter by dataset and attribute id.- Specified by:
getByDataSetIdAttributeIdin interfaceParameterService
-
getByAttributeIdAndDatasetIds
@Nullable public List<Parameter> getByAttributeIdAndDatasetIds(@Nonnull UUID attributeId, @Nonnull Set<UUID> datasetIds) Get patameters by attribute id and dataset ids.- Specified by:
getByAttributeIdAndDatasetIdsin interfaceParameterService
-
getOrCreateByDataSetIdAttributeId
Get parameter by dataset and attribute id. If it doesn't exist - create new.- Specified by:
getOrCreateByDataSetIdAttributeIdin interfaceParameterService
-
getOrCreateOverlap
- Specified by:
getOrCreateOverlapin interfaceParameterService
-
getOverlap
@Nullable public ParameterOverlap getOverlap(@Nonnull UUID dsId, @Nonnull UUID attributeId, @Nonnull List<UUID> attributePathIds) - Specified by:
getOverlapin interfaceParameterService
-
getOverlaps
public Stream<ParameterOverlap> getOverlaps(@Nonnull UUID targetAttributeId, @Nonnull Predicate<AttributePath> filter) - Specified by:
getOverlapsin interfaceParameterService
-
getParametersAffectedByListValue
- Specified by:
getParametersAffectedByListValuein interfaceParameterService
-
getParametersAffectedByListValues
- Specified by:
getParametersAffectedByListValuesin interfaceParameterService
-