public class TvUtils
extends java.lang.Object
Constructor and Description |
---|
TvUtils() |
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)
Список TvServiceCost для текущих активных периодов.
|
static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> |
createServiceCostListForRecalculate(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 void |
filterServiceCostList(java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> serviceCostList,
java.util.Calendar tariffPeriodStart,
java.util.Calendar tariffPeriodStop,
java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> workingServiceCostList,
java.util.Set<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> processedSet)
Отфильтровывание по началу нового тарифа
|
static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,Pair<ProductOffering,ProductOfferingActivationMode>> |
getProductOfferingMap(java.util.List<ProductOffering> productOfferingList) |
static java.util.Set<java.util.Calendar> |
getTariffPeriods(java.util.Date begin,
ru.bitel.bgbilling.kernel.tariff.tree.server.TariffModuleTreeSet tariffTreeSet)
Получение дат смены тарифа (набор dateFrom и dateTo из contract_tariff).
|
static java.net.URL |
getUrl(Device<?,?> tvDevice,
ParameterMap config,
java.lang.String paramName,
java.lang.String paramName2,
java.lang.String defaultHost,
int defaultPort)
Получение URL для подключения к MW по http/https.
|
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) |
public static long secondsFrom(java.util.Date time)
public static long secondsTo(java.util.Date time)
public static long dateFrom(java.util.Date dateFrom, java.util.Calendar utilCalendar)
public static long dateTo(java.util.Date dateTo, java.util.Calendar utilCalendar)
public static java.util.Calendar toCalendar(long millis)
public static java.util.Calendar toCalendarFrom(java.util.Date time)
public static java.util.Calendar toCalendarTo(java.util.Date time)
public static java.util.Date toDate(long millis)
public static java.util.Date moveSecond(java.util.Date time, int amount, java.util.Calendar utilCalendar)
public static long periodAmountToUnit(int periodMode, int periodAmount, java.util.concurrent.TimeUnit unit)
public static byte[] parseMacAddress(java.lang.String macAddress)
public static java.lang.String macAddressToString(byte[] macAddress)
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
ru.bitel.bgbilling.common.BGException
public static java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> createServiceCostListForRecalculate(ProductSpecRuntimeMap productSpecRuntimeMap, java.util.List<ProductManager.Entry> entryList) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
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
productSpecRuntimeMap
- tvAccountRuntime
- millis
- ru.bitel.bgbilling.common.BGException
public static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,Pair<ProductOffering,ProductOfferingActivationMode>> getProductOfferingMap(java.util.List<ProductOffering> productOfferingList)
public static void filterServiceCostList(java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> serviceCostList, java.util.Calendar tariffPeriodStart, java.util.Calendar tariffPeriodStop, java.util.List<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> workingServiceCostList, java.util.Set<ru.bitel.bgbilling.modules.tv.tariff.server.TvServiceCost> processedSet)
tariffPeriod
- serviceCostList
- workingServiceCostList
- processedSet
- public static java.util.Set<java.util.Calendar> getTariffPeriods(java.util.Date begin, ru.bitel.bgbilling.kernel.tariff.tree.server.TariffModuleTreeSet tariffTreeSet)
tariffTreeSet
- public static java.net.URL getUrl(Device<?,?> tvDevice, ParameterMap config, java.lang.String paramName, java.lang.String paramName2, java.lang.String defaultHost, int defaultPort) throws java.net.MalformedURLException
tvDevice
- устройство.config
- конфиг устройства.paramName
- параметр конфигурации, где может быть указан URL.paramName2
- дополнительный параметр конфигурации, где может быть указан URL.defaultHost
- хост по умолчанию.defaultPort
- порт по умолчанию.java.net.MalformedURLException