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 TypeMethodDescriptionvoid
add()
It processes the message to add any new details from uservoid
delete()
It processes the message to delete any new details from userTo get the current sessions clientId, for some operations.void
This 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.void
setClientId(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)void
show()
It will process any request to display something, in future there can be multiple type of viewsvoid
It will suggest the user, what he should do for now(out of his available pending tasks)void
It will process the request to show the unscheduled events in calendarvoid
update()
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:ClientManager
It will process any request for data update- Specified by:
update
in interfaceClientManager
-
setClientId
Description copied from interface:ClientManager
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)- Specified by:
setClientId
in interfaceClientManager
-
getClientId
Description copied from interface:ClientManager
To get the current sessions clientId, for some operations.- Specified by:
getClientId
in interfaceClientManager
- Returns:
- clientId
-
add
public void add()Description copied from interface:ClientManager
It processes the message to add any new details from user- Specified by:
add
in interfaceClientManager
-
delete
public void delete()Description copied from interface:ClientManager
It processes the message to delete any new details from user- Specified by:
delete
in interfaceClientManager
-
show
public void show()Description copied from interface:ClientManager
It will process any request to display something, in future there can be multiple type of views- Specified by:
show
in interfaceClientManager
-
suggestForNow
public void suggestForNow()Description copied from interface:ClientManager
It will suggest the user, what he should do for now(out of his available pending tasks)- Specified by:
suggestForNow
in interfaceClientManager
-
suggestWeeklyUnscheduled
public void suggestWeeklyUnscheduled()Description copied from interface:ClientManager
It will process the request to show the unscheduled events in calendar- Specified by:
suggestWeeklyUnscheduled
in interfaceClientManager
-
processInput
Description copied from interface:ClientManager
This 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:
processInput
in interfaceClientManager
- Parameters:
msg
- raw_input from user- Returns:
- response
-
getLastMessageDataObject
public void getLastMessageDataObject()Description copied from interface:ClientManager
This will be used in future to make bot more interactive, where user can select some option from previously shown options- Specified by:
getLastMessageDataObject
in interfaceClientManager
-