RepositoryFactory

In order to have more freedom while accessing repositories it’s possible to use tigase.db.RepositoryFactory and any of the methods that pertain to desired type of repository one wants to access (auth, user, data):

  • RepositoryFactory.getAuthRepository()
  • RepositoryFactory.getUserRepository()
  • RepositoryFactory.getDataRepository()

Each method takes same set of arguments:

  • class_name - qualified name of the class that implements aforementioned repositories type
  • URI - repository URI
  • params - map containing additional configuration for the connection.

If there is already available repository for the <class_name><URI> identifier then it’s returned, otherwise new instance is created.