ru.bitel.bgbilling.kernel.tariff.option.server.bean

## Class ContractTariffOptionActivateManager

- java.lang.Object
- - ru.bitel.bgbilling.kernel.tariff.option.server.bean.ContractTariffOptionActivateManager

- All Implemented Interfaces:
    ru.bitel.common.worker.Recyclable

      public class ContractTariffOptionActivateManager
      extends java.lang.Object
      implements ru.bitel.common.worker.Recyclable

  Менеджер по активации/деактивации тарифных опций на договоре.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContractTariffOptionActivateManager(java.sql.Connection con)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateOption(TariffOptionService tariffOptionService, int userId, int cid, int optionId, int modeId, boolean web)`
    `int` | `activateOptionWhithSum(TariffOptionService tariffOptionService, int userId, int cid, int optionId, int modeId, java.math.BigDecimal sum, boolean web)`
    `int` | `activateOptionWhithSumAndPeriod(TariffOptionService tariffOptionService, int userId, int cid, int optionId, int modeId, java.math.BigDecimal sum, Period period, boolean web)`
    `void` | `deactivateOption(int userId, int cid, int contractOptionId)` Обычная деактивация опции
    `void` | `deleteOption(int userId, int cid, int contractOptionId, boolean customer)` Обычная деактивация опции
    `Tied.Utils<ContractTariffOption,TariffOption>` | `getTieUtils()`
    `protected void` | `processTieException(Tied.TieUnresolvedException ex, int cid)`
    `void` | `reactivateOption(int userId, int cid, int contractOptionId)`
    `void` | `recycle()`
    `boolean` | `tryDeactivateOption(int userId, int cid, int contractOptionId, boolean checkDeactivated, boolean deactivateNow)` Попытка деактивировать опцию
    `boolean` | `tryDeleteOption(int userId, int cid, int contractOptionId, boolean customer)` Попытка деактивировать опцию

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

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

- - ### Constructor Detail

    - #### ContractTariffOptionActivateManager

          public ContractTariffOptionActivateManager(java.sql.Connection con)

  - ### Method Detail

    - #### activateOption

          public void activateOption(TariffOptionService tariffOptionService,
                                     int userId,
                                     int cid,
                                     int optionId,
                                     int modeId,
                                     boolean web)
                              throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### activateOptionWhithSum

          public int activateOptionWhithSum(TariffOptionService tariffOptionService,
                                            int userId,
                                            int cid,
                                            int optionId,
                                            int modeId,
                                            java.math.BigDecimal sum,
                                            boolean web)
                                     throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### activateOptionWhithSumAndPeriod

          public int activateOptionWhithSumAndPeriod(TariffOptionService tariffOptionService,
                                                     int userId,
                                                     int cid,
                                                     int optionId,
                                                     int modeId,
                                                     java.math.BigDecimal sum,
                                                     Period period,
                                                     boolean web)
                                              throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### processTieException

          protected void processTieException(Tied.TieUnresolvedException ex,
                                             int cid)
                                      throws ru.bitel.bgbilling.common.BGMessageException

      Throws:
        `ru.bitel.bgbilling.common.BGMessageException`

    - #### deactivateOption

          public void deactivateOption(int userId,
                                       int cid,
                                       int contractOptionId)
                                throws ru.bitel.bgbilling.common.BGException

      Обычная деактивация опции
      Parameters:
        `userId` -
        `cid` -
        `contractOptionId` -
      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### tryDeactivateOption

          public boolean tryDeactivateOption(int userId,
                                             int cid,
                                             int contractOptionId,
                                             boolean checkDeactivated,
                                             boolean deactivateNow)
                                      throws ru.bitel.bgbilling.common.BGException

      Попытка деактивировать опцию
      Parameters:
        `userId` -
        `cid` -
        `contractOptionId` -
        `checkClosed` -
      Returns:
      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### reactivateOption

          public void reactivateOption(int userId,
                                       int cid,
                                       int contractOptionId)
                                throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getTieUtils

          public Tied.Utils<ContractTariffOption,TariffOption> getTieUtils()
                                                                    throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### deleteOption

          public void deleteOption(int userId,
                                   int cid,
                                   int contractOptionId,
                                   boolean customer)
                            throws ru.bitel.bgbilling.common.BGException

      Обычная деактивация опции
      Parameters:
        `userId` -
        `cid` -
        `contractOptionId` -
      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### tryDeleteOption

          public boolean tryDeleteOption(int userId,
                                         int cid,
                                         int contractOptionId,
                                         boolean customer)
                                  throws ru.bitel.bgbilling.common.BGException

      Попытка деактивировать опцию
      Parameters:
        `userId` -
        `cid` -
        `contractOptionId` -
        `checkClosed` -
      Returns:
      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### recycle

          public void recycle()

      Specified by:
        `recycle` in interface `ru.bitel.common.worker.Recyclable`