Package com.se21.calbot.ClientManager
Class Discord
java.lang.Object
com.se21.calbot.ClientManager.Discord
- All Implemented Interfaces:
ClientManager
Discord class manages implementation specific to discord users
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String(package private) Controller(package private) User -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd()It processes the message to add any new details from uservoiddelete()It processes the message to delete any new details from userTo get the current sessions clientId, for some operations.voidThis will be used in future to make bot more interactive, where user can select some option from previously shown optionsprocessInput(String msg)This is first function which will be called by the eventListener.voidsetClientId(String clientId)It will set the value of a new clientId to session variables(currently they are local, later we will move them to Spring session variables)voidshow()It will process any request to display something, in future there can be multiple type of viewsvoidIt will suggest the user, what he should do for now(out of his available pending tasks)voidIt will process the request to show the unscheduled events in calendarvoidupdate()It will process any request for data update
-
Field Details
-
Constructor Details
-
Discord
public Discord()
-
-
Method Details
-
update
public void update()Description copied from interface:ClientManagerIt will process any request for data update- Specified by:
updatein interfaceClientManager
-
setClientId
Description copied from interface:ClientManagerIt will set the value of a new clientId to session variables(currently they are local, later we will move them to Spring session variables)- Specified by:
setClientIdin interfaceClientManager
-
getClientId
Description copied from interface:ClientManagerTo get the current sessions clientId, for some operations.- Specified by:
getClientIdin interfaceClientManager- Returns:
- clientId
-
add
public void add()Description copied from interface:ClientManagerIt processes the message to add any new details from user- Specified by:
addin interfaceClientManager
-
delete
public void delete()Description copied from interface:ClientManagerIt processes the message to delete any new details from user- Specified by:
deletein interfaceClientManager
-
show
public void show()Description copied from interface:ClientManagerIt will process any request to display something, in future there can be multiple type of views- Specified by:
showin interfaceClientManager
-
suggestForNow
public void suggestForNow()Description copied from interface:ClientManagerIt will suggest the user, what he should do for now(out of his available pending tasks)- Specified by:
suggestForNowin interfaceClientManager
-
suggestWeeklyUnscheduled
public void suggestWeeklyUnscheduled()Description copied from interface:ClientManagerIt will process the request to show the unscheduled events in calendar- Specified by:
suggestWeeklyUnscheduledin interfaceClientManager
-
processInput
Description copied from interface:ClientManagerThis is first function which will be called by the eventListener. Purpose is to do basic msg parsing and based on received input further call for next operation function.- Specified by:
processInputin interfaceClientManager- Parameters:
msg- raw_input from user- Returns:
- response
-
getLastMessageDataObject
public void getLastMessageDataObject()Description copied from interface:ClientManagerThis will be used in future to make bot more interactive, where user can select some option from previously shown options- Specified by:
getLastMessageDataObjectin interfaceClientManager
-