Class Topica.Database

java.lang.Object
me.autobot.lib.server.topica.Topica.Database
Enclosing class:
Topica

public static class Topica.Database extends Object
Database for the Topica server, containing all of the different topics.
  • Constructor Details

    • Database

      public Database()
      Creates a new topic database.
  • Method Details

    • getRealTopics

      public String[] getRealTopics()
      Get all (real) topics.
      Returns:
      All real topics, that is, excluding any client-specific topics.
    • getDefaultTopics

      public String[] getDefaultTopics()
      Get all default topics
      Returns:
      All default topics, that is, only client-specific topics.
    • addTopic

      protected void addTopic(Topica.Database.Topic topic)
      Adds a topic to the database.
      Parameters:
      topic - The topic to add.
    • removeTopic

      public void removeTopic(Topica.Database.Topic topic)
      Removes a topic from the database.
      Parameters:
      topic - The topic to remove.
    • getTopic

      public Topica.Database.Topic getTopic(String path)
      Gets a topic from the database by the path.
      Parameters:
      path - The path of the topic.
      Returns:
      The topic with the given path.
    • hasTopic

      public boolean hasTopic(String path)
      Checks if the topic exists or not
      Parameters:
      path - The path of the topic.
      Returns:
      True if the topic exists, false otherwise.