|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zeroexchange.common.AbstractBeansRegistry<T> org.zeroexchange.common.TypedBeansRegistry<P> org.zeroexchange.common.processors.AbstractDataProcessorsRegistry<ResourceStockManager> org.zeroexchange.resource.stock.DefaultStockManager
@Transactional public class DefaultStockManager
Constructor Summary | |
---|---|
DefaultStockManager()
|
Method Summary | |
---|---|
void |
freeAmount(ResourceTender resourceTender,
Resource resource)
Reserves resource amount. |
protected Class<?> |
getBeanClass()
|
BigDecimal |
getConsumeAmount(Resource resource)
Returns consume amount for the resource. |
protected ResourceStockManager |
getProcessor(Resource resource)
Returns processor by the category's alias. |
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. |
Methods inherited from class org.zeroexchange.common.processors.AbstractDataProcessorsRegistry |
---|
getProcessor, getProcessors, isElected |
Methods inherited from class org.zeroexchange.common.TypedBeansRegistry |
---|
afterPropertiesSet |
Methods inherited from class org.zeroexchange.common.AbstractBeansRegistry |
---|
createBeansCollection, getBeans, postProcessAfterInitialization, postProcessBeforeInitialization |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultStockManager()
Method Detail |
---|
public BigDecimal getUserAvailableAmount(Resource resource, User user)
getUserAvailableAmount
in interface StockManager
public void reserveAmount(ResourceTender resourceTender, Resource resource)
reserveAmount
in interface StockManager
public void freeAmount(ResourceTender resourceTender, Resource resource)
freeAmount
in interface StockManager
public void performAutoMovement(Integer contractId)
performAutoMovement
in interface StockManager
public boolean isAutoMovementEnabled(Resource resource)
isAutoMovementEnabled
in interface StockManager
public boolean isPriceManagementEnabled(Resource resource)
isPriceManagementEnabled
in interface StockManager
public boolean isAmountManagementEnabled(Resource resource, TenderType tenderType)
isAmountManagementEnabled
in interface StockManager
protected ResourceStockManager getProcessor(Resource resource)
public BigDecimal getSupplyAmount(Resource resource)
getSupplyAmount
in interface StockManager
public BigDecimal getConsumeAmount(Resource resource)
getConsumeAmount
in interface StockManager
protected Class<?> getBeanClass()
getBeanClass
in class TypedBeansRegistry<ResourceStockManager>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |