Class AttributeServiceImpl
java.lang.Object
org.qubership.atp.dataset.service.direct.impl.AttributeServiceImpl
- All Implemented Interfaces:
AttributeService,IdentifiedService<Attribute>
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeServiceImpl(ListValueRepository listValueRepository, AttributeRepository attributeRepository, javax.inject.Provider<DataSetListService> dslServiceProvider, com.fasterxml.jackson.databind.ObjectMapper mapper, DateAuditorService dateAuditorService, DataSetListSnapshotService dataSetListSnapshotService, ParameterRepository parameterRepository, JpaAttributesSortEnabledRepository jpaAttributesSortEnabledRepository, ClearCacheService clearCacheService) Constructor with autowire. -
Method Summary
Modifier and TypeMethodDescriptioncopy(DataSetList newParentDsl, Attribute attribute, int ordering) create(UUID dslId, Integer order, String name, AttributeType type, UUID dslRefId, List<String> listValues) Creates new attribute with provided parameters.createListValue(UUID attributeId, String value) Creates list value.createListValues(UUID attributeId, List<String> values) Bulk create list values.booleanDeletes selected attribute by id.booleandeleteListValue(UUID attributeId, UUID listValueId) booleandeleteListValues(UUID attributeId, List<UUID> ids) Bulk delete list values from attribute.booleanexistsById(UUID id) getAll()getByDslId(UUID dslId) Returns all attributes by dataSetList id.com.fasterxml.jackson.databind.node.ArrayNodegetByDslIdInItfFormat(UUID dslId) getOptions(UUID id) getParametersAndDataSetIdsForAttributeSorting(UiManDataSetList tree, UUID dataSetListId, UUID targetAttrId, List<UUID> attrFilterIds) Filtering attribute values.voidsaveAttributeSortConfigurationForUser(UUID userId, boolean isSortEnabled) booleanUpdates attribute name.booleanupdateDslReference(UUID id, UUID dslReferenceId) Updates attribute DSL reference.voidupdateOrdering(List<Pair<UUID, Integer>> attributesOrdering) booleanupdateTypeDslId(UUID dslId, UUID id)
-
Constructor Details
-
AttributeServiceImpl
@Autowired public AttributeServiceImpl(ListValueRepository listValueRepository, AttributeRepository attributeRepository, javax.inject.Provider<DataSetListService> dslServiceProvider, com.fasterxml.jackson.databind.ObjectMapper mapper, DateAuditorService dateAuditorService, DataSetListSnapshotService dataSetListSnapshotService, ParameterRepository parameterRepository, JpaAttributesSortEnabledRepository jpaAttributesSortEnabledRepository, ClearCacheService clearCacheService) Constructor with autowire.
-
-
Method Details
-
create
@Transactional @Nonnull public Attribute create(@Nonnull UUID dslId, @Nonnull Integer order, @Nonnull String name, @Nonnull AttributeType type, @Nullable UUID dslRefId, @Nullable List<String> listValues) Creates new attribute with provided parameters.- Specified by:
createin interfaceAttributeService
-
updateTypeDslId
- Specified by:
updateTypeDslIdin interfaceAttributeService
-
update
Updates attribute name.- Specified by:
updatein interfaceAttributeService
-
updateDslReference
Updates attribute DSL reference.- Specified by:
updateDslReferencein interfaceAttributeService
-
getOptions
- Specified by:
getOptionsin interfaceAttributeService
-
getByDslId
Returns all attributes by dataSetList id. Returns all attributes by dataSetList id.- Specified by:
getByDslIdin interfaceAttributeService- Returns:
- collection of attributes
-
getByDslIdInItfFormat
@Nullable public com.fasterxml.jackson.databind.node.ArrayNode getByDslIdInItfFormat(@Nonnull UUID dslId) - Specified by:
getByDslIdInItfFormatin interfaceAttributeService
-
get
- Specified by:
getin interfaceIdentifiedService<Attribute>
-
existsById
- Specified by:
existsByIdin interfaceIdentifiedService<Attribute>
-
getAll
- Specified by:
getAllin interfaceIdentifiedService<Attribute>
-
delete
Deletes selected attribute by id.- Specified by:
deletein interfaceAttributeService
-
createListValue
@Transactional @Nonnull public ListValue createListValue(@Nonnull UUID attributeId, @Nonnull String value) Creates list value.- Specified by:
createListValuein interfaceAttributeService
-
createListValues
@Transactional @Nonnull public List<UUID> createListValues(@Nonnull UUID attributeId, @Nonnull List<String> values) Bulk create list values.- Specified by:
createListValuesin interfaceAttributeService
-
deleteListValue
- Specified by:
deleteListValuein interfaceAttributeService
-
deleteListValues
Bulk delete list values from attribute.- Specified by:
deleteListValuesin interfaceAttributeService
-
copy
public Attribute copy(@Nonnull DataSetList newParentDsl, @Nonnull Attribute attribute, int ordering) - Specified by:
copyin interfaceAttributeService
-
updateOrdering
- Specified by:
updateOrderingin interfaceAttributeService
-
saveAttributeSortConfigurationForUser
- Specified by:
saveAttributeSortConfigurationForUserin interfaceAttributeService
-
getAttributeSortConfigurationForUser
- Specified by:
getAttributeSortConfigurationForUserin interfaceAttributeService
-
getParametersAndDataSetIdsForAttributeSorting
public Map<String,List<UUID>> getParametersAndDataSetIdsForAttributeSorting(@NotNull UiManDataSetList tree, @Nonnull UUID dataSetListId, @Nonnull UUID targetAttrId, @Nonnull List<UUID> attrFilterIds) Filtering attribute values.- Specified by:
getParametersAndDataSetIdsForAttributeSortingin interfaceAttributeService
-