org.zeroexchange.resource.stock
Interface StockManager

All Known Implementing Classes:
DefaultStockManager

public interface StockManager

Factory provides info about availability of the resource for the user.

Author:
black

Method Summary
 void freeAmount(ResourceTender resourceTender, Resource resource)
          Reserves resource amount.
 BigDecimal getConsumeAmount(Resource resource)
          Returns consume amount for the resource.
 BigDecimal getSupplyAmount(Resource resource)
          Returns supply amount for the resource.
 BigDecimal getUserAvailableAmount(Resource resource, User user)
          Returns resource category.
 boolean isAmountManagementEnabled(Resource resource, TenderType tenderType)
          Returns true of the amount management is enabled.
 boolean isAutoMovementEnabled(Resource resource)
          Returns true if the stock auto-movement is enabled for the specified resource.
 boolean isPriceManagementEnabled(Resource resource)
          Returns true if the price management is enabled for the specified resource.
 void performAutoMovement(Integer contractId)
          Performs automatic stuff movement.
 void reserveAmount(ResourceTender resourceTender, Resource resource)
          Reserves resource amount.
 

Method Detail

getUserAvailableAmount

BigDecimal getUserAvailableAmount(Resource resource,
                                  User user)
Returns resource category.


reserveAmount

void reserveAmount(ResourceTender resourceTender,
                   Resource resource)
Reserves resource amount.


performAutoMovement

void performAutoMovement(Integer contractId)
Performs automatic stuff movement.


freeAmount

void freeAmount(ResourceTender resourceTender,
                Resource resource)
Reserves resource amount.


isAutoMovementEnabled

boolean isAutoMovementEnabled(Resource resource)
Returns true if the stock auto-movement is enabled for the specified resource.


isPriceManagementEnabled

boolean isPriceManagementEnabled(Resource resource)
Returns true if the price management is enabled for the specified resource.


isAmountManagementEnabled

boolean isAmountManagementEnabled(Resource resource,
                                  TenderType tenderType)
Returns true of the amount management is enabled.


getSupplyAmount

BigDecimal getSupplyAmount(Resource resource)
Returns supply amount for the resource.


getConsumeAmount

BigDecimal getConsumeAmount(Resource resource)
Returns consume amount for the resource.



Copyright © 2013. All Rights Reserved.