Class Discord

java.lang.Object
com.se21.calbot.ClientManager.Discord
All Implemented Interfaces:
ClientManager

@Service public class Discord extends Object implements ClientManager
Discord class manages implementation specific to discord users
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) String
     
    (package private) Controller
     
    (package private) User
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add()
    It processes the message to add any new details from user
    void
    It processes the message to delete any new details from user
    To 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 options
    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
    It will process any request to display something, in future there can be multiple type of views
    void
    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 calendar
    void
    It will process any request for data update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface ClientManager
    • setClientId

      public void setClientId(String clientId)
      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 interface ClientManager
    • getClientId

      public String getClientId()
      Description copied from interface: ClientManager
      To get the current sessions clientId, for some operations.
      Specified by:
      getClientId in interface ClientManager
      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 interface ClientManager
    • delete

      public void delete()
      Description copied from interface: ClientManager
      It processes the message to delete any new details from user
      Specified by:
      delete in interface ClientManager
    • 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 interface ClientManager
    • 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 interface ClientManager
    • 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 interface ClientManager
    • processInput

      public String processInput(String msg)
      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 interface ClientManager
      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 interface ClientManager