public class ArticleStorageService extends Object implements MagalieService
| Modifier and Type | Field and Description |
|---|---|
protected MagalieServiceContext |
serviceContext |
| Constructor and Description |
|---|
ArticleStorageService() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelStorageMovements(MagalieUser magalieUser) |
protected Iterable<StoredArticle> |
computeActualQuantities(Iterable<StoredArticle> storedArticles,
Iterable<StorageMovement> storageMovements)
This method take some storedArticles and update the quantities according
to given storage movements (adding or removing quantities depending if it's
a movement from the location or to the location)
|
void |
confirmStorageMovement(StorageMovementConfirmation confirmation,
MagalieUser magalieUser) |
Article |
getArticle(String articleId) |
RealTimeStorageMovementTask |
getRealTimeStorageMovementTask(Building building,
MagalieUser magalieUser,
String articleId) |
protected Iterable<StoredArticle> |
getStoredArticles(Building building,
Article article)
Get a snapshot of the actual current state of the stock.
|
StorageMovement |
saveStorageMovement(MagalieUser magalieUser,
String articleId,
String originLocationId,
String destinationLocationId,
double quantity) |
void |
setServiceContext(MagalieServiceContext serviceContext) |
protected Set<StoredArticle> |
sortStoredArticlesByPriority(Iterable<StoredArticle> storedArticles) |
protected void |
updateArticleAvailability(Building building,
Article article,
boolean articleIsAvailable)
Add or remove a line in table
UnavailableArticle |
protected MagalieServiceContext serviceContext
public void setServiceContext(MagalieServiceContext serviceContext)
setServiceContext in interface MagalieServiceprotected void updateArticleAvailability(Building building, Article article, boolean articleIsAvailable)
UnavailableArticleprotected Set<StoredArticle> sortStoredArticlesByPriority(Iterable<StoredArticle> storedArticles)
protected Iterable<StoredArticle> getStoredArticles(Building building, Article article)
protected Iterable<StoredArticle> computeActualQuantities(Iterable<StoredArticle> storedArticles, Iterable<StorageMovement> storageMovements)
public void confirmStorageMovement(StorageMovementConfirmation confirmation, MagalieUser magalieUser)
public void cancelStorageMovements(MagalieUser magalieUser)
public RealTimeStorageMovementTask getRealTimeStorageMovementTask(Building building, MagalieUser magalieUser, String articleId)
public StorageMovement saveStorageMovement(MagalieUser magalieUser, String articleId, String originLocationId, String destinationLocationId, double quantity)
Copyright © 2013 CodeLutin. All rights reserved.