Class PerkStoreService
java.lang.Object
org.exoplatform.perkstore.service.PerkStoreService
- All Implemented Interfaces:
ExoPerkStoreStatisticService,org.picocontainer.Startable
public class PerkStoreService
extends Object
implements ExoPerkStoreStatisticService, org.picocontainer.Startable
A service to manage perkstore entities
-
Constructor Summary
ConstructorsConstructorDescriptionPerkStoreService(PerkStoreWebSocketService webSocketService, PerkStoreStorage perkStoreStorage, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.container.PortalContainer container) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckCanCreateOrder(ProductOrder order, String username) countOrders(OrderFilter filter, String username) countUserOrders(OrderFilter filter, String username) createOrder(ProductOrder order, String username) voiddeleteProduct(long productId, String username) getFileDetail(long productId, long imageId, boolean retrieveData, String username) getGlobalSettings(String username) getOrderById(long orderId) getOrders(OrderFilter filter, String username) getProductById(long productId) getProductById(long productId, String username) getProducts(boolean available, String username) getStatisticParameters(String operation, Object result, Object... methodArgs) Retrieve statistic log parametersbooleanisPerkStoreManager(String username) voidreplaceTransactions(String oldHash, String newHash) voidsaveGlobalSettings(GlobalSettings settings, String username) saveOrder(ProductOrder order, ProductOrderModificationType modificationType, String username, boolean checkUsername) voidsaveOrderTransactionStatus(Map<String, Object> transactionDetails) saveProduct(Product product, String username) voidstart()voidstop()
-
Constructor Details
-
PerkStoreService
public PerkStoreService(PerkStoreWebSocketService webSocketService, PerkStoreStorage perkStoreStorage, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.container.PortalContainer container)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
saveGlobalSettings
- Throws:
Exception
-
getGlobalSettings
-
getGlobalSettings
- Throws:
Exception
-
saveProduct
- Throws:
Exception
-
deleteProduct
- Throws:
Exception
-
getProducts
- Throws:
Exception
-
getOrders
- Throws:
Exception
-
countOrders
- Throws:
Exception
-
countUserOrders
-
checkCanCreateOrder
- Throws:
PerkStoreException
-
createOrder
- Throws:
Exception
-
saveOrder
public ProductOrder saveOrder(ProductOrder order, ProductOrderModificationType modificationType, String username, boolean checkUsername) throws Exception - Throws:
Exception
-
saveOrderTransactionStatus
- Throws:
Exception
-
getOrderById
-
getProductById
- Throws:
Exception
-
getProductById
-
getFileDetail
public FileDetail getFileDetail(long productId, long imageId, boolean retrieveData, String username) throws Exception - Throws:
Exception
-
isPerkStoreManager
- Throws:
Exception
-
replaceTransactions
-
getStatisticParameters
public Map<String,Object> getStatisticParameters(String operation, Object result, Object... methodArgs) Description copied from interface:ExoPerkStoreStatisticServiceRetrieve statistic log parameters- Specified by:
getStatisticParametersin interfaceExoPerkStoreStatisticService- Parameters:
operation-result-methodArgs-- Returns:
- a
Mapof parameters to include in statistic log
-