Class DataManagerServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.DataManagerServiceImpl
-
- All Implemented Interfaces:
DataManagerService
@Service public class DataManagerServiceImpl extends java.lang.Object implements DataManagerService
-
-
Field Summary
Fields Modifier and Type Field Description private AttributeService
attributeService
private CategoryService
categoryService
private GeoLocationService
geoLocationService
private JobsManagementService
jobService
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private org.springframework.data.mongodb.core.MongoTemplate
mongoTemplate
private OrderService
orderService
private ProductService
productService
private ProfileManagementService
profileManagementService
private SalesCatalogService
salesCatalogService
private SellerRegistrationService
sellerRegistrationService
private SKUService
skuService
private TranslationService
translationService
private UnitRepository
unitRepository
private UserManagementService
userManagementService
private WebSocketService
webSocketService
-
Constructor Summary
Constructors Constructor Description DataManagerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributeToAllProducts(java.lang.String attributeId, java.lang.String username)
This method associates all specified attribute identifiers with all productsvoid
addAttributeToAllSkus(java.lang.String attributeId, java.lang.String username)
This method associates all specified attribute identifiers with all skusCategory
addChildCategory(java.lang.String parentId, java.lang.String childId)
This method adds child entity in parent entity.Product
addProductToCategory(java.lang.String categoryId, java.lang.String productId)
This method adds relationship between entities.Attribute
createAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Category
createCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Measurement
createMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Option
createOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Order
createOrder(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Product
createProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Profile
createProfile(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Seller
createSeller(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.SKU
createSKU(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.LocalizedText
createTranslation(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.Unit
createUnit(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.User
createUser(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method creates a database entity.void
deleteAttribute(java.lang.String attributeId)
This method removes database entity with child database entity.void
deleteAttributes(java.util.ArrayList<java.lang.String> attributeIds)
This method removes database entity with child database entity.void
deleteCategories(java.util.ArrayList<java.lang.String> categoryIds)
This method removes database entity with child database entity.void
deleteCategory(java.lang.String categoryId)
This method removes database entity with child database entity.void
deleteListing(java.lang.String listingId)
This method removes database entity with child database entity.void
deleteListings(java.util.ArrayList<java.lang.String> listingIds)
This method removes database entity with child database entity.void
deleteMeasurement(java.lang.String measurementId)
This method removes database entity with child database entity.void
deleteMeasurements(java.util.ArrayList<java.lang.String> measurementIds)
This method removes database entity with child database entity.void
deleteOption(java.lang.String optionId)
This method removes database entity with child database entity.void
deleteOptions(java.util.ArrayList<java.lang.String> optionsIds)
This method removes database entity with child database entity.void
deleteOrder(java.lang.String orderId)
This method removes database entity with child database entity.void
deleteOrders(java.util.ArrayList<java.lang.String> ordersIds)
This method removes database entity with child database entity.void
deleteProduct(java.lang.String productId)
This method removes database entity with child database entity.void
deleteProducts(java.util.ArrayList<java.lang.String> productIds)
This method removes database entity with child database entity.void
deleteProfile(java.lang.String profileId)
This method removes database entity with child database entity.void
deleteProfiles(java.util.ArrayList<java.lang.String> profileIds)
This method removes database entity with child database entity.void
deleteSeller(java.lang.String sellerId)
This method removes database entity with child database entity.void
deleteSellers(java.util.ArrayList<java.lang.String> sellerIds)
This method removes database entity with child database entity.void
deleteSKU(java.lang.String skuId)
This method removes database entity with child database entity.void
deleteSKUs(java.util.ArrayList<java.lang.String> skuIds)
This method removes database entity with child database entity.void
deleteTranslation(java.lang.String translationId)
This method removes database entity with child database entity.void
deleteTranslations(java.util.ArrayList<java.lang.String> translationIds)
This method removes database entity with child database entity.void
deleteUnit(java.lang.String unitId)
This method removes database entity with child database entity.void
deleteUnits(java.util.ArrayList<java.lang.String> unitsIds)
This method removes database entity with child database entity.void
deleteUser(java.lang.String userId)
This method removes database entity with child database entity.void
deleteUsers(java.util.ArrayList<java.lang.String> userIds)
This method removes database entity with child database entity.java.util.Map<java.lang.String,java.lang.String>
getTranslation(java.lang.String id)
This method returns data as map.void
jobDryRun(java.lang.String username)
Performs a dry run of the job using the specified username.private EmbeddedBean
mapToEmbeddedBean(java.lang.String id, java.lang.String repositoryName)
void
removeChildCategory(java.lang.String parentId, java.lang.String childId)
This method deletes child entity in parent entity.void
removeProductFromCategory(java.lang.String categoryId, java.lang.String productId)
This method deletes a relationship between entities.Attribute
updateAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectCategory
updateCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for category based on proxy objectMeasurement
updateMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectOption
updateOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectOrder
updateOrder(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectProduct
updateProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for product based on proxy objectProfile
updateProfile(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectSeller
updateSeller(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectSKU
updateSKU(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for product based on proxy objectLocalizedText
updateTranslation(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectUnit
updateUnit(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy objectUser
updateUser(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
This method does update for attribute based on proxy object
-
-
-
Field Detail
-
userManagementService
@Autowired private UserManagementService userManagementService
-
categoryService
@Autowired private CategoryService categoryService
-
productService
@Autowired private ProductService productService
-
skuService
@Autowired private SKUService skuService
-
attributeService
@Autowired private AttributeService attributeService
-
sellerRegistrationService
@Autowired private SellerRegistrationService sellerRegistrationService
-
profileManagementService
@Autowired private ProfileManagementService profileManagementService
-
geoLocationService
@Autowired private GeoLocationService geoLocationService
-
translationService
@Autowired private TranslationService translationService
-
salesCatalogService
@Autowired private SalesCatalogService salesCatalogService
-
orderService
@Autowired private OrderService orderService
-
webSocketService
@Autowired private WebSocketService webSocketService
-
jobService
@Autowired private JobsManagementService jobService
-
unitRepository
@Autowired private UnitRepository unitRepository
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
createCategory
public Category createCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createCategory
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createProduct
public Product createProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createProduct
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createSKU
public SKU createSKU(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createSKU
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createAttribute
public Attribute createAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createAttribute
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createOption
public Option createOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createOption
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createMeasurement
public Measurement createMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createMeasurement
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createUnit
public Unit createUnit(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createUnit
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createSeller
public Seller createSeller(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createSeller
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createProfile
public Profile createProfile(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createProfile
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createUser
public User createUser(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createUser
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createTranslation
public LocalizedText createTranslation(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createTranslation
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
createOrder
public Order createOrder(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method creates a database entity.- Specified by:
createOrder
in interfaceDataManagerService
- Parameters:
data
- map-representation of database entity- Returns:
- optional value to externally interaction
-
deleteCategory
public void deleteCategory(java.lang.String categoryId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteCategory
in interfaceDataManagerService
- Parameters:
categoryId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteCategories
public void deleteCategories(java.util.ArrayList<java.lang.String> categoryIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteCategories
in interfaceDataManagerService
- Parameters:
categoryIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteProduct
public void deleteProduct(java.lang.String productId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteProduct
in interfaceDataManagerService
- Parameters:
productId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteProducts
public void deleteProducts(java.util.ArrayList<java.lang.String> productIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteProducts
in interfaceDataManagerService
- Parameters:
productIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteSKU
public void deleteSKU(java.lang.String skuId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteSKU
in interfaceDataManagerService
- Parameters:
skuId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteSKUs
public void deleteSKUs(java.util.ArrayList<java.lang.String> skuIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteSKUs
in interfaceDataManagerService
- Parameters:
skuIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteListing
public void deleteListing(java.lang.String listingId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteListing
in interfaceDataManagerService
- Parameters:
listingId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteListings
public void deleteListings(java.util.ArrayList<java.lang.String> listingIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteListings
in interfaceDataManagerService
- Parameters:
listingIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteAttribute
public void deleteAttribute(java.lang.String attributeId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteAttribute
in interfaceDataManagerService
- Parameters:
attributeId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteAttributes
public void deleteAttributes(java.util.ArrayList<java.lang.String> attributeIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteAttributes
in interfaceDataManagerService
- Parameters:
attributeIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteOption
public void deleteOption(java.lang.String optionId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteOption
in interfaceDataManagerService
- Parameters:
optionId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteOptions
public void deleteOptions(java.util.ArrayList<java.lang.String> optionsIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteOptions
in interfaceDataManagerService
- Parameters:
optionsIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteMeasurement
public void deleteMeasurement(java.lang.String measurementId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteMeasurement
in interfaceDataManagerService
- Parameters:
measurementId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteMeasurements
public void deleteMeasurements(java.util.ArrayList<java.lang.String> measurementIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteMeasurements
in interfaceDataManagerService
- Parameters:
measurementIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteUnit
public void deleteUnit(java.lang.String unitId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteUnit
in interfaceDataManagerService
- Parameters:
unitId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteUnits
public void deleteUnits(java.util.ArrayList<java.lang.String> unitsIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteUnits
in interfaceDataManagerService
- Parameters:
unitsIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteSeller
public void deleteSeller(java.lang.String sellerId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteSeller
in interfaceDataManagerService
- Parameters:
sellerId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteSellers
public void deleteSellers(java.util.ArrayList<java.lang.String> sellerIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteSellers
in interfaceDataManagerService
- Parameters:
sellerIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteProfile
public void deleteProfile(java.lang.String profileId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteProfile
in interfaceDataManagerService
- Parameters:
profileId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteProfiles
public void deleteProfiles(java.util.ArrayList<java.lang.String> profileIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteProfiles
in interfaceDataManagerService
- Parameters:
profileIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteUser
public void deleteUser(java.lang.String userId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteUser
in interfaceDataManagerService
- Parameters:
userId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteUsers
public void deleteUsers(java.util.ArrayList<java.lang.String> userIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteUsers
in interfaceDataManagerService
- Parameters:
userIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteTranslation
public void deleteTranslation(java.lang.String translationId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteTranslation
in interfaceDataManagerService
- Parameters:
translationId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteTranslations
public void deleteTranslations(java.util.ArrayList<java.lang.String> translationIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteTranslations
in interfaceDataManagerService
- Parameters:
translationIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
deleteOrder
public void deleteOrder(java.lang.String orderId)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteOrder
in interfaceDataManagerService
- Parameters:
orderId
- identification for database entity which will be removed and whose parent dependency will be removed
-
deleteOrders
public void deleteOrders(java.util.ArrayList<java.lang.String> ordersIds)
Description copied from interface:DataManagerService
This method removes database entity with child database entity.- Specified by:
deleteOrders
in interfaceDataManagerService
- Parameters:
ordersIds
- the list of identification for database entities which will be removed and whose parent dependency will be removed
-
updateCategory
public Category updateCategory(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for category based on proxy object- Specified by:
updateCategory
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the category object- Returns:
- optional value to externally interaction
-
updateProduct
public Product updateProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for product based on proxy object- Specified by:
updateProduct
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the product object- Returns:
- optional value to externally interaction
-
updateSKU
public SKU updateSKU(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for product based on proxy object- Specified by:
updateSKU
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the product object- Returns:
- optional value to externally interaction
-
updateAttribute
public Attribute updateAttribute(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateAttribute
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the attribute object- Returns:
- optional value to externally interaction
-
updateOption
public Option updateOption(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateOption
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the option object- Returns:
- optional value to externally interaction
-
updateMeasurement
public Measurement updateMeasurement(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateMeasurement
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the measurement object- Returns:
- optional value to externally interaction
-
updateUnit
public Unit updateUnit(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateUnit
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the unit object- Returns:
- optional value to externally interaction
-
updateSeller
public Seller updateSeller(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateSeller
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the seller object- Returns:
- optional value to externally interaction
-
updateProfile
public Profile updateProfile(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateProfile
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the profile object- Returns:
- optional value to externally interaction
-
updateUser
public User updateUser(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateUser
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the user object- Returns:
- optional value to externally interaction
-
updateTranslation
public LocalizedText updateTranslation(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateTranslation
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the translation object- Returns:
- optional value to externally interaction
-
updateOrder
public Order updateOrder(java.util.LinkedHashMap<java.lang.String,java.lang.Object> data)
Description copied from interface:DataManagerService
This method does update for attribute based on proxy object- Specified by:
updateOrder
in interfaceDataManagerService
- Parameters:
data
- the data transfer object as a map-representation to update the order object- Returns:
- optional value to externally interaction
-
addProductToCategory
public Product addProductToCategory(java.lang.String categoryId, java.lang.String productId)
Description copied from interface:DataManagerService
This method adds relationship between entities.- Specified by:
addProductToCategory
in interfaceDataManagerService
- Parameters:
categoryId
- identification for database entity which will be updatedproductId
- identification for database entity which will be updated- Returns:
- database entity
-
addChildCategory
public Category addChildCategory(java.lang.String parentId, java.lang.String childId)
Description copied from interface:DataManagerService
This method adds child entity in parent entity.- Specified by:
addChildCategory
in interfaceDataManagerService
- Parameters:
parentId
- identification for database entity which will be updatedchildId
- identification for database entity which will be added in parent database entity- Returns:
- database entity
-
removeProductFromCategory
public void removeProductFromCategory(java.lang.String categoryId, java.lang.String productId)
Description copied from interface:DataManagerService
This method deletes a relationship between entities.- Specified by:
removeProductFromCategory
in interfaceDataManagerService
- Parameters:
categoryId
- identification for database entity which will be updatedproductId
- identification for database entity which will be updated
-
removeChildCategory
public void removeChildCategory(java.lang.String parentId, java.lang.String childId)
Description copied from interface:DataManagerService
This method deletes child entity in parent entity.- Specified by:
removeChildCategory
in interfaceDataManagerService
- Parameters:
parentId
- identification for database entity which will be updatedchildId
- identification for database entity which will be added in parent database entity
-
addAttributeToAllProducts
@Async("asyncTaskExecutor") public void addAttributeToAllProducts(java.lang.String attributeId, java.lang.String username)
Description copied from interface:DataManagerService
This method associates all specified attribute identifiers with all products- Specified by:
addAttributeToAllProducts
in interfaceDataManagerService
- Parameters:
attributeId
- this attribute identifierusername
- the username of the user running the job
-
addAttributeToAllSkus
@Async("asyncTaskExecutor") public void addAttributeToAllSkus(java.lang.String attributeId, java.lang.String username)
Description copied from interface:DataManagerService
This method associates all specified attribute identifiers with all skus- Specified by:
addAttributeToAllSkus
in interfaceDataManagerService
- Parameters:
attributeId
- this attribute identifierusername
- the username of the user running the job
-
getTranslation
public java.util.Map<java.lang.String,java.lang.String> getTranslation(java.lang.String id)
Description copied from interface:DataManagerService
This method returns data as map.- Specified by:
getTranslation
in interfaceDataManagerService
- Parameters:
id
- identification for database entity, which will be revers on map- Returns:
- data as map
-
jobDryRun
@Async("asyncTaskExecutor") public void jobDryRun(java.lang.String username)
Description copied from interface:DataManagerService
Performs a dry run of the job using the specified username.- Specified by:
jobDryRun
in interfaceDataManagerService
- Parameters:
username
- the username of the user running the job
-
mapToEmbeddedBean
private EmbeddedBean mapToEmbeddedBean(java.lang.String id, java.lang.String repositoryName)
-
-