Package ru.bitel.bgbilling.kernel.contract.limit.server.bean

# Class LimitManager

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.kernel.contract.limit.server.bean.LimitManager

public final class LimitManager extends ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `class`
  `LimitManager.UserLimitMove`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Object`
  `limitMutex`
  чтобы при одновременном событии восстановления лимита по сроку и по оплате лимит не изменился два раза
  `static final int`
  `VPAY_EXPIRED`
  `static final int`
  `VPAY_NOT_PAYOFFED`
  `static final int`
  `VPAY_PARTIAL_PAYOFFED`
  `static final int`
  `VPAY_PAYOFFED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LimitManager(Connection con)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `addMoveTask(LimitChangeTask task)`
  `void`
  `cancelMoveTask(int contractId, List<Integer> taskIds)`
  `void`
  `clientPaymentEvent(PaymentEvent event)`
  Установка понижений лимита оплаченными по фа.
  `void`
  `deleteMoveTaskAndLog(int taskId, int contractId, int userId)`
  Отмена задачи, очистка пользовательской статистики и логов
  `void`
  `executeRestoreLimitTask(Calendar now, String comment)`
  `ContractLimitParameters`
  `getContractLimitParameters(Setup setup, Contract contract)`
  `List<ContractSubPanelManage>`
  `getContractManage(SearchResult<ContractSubPanelManage> searchResult, int contractId)`
  `List<LimitChangeTask>`
  `getContractMoveTasks(int contractId)`
  `List<LimitChangeTask>`
  `getFullTaskList()`
  `int`
  `getLimitMode(int contractId)`
  `List<LimitManager.UserLimitMove>`
  `getUserLimitMove(int contractId, int yy, int mm)`
  `List<LimitManager.UserLimitMove>`
  `getUserLimitMove(int contractId, Calendar date1, Calendar date2)`
  `boolean`
  `initRestoreLimitTask(Calendar date)`
  `void`
  `lowLimit(int cntractId, BigDecimal sum, int days)`
  Временное понижение лимита.
  `void`
  `searchContractLimitAvto(SearchResult<ContractLimitAvto> searchResult, int contractId, String status)`
  `void`
  `setLimitManageMode(int userId, int contractId, int mode)`
  `void`
  `updateContractLimit(int userId, BigDecimal limitValue, int contractId, String comment, int days)`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

  `error, error, error, getLogger, logError, logError`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### VPAY_NOT_PAYOFFED

    public static final int VPAY_NOT_PAYOFFED
    See Also:
      - Constant Field Values

  - ### VPAY_PARTIAL_PAYOFFED

    public static final int VPAY_PARTIAL_PAYOFFED
    See Also:
      - Constant Field Values

  - ### VPAY_PAYOFFED

    public static final int VPAY_PAYOFFED
    See Also:
      - Constant Field Values

  - ### VPAY_EXPIRED

    public static final int VPAY_EXPIRED
    See Also:
      - Constant Field Values

  - ### limitMutex

    public static final Object limitMutex
    чтобы при одновременном событии восстановления лимита по сроку и по оплате лимит не изменился два раза

- ## Constructor Details

  - ### LimitManager

    public LimitManager(Connection con)

- ## Method Details

  - ### searchContractLimitAvto

    public void searchContractLimitAvto(SearchResult<ContractLimitAvto> searchResult, int contractId, String status) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getContractMoveTasks

    public List<LimitChangeTask> getContractMoveTasks(int contractId) throws SQLException
    Throws:
      `SQLException`

  - ### addMoveTask

    public int addMoveTask(LimitChangeTask task) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### cancelMoveTask

    public void cancelMoveTask(int contractId, List<Integer> taskIds) throws SQLException
    Throws:
      `SQLException`

  - ### deleteMoveTaskAndLog

    public void deleteMoveTaskAndLog(int taskId, int contractId, int userId) throws SQLException
    Отмена задачи, очистка пользовательской статистики и логов
    Parameters:
      `taskId` -
      `contractId` -
      `userId` -
    Throws:
      `SQLException`

  - ### getFullTaskList

    public List<LimitChangeTask> getFullTaskList() throws SQLException
    Throws:
      `SQLException`

  - ### updateContractLimit

    public void updateContractLimit(int userId, BigDecimal limitValue, int contractId, String comment, int days) throws SQLException
    Throws:
      `SQLException`

  - ### initRestoreLimitTask

    public boolean initRestoreLimitTask(Calendar date)

  - ### executeRestoreLimitTask

    public void executeRestoreLimitTask(Calendar now, String comment)

  - ### clientPaymentEvent

    public void clientPaymentEvent(PaymentEvent event) throws ru.bitel.bgbilling.common.BGException
    Установка понижений лимита оплаченными по фа.
    Parameters:
      `con` -
      `event` -
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getContractLimitParameters

    public ContractLimitParameters getContractLimitParameters(Setup setup, Contract contract) throws ru.bitel.bgbilling.common.BGException
    Parameters:
      `setup` -
      `contract` - новый bean договора
    Returns:
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### lowLimit

    public void lowLimit(int cntractId, BigDecimal sum, int days) throws ru.bitel.bgbilling.common.BGException
    Временное понижение лимита.
    Parameters:
      `cntractId` - - код договора
      `sum` - - на какую сумму уменьшить лмиит
      `days` - - на сколько дней
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getUserLimitMove

    public List<LimitManager.UserLimitMove> getUserLimitMove(int contractId, int yy, int mm)

  - ### getUserLimitMove

    public List<LimitManager.UserLimitMove> getUserLimitMove(int contractId, Calendar date1, Calendar date2)

  - ### getLimitMode

    public int getLimitMode(int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### getContractManage

    public List<ContractSubPanelManage> getContractManage(SearchResult<ContractSubPanelManage> searchResult, int contractId) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

  - ### setLimitManageMode

    public void setLimitManageMode(int userId, int contractId, int mode) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`