ru.bitel.bgbilling.modules.tv.api.server

## Class TvUtils

- java.lang.Object
- - ru.bitel.bgbilling.modules.tv.api.server.TvUtils

-     public class TvUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TvUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost>` | `createServiceCostList(ProductSpecRuntimeMap productSpecRuntimeMap, java.util.List<ProductManager.Entry> entryList)`
    `static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost>` | `createServiceCostList(ProductSpecRuntimeMap productSpecRuntimeMap, TvAccountRuntime tvAccountRuntime, long millis)`
    `static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost>` | `createServiceCostList2(ProductSpecRuntimeMap productSpecRuntimeMap, java.util.List<ProductManager.Entry> entryList)`
    `static long` | `dateFrom(java.util.Date dateFrom, java.util.Calendar utilCalendar)`
    `static long` | `dateTo(java.util.Date dateTo, java.util.Calendar utilCalendar)`
    `static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,Pair<ProductOffering,ProductOfferingActivationMode>>` | `getProductOfferingMap(java.util.List<ProductOffering> productOfferingList)`
    `static java.lang.String` | `macAddressToString(byte[] macAddress)`
    `static java.util.Date` | `moveSecond(java.util.Date time, int amount, java.util.Calendar utilCalendar)`
    `static byte[]` | `parseMacAddress(java.lang.String macAddress)`
    `static long` | `periodAmountToUnit(int periodMode, int periodAmount, java.util.concurrent.TimeUnit unit)`
    `static long` | `secondsFrom(java.util.Date time)`
    `static long` | `secondsTo(java.util.Date time)`
    `static java.util.Calendar` | `toCalendar(long millis)`
    `static java.util.Calendar` | `toCalendarFrom(java.util.Date time)`
    `static java.util.Calendar` | `toCalendarTo(java.util.Date time)`
    `static java.util.Date` | `toDate(long millis)`

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

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

- - ### Constructor Detail

    - #### TvUtils

          public TvUtils()

  - ### Method Detail

    - #### secondsFrom

          public static long secondsFrom(java.util.Date time)

    - #### secondsTo

          public static long secondsTo(java.util.Date time)

    - #### dateFrom

          public static long dateFrom(java.util.Date dateFrom,
                                      java.util.Calendar utilCalendar)

    - #### dateTo

          public static long dateTo(java.util.Date dateTo,
                                    java.util.Calendar utilCalendar)

    - #### toCalendar

          public static java.util.Calendar toCalendar(long millis)

    - #### toCalendarFrom

          public static java.util.Calendar toCalendarFrom(java.util.Date time)

    - #### toCalendarTo

          public static java.util.Calendar toCalendarTo(java.util.Date time)

    - #### toDate

          public static java.util.Date toDate(long millis)

    - #### moveSecond

          public static java.util.Date moveSecond(java.util.Date time,
                                                  int amount,
                                                  java.util.Calendar utilCalendar)

    - #### periodAmountToUnit

          public static long periodAmountToUnit(int periodMode,
                                                int periodAmount,
                                                java.util.concurrent.TimeUnit unit)

    - #### parseMacAddress

          public static byte[] parseMacAddress(java.lang.String macAddress)

    - #### macAddressToString

          public static java.lang.String macAddressToString(byte[] macAddress)

    - #### createServiceCostList

          public static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> createServiceCostList(ProductSpecRuntimeMap productSpecRuntimeMap,
                                                                                                                        java.util.List<ProductManager.Entry> entryList)
                                                                                                                 throws ru.bitel.bgbilling.common.BGException

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

    - #### createServiceCostList2

          public static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> createServiceCostList2(ProductSpecRuntimeMap productSpecRuntimeMap,
                                                                                                                         java.util.List<ProductManager.Entry> entryList)
                                                                                                                  throws ru.bitel.bgbilling.common.BGException

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

    - #### createServiceCostList

          public static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> createServiceCostList(ProductSpecRuntimeMap productSpecRuntimeMap,
                                                                                                                        TvAccountRuntime tvAccountRuntime,
                                                                                                                        long millis)
                                                                                                                 throws ru.bitel.bgbilling.common.BGException

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

    - #### getProductOfferingMap

          public static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,Pair<ProductOffering,ProductOfferingActivationMode>> getProductOfferingMap(java.util.List<ProductOffering> productOfferingList)