Interface BotManagerService
public interface BotManagerService
-
Method Summary
Modifier and TypeMethodDescriptionvoidclearStatisticByBotId(int botId) Удаляет статистику для бота.voidclearStatisticByContractId(int contractId) voiddeleteBot(int botId) voiddeleteDialog(BotDialog dialog) voiddeleteDialogElement(BotDialogElement element) voiddeleteDialogGroup(BotDialogGroup group) getBots()Key - token бота, value - экземпляр ботаgetDialogByCommand(String command) getDialogById(int dialogId) getDialogsByGroupId(int dialogGroupId) Получение всех диалогов из группыgetElementsByIds(List<Integer> ids) getElementsOfDialog(int dialogId) byte[]getFile(int elementId) getStatistic(Page page) getStatisticByContractId(int contractId) voidОбновляет список обработчиков диалоговvoidsetFile(BotDialogElement element, byte[] imageBytes) voidОбновление данных бота.voidupdateDialog(BotDialog dialog) intupdateDialogElement(BotDialogElement element) voidupdateDialogElements(List<BotDialogElement> elements) voidupdateDialogGroup(BotDialogGroup group) voidupdateDialogGroups(List<BotDialogGroup> groups) voidupdateSortPositionOfElements(Map<Integer, Integer> elementSorting) Обновление сортировки
-
Method Details
-
getBots
List<Bot> getBots() throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageExceptionKey - token бота, value - экземпляр бота- Returns:
- список созданных ботов
- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
updateBot
void updateBot(Bot bot) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException Обновление данных бота. Если он запущен, то обновление будет произведено сразу- Parameters:
bot- бот с изменёнными параметрами для обновления- Throws:
ru.bitel.bgbilling.common.BGException- в случае, если не удалось обновить конфигурацию ботаru.bitel.bgbilling.common.BGMessageException
-
deleteBot
void deleteBot(int botId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogs
List<BotDialog> getDialogs() throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogById
BotDialog getDialogById(int dialogId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogByCommand
BotDialog getDialogByCommand(String command) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
updateDialog
void updateDialog(BotDialog dialog) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
deleteDialog
void deleteDialog(BotDialog dialog) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogElements
List<BotDialogElement> getDialogElements() throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException- Returns:
- список элементов для построения диалогов
- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
updateDialogElement
int updateDialogElement(BotDialogElement element) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
updateDialogElements
void updateDialogElements(List<BotDialogElement> elements) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
deleteDialogElement
void deleteDialogElement(BotDialogElement element) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getElementsByIds
List<BotDialogElement> getElementsByIds(List<Integer> ids) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getElementsOfDialog
List<BotDialogElement> getElementsOfDialog(int dialogId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Returns:
- список элементов для указанного диалога
- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogGroups
List<BotDialogGroup> getDialogGroups() throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException- Returns:
- список групп диалогов
- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
updateDialogGroup
void updateDialogGroup(BotDialogGroup group) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
updateDialogGroups
void updateDialogGroups(List<BotDialogGroup> groups) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
deleteDialogGroup
void deleteDialogGroup(BotDialogGroup group) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogsByGroupId
List<BotDialog> getDialogsByGroupId(int dialogGroupId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException Получение всех диалогов из группы- Parameters:
dialogGroupId- id группы диалогов- Returns:
- вернёт список диалогов из группы, если переданный id = -1, вернёт диалоги не состоящие ни в какой группе
- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
reloadDialogProcessingClasses
void reloadDialogProcessingClasses() throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageExceptionОбновляет список обработчиков диалогов- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getDialogProcessingClasses
List<DialogProcessingWrapper> getDialogProcessingClasses() throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException- Returns:
- список обработчиков диалогов
- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getFile
byte[] getFile(int elementId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
setFile
void setFile(BotDialogElement element, byte[] imageBytes) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
updateSortPositionOfElements
Обновление сортировки- Parameters:
elementSorting- key - id элемента, value - его позиция при сортировке
-
getStatistic
SearchResult<StatisticNote> getStatistic(Page page) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
getStatisticByContractId
List<StatisticNote> getStatisticByContractId(int contractId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
clearStatisticByBotId
void clearStatisticByBotId(int botId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException Удаляет статистику для бота. Если передано -1, то будет очищена вся статистика- Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-
clearStatisticByContractId
void clearStatisticByContractId(int contractId) throws ru.bitel.bgbilling.common.BGException, ru.bitel.bgbilling.common.BGMessageException - Throws:
ru.bitel.bgbilling.common.BGExceptionru.bitel.bgbilling.common.BGMessageException
-