Class Controller

java.lang.Object
com.se21.calbot.controllers.Controller

@Service public class Controller extends Object
This is main controller class for whole aPAS. In block diagram of architecture, you can see this class at the center. It serves various purposes, but major functionality is to provide some algorithm to suggest most optimal activities to be done by user.
  • Field Details

  • Constructor Details

    • Controller

      public Controller()
  • Method Details

    • initDb

      public void initDb(String discordId)
      It will create a new entry in db for current user if it already doesn't exist. Else it will retrieve all existing data from db.
      Parameters:
      discordId -
    • arrangeEvents

      public String arrangeEvents() throws Exception
      This function contains the logic to re-arrange all events on the basis of priority and suggest most optimal ones for today/week.
      Returns:
      Throws:
      Exception
    • dataOperation

      public String dataOperation(Enums.operationType opType, String... msgParam)
      This is single interface function for clientManager layer to directly call some CRUD operation for calendar layer.
      Parameters:
      opType - Add, delete, Retrieve.......etc.
      msgParam - the user given parameters
      Returns:
      Output received after operation execution
    • getUrl

      public String getUrl(String discordId, String calType)
      To get URL for OAUTH 2.0
      Parameters:
      discordId -
      calType -
      Returns:
      URL