Class SalesOrderService
java.lang.Object
org.exoplatform.timetracker.service.SalesOrderService
A Service to access and store Activities
- Version:
- $Id: $Id
- Author:
- medamine
-
Constructor Summary
ConstructorsConstructorDescriptionSalesOrderService(SalesOrderStorage salesOrderStorage) Constructor for SalesOrderService. -
Method Summary
Modifier and TypeMethodDescriptioncreateSalesOrder(SalesOrder salesOrder) Create new SalesOrder that will be available for all users.voiddeleteSalesOrder(Long salesOrderId, String username) Delete SalesOrder identified by its id and check if username has permission to delete it.getSalesOrderByClienId(Long clientId) Retrieves the list of Activities with offset, limit and a keyword that can be emptyRetrieves the list of Activities with offset, limit and a keyword that can be emptyupdateSalesOrder(SalesOrder SalesOrder, String username) Update an existing SalesOrder on datasource.
-
Constructor Details
-
SalesOrderService
Constructor for SalesOrderService.
- Parameters:
salesOrderStorage- aSalesOrderStorageobject.
-
-
Method Details
-
createSalesOrder
Create new SalesOrder that will be available for all users. If the SalesOrder already exits anEntityExistsExceptionwill be thrown.- Parameters:
salesOrder- SalesOrder to create- Returns:
- stored
SalesOrderin datasource - Throws:
Exception- when SalesOrder already exists or an error occurs while creating SalesOrder or its attached image
-
updateSalesOrder
Update an existing SalesOrder on datasource. If the SalesOrder doesn't exit anEntityNotFoundExceptionwill be thrown.- Parameters:
SalesOrder- dto to update on storeusername- username storing SalesOrder- Returns:
- stored
SalesOrderin datasource - Throws:
Exception- whenExceptionis thrown or an error occurs while saving SalesOrder
-
deleteSalesOrder
public void deleteSalesOrder(Long salesOrderId, String username) throws javax.persistence.EntityNotFoundException, IllegalAccessException Delete SalesOrder identified by its id and check if username has permission to delete it.- Parameters:
salesOrderId- technical identifier of SalesOrderusername- user currently deleting SalesOrder- Throws:
javax.persistence.EntityNotFoundException- if SalesOrder wasn't foundIllegalAccessException- if user is not allowed to delete SalesOrder
-
getSalesOrdersList
Retrieves the list of Activities with offset, limit and a keyword that can be empty- Returns:
- List of
SalesOrderthat contains the list of Activities
-
getSalesOrderByClienId
Retrieves the list of Activities with offset, limit and a keyword that can be empty- Parameters:
clientId- technical identifier of client- Returns:
- List of
SalesOrderthat contains the list of sos
-