Package me.autobot.lib.server.topica
Class Topica.Database
java.lang.Object
me.autobot.lib.server.topica.Topica.Database
- Enclosing class:
- Topica
Database for the Topica server, containing all of the different topics.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
An interface allowing for custom encodeable topics.static class
A topic of the database. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addTopic
(Topica.Database.Topic topic) Adds a topic to the database.String[]
Get all default topicsString[]
Get all (real) topics.Gets a topic from the database by the path.boolean
Checks if the topic exists or notvoid
removeTopic
(Topica.Database.Topic topic) Removes a topic from the database.
-
Constructor Details
-
Database
public Database()Creates a new topic database.
-
-
Method Details
-
getRealTopics
Get all (real) topics.- Returns:
- All real topics, that is, excluding any client-specific topics.
-
getDefaultTopics
Get all default topics- Returns:
- All default topics, that is, only client-specific topics.
-
addTopic
Adds a topic to the database.- Parameters:
topic
- The topic to add.
-
removeTopic
Removes a topic from the database.- Parameters:
topic
- The topic to remove.
-
getTopic
Gets a topic from the database by the path.- Parameters:
path
- The path of the topic.- Returns:
- The topic with the given path.
-
hasTopic
Checks if the topic exists or not- Parameters:
path
- The path of the topic.- Returns:
- True if the topic exists, false otherwise.
-