org.zeroexchange.resource.stock
Interface ResourceStockManager

All Known Implementing Classes:
GoodStockManager, LocalCurrencyStockManager, ServiceStockManager

public interface ResourceStockManager

Interface for the resource amount processors.

Author:
black

Method Summary
 void freeAmount(ResourceTender tender, Resource resource)
          Reserves amount for the specified resource.
 BigDecimal getAmount(Resource resource, User user)
          Returns resource category.
 BigDecimal getConsumeAmount(Resource resource)
          Returns consume amount for the resource.
 String getProcessingCategoryAlias()
          Returns alias of the processing category
 BigDecimal getSupplyAmount(Resource resource)
          Returns supply amount for the resource.
 boolean isAmountManagementEnabled(Resource resource, TenderType tenderType)
          Returns true of the amount management is enabled for consumers.
 boolean isAutoMovementEnabled(Resource resource)
          Returns is auto-supply is enabled for the current resuorce.
 boolean isPriceManagementEnabled(Resource resource)
          Returns true if the price management is enabled for the specified resource.
 void performAutoMovement(Resource resource)
          Performs resource auto-move if possible.
 void reserveAmount(ResourceTender tender, Resource resource)
          Reserves amount for the specified resource.
 

Method Detail

getProcessingCategoryAlias

String getProcessingCategoryAlias()
Returns alias of the processing category


getAmount

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


reserveAmount

void reserveAmount(ResourceTender tender,
                   Resource resource)
Reserves amount for the specified resource.


freeAmount

void freeAmount(ResourceTender tender,
                Resource resource)
Reserves amount for the specified resource.


performAutoMovement

void performAutoMovement(Resource resource)
Performs resource auto-move if possible.


isAutoMovementEnabled

boolean isAutoMovementEnabled(Resource resource)
Returns is auto-supply is enabled for the current resuorce.


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 for consumers.


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.