Interface AttributeService
-
- All Known Implementing Classes:
AttributeServiceImpl
public interface AttributeService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Attribute
addAttributeToProduct(java.lang.String productId, java.lang.String attributeId)
This method does a relationship between entities.Attribute
addAttributeToProduct(java.lang.String productId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method does a relationship between entities.Attribute
addAttributeToSKU(java.lang.String skuId, java.lang.String attributeId)
This method does a relationship between entities.Attribute
addAttributeToSKU(java.lang.String skuId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method does a relationship between entities.java.util.Optional<Attribute>
createAttribute(Attribute attribute)
This method creates a database entity.java.util.Optional<Attribute>
createAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method creates a database entity.java.util.Optional<Measurement>
createMeasurement(Measurement measurement)
This method creates a database entity.java.util.Optional<Measurement>
createMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> measureAsMap)
This method creates a database entity.java.util.Optional<Option>
createOption(Option option)
This method creates a database entity.java.util.Optional<Option>
createOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> optionAsMap)
This method creates a database entity.java.util.List<Attribute>
findAttributes()
This method returns data as list.java.util.List<Measurement>
findMeasurements()
This method returns data as list.java.util.List<Option>
findOptions()
This method returns data as list.java.lang.String
getAttributeValue(java.lang.String attributeValueId)
This method returns a value as text.MeasurementRepository
getMeasurementRepository()
java.lang.String
getMeasurementValueFromAttribute(java.lang.String attrId)
This method returns a value as text.java.util.List<Option>
getOptionsFromAttribute(java.lang.String attrId)
This method does request to retrieve data as list.OptionRepository
getOptionsRepository()
java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>
getPaginationFilter(java.lang.String requestJson)
This method does calculation for a pages based on the request.java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>
getPaginationMeasurements(java.lang.String requestJson)
This method does calculation for a pages based on the request.java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>
getPaginationOptions(java.lang.String requestJson)
This method does calculation for a pages based on the request.AttributeRepository
getRepository()
AttributeDTO
mapAttributeToDto(Attribute attr, boolean optimal)
This method does map product entity to dto objectMeasurementDTO
mapMeasurementToDto(Measurement msr, boolean optimal)
This method does map product entity to dto objectOptionDTO
mapOptionToDto(Option opt, boolean optimal)
This method does map product entity to dto objectvoid
removeAttributeAndClean(java.lang.String attrId)
This method removes a database entity and clean all relationships from another entities.void
removeAttributeFromMeasurement(java.lang.String attrId)
This method removes relationship between database entities.void
removeAttributeFromOption(java.lang.String attrId, java.lang.String optionId)
This method removes relationship between database entities.void
removeAttributeFromOptions(java.lang.String attrId)
This method removes relationship between database entities.void
removeAttributeFromProduct(java.lang.String attrId, java.lang.String productId)
This method removes relationship between database entities.void
removeAttributeFromProducts(java.lang.String attrId)
This method removes relationship between database entities.void
removeAttributeFromSKU(java.lang.String attrId, java.lang.String skuId)
This method removes relationship between database entities.void
removeAttributeFromSKUs(java.lang.String attrId)
This method removes relationship between database entities.void
removeAttributeFromTranslation(java.lang.String attrId, java.lang.String tranId)
This method removes relationship between database entities.void
removeAttributeFromTranslations(java.lang.String attrId)
This method removes relationship between database entities.void
removeAttributesByIds(java.util.ArrayList<java.lang.String> attributeIds)
This method removes a list of database entities.void
removeAttributeValue(java.lang.String avId)
This method removes database entity.void
removeAttributeValuesByAttributeId(java.lang.String attributeId)
This method removes all relationships between database entities.void
removeMeasurementAndClean(java.lang.String measureId)
This method removes a database entity and clean all relationships from another entities.void
removeMeasurementFromAttribute(java.lang.String measureId, java.lang.String attrId)
This method removes relationship between database entities.void
removeMeasurementFromAttributes(java.lang.String measureId)
This method removes relationship between database entities.void
removeMeasurementsByIds(java.util.ArrayList<java.lang.String> measurementsIds)
This method removes a list of database entities.void
removeOptionAndClean(java.lang.String optionId)
This method removes a database entity and clean all relationships from another entities.void
removeOptionFromAttribute(java.lang.String optionId, java.lang.String attrId)
This method removes relationship between database entities.void
removeOptionFromAttributes(java.lang.String optionId)
This method removes relationship between database entities.void
removeOptionFromTranslation(java.lang.String optionId, java.lang.String tranId)
This method removes relationship between database entities.void
removeOptionFromTranslations(java.lang.String optionId)
This method removes relationship between database entities.void
removeOptionsByIds(java.util.ArrayList<java.lang.String> optionsIds)
This method removes a list of database entities.Attribute
saveAttribute(Attribute attribute)
This method saves a database entity.Attribute
saveAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method save an updates of database entity.Measurement
saveMeasurement(Measurement msr)
This method save an updates of database entity.Measurement
saveMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> msrAsMap)
This method save an updates of database entity.Option
saveOption(Option option)
This method save an updates of database entity.Option
saveOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> optAsMap)
This method save an updates of database entity.java.util.LinkedHashSet<AttributeDTO>
searchAttributes(java.lang.String requestJson)
This method does search requests and returns data as list.java.util.List<Attribute>
searchAttributes(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.co.mastermindcms.modules.beans.SearchResponse
searchAttributes(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
This method does search requests and returns data as list.co.mastermindcms.modules.beans.SearchResponse
searchAttributesLightweight(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
Retrieves lightweight attributes based on the given request JSON.org.springframework.data.domain.Page<Attribute>
searchAttributesPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.java.util.LinkedHashSet<MeasurementDTO>
searchMeasurements(java.lang.String requestJson)
This method does search requests and returns data as list.java.util.List<Measurement>
searchMeasurements(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.co.mastermindcms.modules.beans.SearchResponse
searchMeasurements(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
This method does search requests and returns data as list.org.springframework.data.domain.Page<Measurement>
searchMeasurementsPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.java.util.LinkedHashSet<OptionDTO>
searchOptions(java.lang.String requestJson)
This method does search requests and returns data as list.java.util.List<Option>
searchOptions(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.co.mastermindcms.modules.beans.SearchResponse
searchOptions(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
This method does search requests and returns data as list.org.springframework.data.domain.Page<Option>
searchOptionsPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.
-
-
-
Method Detail
-
getRepository
AttributeRepository getRepository()
-
getMeasurementRepository
MeasurementRepository getMeasurementRepository()
-
getOptionsRepository
OptionRepository getOptionsRepository()
-
getPaginationFilter
java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationFilter(java.lang.String requestJson)
This method does calculation for a pages based on the request.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchAttributesLightweight
co.mastermindcms.modules.beans.SearchResponse searchAttributesLightweight(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
Retrieves lightweight attributes based on the given request JSON.- Parameters:
requestJson
- a LinkedHashMap containing the request parameters- Returns:
- a SearchResponse object containing the lightweight attributes
-
searchAttributes
co.mastermindcms.modules.beans.SearchResponse searchAttributes(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchAttributes
java.util.LinkedHashSet<AttributeDTO> searchAttributes(java.lang.String requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchAttributesPaged
org.springframework.data.domain.Page<Attribute> searchAttributesPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
getPaginationMeasurements
java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationMeasurements(java.lang.String requestJson)
This method does calculation for a pages based on the request.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchMeasurements
co.mastermindcms.modules.beans.SearchResponse searchMeasurements(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchMeasurements
java.util.LinkedHashSet<MeasurementDTO> searchMeasurements(java.lang.String requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchMeasurementsPaged
org.springframework.data.domain.Page<Measurement> searchMeasurementsPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
getPaginationOptions
java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>> getPaginationOptions(java.lang.String requestJson)
This method does calculation for a pages based on the request.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- map-representation of data
-
searchOptions
co.mastermindcms.modules.beans.SearchResponse searchOptions(java.util.LinkedHashMap<java.lang.String,java.lang.Object> requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchOptions
java.util.LinkedHashSet<OptionDTO> searchOptions(java.lang.String requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchOptionsPaged
org.springframework.data.domain.Page<Option> searchOptionsPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.- Parameters:
requestJson
- JSON-object of request contains an instructions for search queries- Returns:
- database entities separated to pages
-
searchAttributes
@Deprecated java.util.List<Attribute> searchAttributes(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.This method does search requests and returns data as list.- Parameters:
query
- search queryoffset
- offset for returned itemslimit
- limit for returned items- Returns:
- database entities as list
-
findAttributes
java.util.List<Attribute> findAttributes()
This method returns data as list.- Returns:
- database entities as list
-
searchMeasurements
@Deprecated java.util.List<Measurement> searchMeasurements(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.This method does search requests and returns data as list.- Parameters:
query
- search queryoffset
- offset for returned itemslimit
- limit for returned items- Returns:
- database entities as list
-
findMeasurements
java.util.List<Measurement> findMeasurements()
This method returns data as list.- Returns:
- database entities as list
-
searchOptions
@Deprecated java.util.List<Option> searchOptions(java.lang.String query, java.lang.String offset, java.lang.String limit)
Deprecated.This method does search requests and returns data as list.- Parameters:
query
- search queryoffset
- offset for returned itemslimit
- limit for returned items- Returns:
- database entities as list
-
findOptions
java.util.List<Option> findOptions()
This method returns data as list.- Returns:
- database entities as list
-
getOptionsFromAttribute
java.util.List<Option> getOptionsFromAttribute(java.lang.String attrId)
This method does request to retrieve data as list.- Parameters:
attrId
- this attribute id is used for return all related options- Returns:
- all related options
-
getMeasurementValueFromAttribute
java.lang.String getMeasurementValueFromAttribute(java.lang.String attrId)
This method returns a value as text.- Parameters:
attrId
- identification for database entity which will be retrieved- Returns:
- value as text
-
getAttributeValue
java.lang.String getAttributeValue(java.lang.String attributeValueId)
This method returns a value as text.- Parameters:
attributeValueId
- identification for database entity which will be retrieved- Returns:
- value as text
-
createMeasurement
java.util.Optional<Measurement> createMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> measureAsMap)
This method creates a database entity.- Parameters:
measureAsMap
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createOption
java.util.Optional<Option> createOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> optionAsMap)
This method creates a database entity.- Parameters:
optionAsMap
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createAttribute
java.util.Optional<Attribute> createAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method creates a database entity.- Parameters:
attrAsMap
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createMeasurement
java.util.Optional<Measurement> createMeasurement(Measurement measurement)
This method creates a database entity.- Parameters:
measurement
- database entity- Returns:
- optional value to externally interaction
-
createOption
java.util.Optional<Option> createOption(Option option)
This method creates a database entity.- Parameters:
option
- database entity- Returns:
- optional value to externally interaction
-
createAttribute
java.util.Optional<Attribute> createAttribute(Attribute attribute)
This method creates a database entity.- Parameters:
attribute
- database entity- Returns:
- optional value to externally interaction
-
addAttributeToProduct
Attribute addAttributeToProduct(java.lang.String productId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method does a relationship between entities.- Parameters:
productId
- identification for database entity which will be updatedattrAsMap
- map-representation of database entity- Returns:
- database entity
-
addAttributeToProduct
Attribute addAttributeToProduct(java.lang.String productId, java.lang.String attributeId)
This method does a relationship between entities.- Parameters:
productId
- identification for database entity which will be updatedattributeId
- attribute identifier- Returns:
- database entity
-
addAttributeToSKU
Attribute addAttributeToSKU(java.lang.String skuId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method does a relationship between entities.- Parameters:
skuId
- identification for database entity which will be updatedattrAsMap
- map-representation of database entity- Returns:
- database entity
-
addAttributeToSKU
Attribute addAttributeToSKU(java.lang.String skuId, java.lang.String attributeId)
This method does a relationship between entities.- Parameters:
skuId
- identification for database entity which will be updatedattributeId
- attribute identifier- Returns:
- database entity
-
saveAttribute
Attribute saveAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> attrAsMap)
This method save an updates of database entity.- Parameters:
attrAsMap
- map-representation of database entity- Returns:
- saved instance of database entity
-
saveAttribute
Attribute saveAttribute(Attribute attribute)
This method saves a database entity.- Parameters:
attribute
- database entity- Returns:
- saved instance of database entity
-
saveMeasurement
Measurement saveMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> msrAsMap)
This method save an updates of database entity.- Parameters:
msrAsMap
- map-representation of database entity- Returns:
- saved instance of database entity
-
saveMeasurement
Measurement saveMeasurement(Measurement msr)
This method save an updates of database entity.- Parameters:
msr
- database entity- Returns:
- saved instance of database entity
-
saveOption
Option saveOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> optAsMap)
This method save an updates of database entity.- Parameters:
optAsMap
- map-representation of database entity- Returns:
- optional value to externally interaction
-
saveOption
Option saveOption(Option option)
This method save an updates of database entity.- Parameters:
option
- database entity- Returns:
- value to externally interaction
-
removeAttributeFromProduct
void removeAttributeFromProduct(java.lang.String attrId, java.lang.String productId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removedproductId
- identification for database entity which will be updated
-
removeAttributeFromProducts
void removeAttributeFromProducts(java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removed
-
removeAttributeFromSKU
void removeAttributeFromSKU(java.lang.String attrId, java.lang.String skuId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removedskuId
- identification for database entity which will be updated
-
removeAttributeFromSKUs
void removeAttributeFromSKUs(java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removed
-
removeAttributeValue
void removeAttributeValue(java.lang.String avId)
This method removes database entity.- Parameters:
avId
- identification for database entity which will be removed
-
removeAttributeFromTranslation
void removeAttributeFromTranslation(java.lang.String attrId, java.lang.String tranId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removedtranId
- identification for database entity which will be updated
-
removeAttributeFromTranslations
void removeAttributeFromTranslations(java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removed
-
removeAttributeFromOption
void removeAttributeFromOption(java.lang.String attrId, java.lang.String optionId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removedoptionId
- identification for database entity which will be updated
-
removeAttributeFromOptions
void removeAttributeFromOptions(java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removed
-
removeAttributeFromMeasurement
void removeAttributeFromMeasurement(java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
attrId
- identification for database entity which will be removed
-
removeAttributeAndClean
void removeAttributeAndClean(java.lang.String attrId)
This method removes a database entity and clean all relationships from another entities.- Parameters:
attrId
- identification for database entity which will be removed
-
removeMeasurementFromAttribute
void removeMeasurementFromAttribute(java.lang.String measureId, java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
measureId
- identification for database entity which will be removedattrId
- identification for database entity which will be updated
-
removeMeasurementFromAttributes
void removeMeasurementFromAttributes(java.lang.String measureId)
This method removes relationship between database entities.- Parameters:
measureId
- identification for database entity which will be removed
-
removeMeasurementAndClean
void removeMeasurementAndClean(java.lang.String measureId)
This method removes a database entity and clean all relationships from another entities.- Parameters:
measureId
- identification for database entity which will be removed
-
removeOptionFromAttribute
void removeOptionFromAttribute(java.lang.String optionId, java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
optionId
- identification for database entity which will be removedattrId
- identification for database entity which will be updated
-
removeOptionFromAttributes
void removeOptionFromAttributes(java.lang.String optionId)
This method removes relationship between database entities.- Parameters:
optionId
- identification for database entity which will be removed
-
removeOptionFromTranslation
void removeOptionFromTranslation(java.lang.String optionId, java.lang.String tranId)
This method removes relationship between database entities.- Parameters:
optionId
- identification for database entity which will be removedtranId
- identification for database entity which will be updated
-
removeOptionFromTranslations
void removeOptionFromTranslations(java.lang.String optionId)
This method removes relationship between database entities.- Parameters:
optionId
- identification for database entity which will be removed
-
removeOptionAndClean
void removeOptionAndClean(java.lang.String optionId)
This method removes a database entity and clean all relationships from another entities.- Parameters:
optionId
- identification for database entity which will be removed
-
removeAttributeValuesByAttributeId
void removeAttributeValuesByAttributeId(java.lang.String attributeId)
This method removes all relationships between database entities.- Parameters:
attributeId
- identification for database entity which will be updated
-
removeAttributesByIds
void removeAttributesByIds(java.util.ArrayList<java.lang.String> attributeIds)
This method removes a list of database entities.- Parameters:
attributeIds
- the list of database entities which will be removed
-
removeMeasurementsByIds
void removeMeasurementsByIds(java.util.ArrayList<java.lang.String> measurementsIds)
This method removes a list of database entities.- Parameters:
measurementsIds
- the list of database entities which will be removed
-
removeOptionsByIds
void removeOptionsByIds(java.util.ArrayList<java.lang.String> optionsIds)
This method removes a list of database entities.- Parameters:
optionsIds
- the list of database entities which will be removed
-
mapAttributeToDto
AttributeDTO mapAttributeToDto(Attribute attr, boolean optimal)
This method does map product entity to dto object- Parameters:
attr
- database entity which be used to map to dtooptimal
- this pointer optimises the data transfer object- Returns:
- data transport object
-
mapOptionToDto
OptionDTO mapOptionToDto(Option opt, boolean optimal)
This method does map product entity to dto object- Parameters:
opt
- database entity which be used to map to dtooptimal
- this pointer optimises the data transfer object- Returns:
- data transport object
-
mapMeasurementToDto
MeasurementDTO mapMeasurementToDto(Measurement msr, boolean optimal)
This method does map product entity to dto object- Parameters:
msr
- database entity which be used to map to dtooptimal
- this pointer optimises the data transfer object- Returns:
- data transport object
-
-