Package tigase.mongodb
Class MongoRepositoryOld
java.lang.Object
tigase.mongodb.MongoRepositoryOld
- All Implemented Interfaces:
tigase.db.AuthRepository
,tigase.db.DataSourceAware<MongoDataSource>
,tigase.db.Repository
,tigase.db.UserRepository
,tigase.db.util.RepositoryVersionAware
,MongoRepositoryVersionAware
@Deprecated
public class MongoRepositoryOld
extends Object
implements tigase.db.AuthRepository, tigase.db.UserRepository, tigase.db.DataSourceAware<MongoDataSource>, MongoRepositoryVersionAware
Deprecated.
MongoRepository is implementation of UserRepository and AuthRepository which supports MongoDB data store.
- Author:
- andrzej
-
Nested Class Summary
Nested classes/interfaces inherited from interface tigase.db.AuthRepository
tigase.db.AuthRepository.AccountStatus, tigase.db.AuthRepository.DefaultCredentials, tigase.db.AuthRepository.SingleCredential
Nested classes/interfaces inherited from interface tigase.db.Repository
tigase.db.Repository.Meta, tigase.db.Repository.SchemaId
Nested classes/interfaces inherited from interface tigase.db.util.RepositoryVersionAware
tigase.db.util.RepositoryVersionAware.SchemaVersion
Nested classes/interfaces inherited from interface tigase.db.UserRepository
tigase.db.UserRepository.UserRemovedEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Deprecated.protected static final String
Deprecated.protected static final String
Deprecated.protected static final String
Deprecated.protected static final String
Deprecated.Fields inherited from interface tigase.db.AuthRepository
DATA_KEY, DIGEST_ID_KEY, DIGEST_KEY, MACHANISM_KEY, PASSWORD_KEY, PROTOCOL_KEY, PROTOCOL_VAL_NONSASL, PROTOCOL_VAL_SASL, REALM_KEY, RESULT_KEY, SERVER_NAME_KEY, USER_ID_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataList
(tigase.xmpp.jid.BareJID user, String subnode, String key, String[] list) Deprecated.void
addUser
(tigase.xmpp.jid.BareJID user) Deprecated.void
Deprecated.protected byte[]
calculateHash
(String user) Deprecated.protected byte[]
generateId
(tigase.xmpp.jid.BareJID user) Deprecated.tigase.db.AuthRepository.AccountStatus
getAccountStatus
(tigase.xmpp.jid.BareJID user) Deprecated.long
getActiveUsersCountIn
(Duration duration) Deprecated.tigase.auth.credentials.Credentials
getCredentials
(tigase.xmpp.jid.BareJID user, String credentialId) Deprecated.Deprecated.Deprecated.Deprecated.String[]
getDataList
(tigase.xmpp.jid.BareJID user, String subnode, String key) Deprecated.String[]
getKeys
(tigase.xmpp.jid.BareJID user) Deprecated.String[]
Deprecated.getPassword
(tigase.xmpp.jid.BareJID user) Deprecated.Deprecated.String[]
getSubnodes
(tigase.xmpp.jid.BareJID user) Deprecated.String[]
getSubnodes
(tigase.xmpp.jid.BareJID user, String subnode) Deprecated.List<tigase.xmpp.jid.BareJID>
getUsers()
Deprecated.long
Deprecated.long
getUsersCount
(String domain) Deprecated.long
getUserUID
(tigase.xmpp.jid.BareJID user) Deprecated.void
initRepository
(String resource_uri, Map<String, String> params) Deprecated.boolean
isUserDisabled
(tigase.xmpp.jid.BareJID user) Deprecated.void
loggedIn
(tigase.xmpp.jid.BareJID jid) Deprecated.void
logout
(tigase.xmpp.jid.BareJID user) Deprecated.boolean
Deprecated.void
Deprecated.protected <T> List<T>
readAllDistinctValuesForField
(com.mongodb.client.MongoCollection<org.bson.Document> collection, String field, org.bson.Document crit) Deprecated.void
removeCredential
(tigase.xmpp.jid.BareJID user, String credentialId) Deprecated.void
removeData
(tigase.xmpp.jid.BareJID user, String key) Deprecated.void
removeData
(tigase.xmpp.jid.BareJID user, String subnode, String key) Deprecated.void
removeSubnode
(tigase.xmpp.jid.BareJID user, String subnode) Deprecated.void
removeUser
(tigase.xmpp.jid.BareJID user) Deprecated.void
setAccountStatus
(tigase.xmpp.jid.BareJID user, tigase.db.AuthRepository.AccountStatus status) Deprecated.void
Deprecated.void
Deprecated.void
setDataList
(tigase.xmpp.jid.BareJID user, String subnode, String key, String[] list) Deprecated.void
setDataSource
(MongoDataSource dataSource) Deprecated.void
setUserDisabled
(tigase.xmpp.jid.BareJID user, Boolean value) Deprecated.void
updateCredential
(tigase.xmpp.jid.BareJID user, String credentialId, String password) Deprecated.void
updatePassword
(tigase.xmpp.jid.BareJID user, String password) Deprecated.tigase.db.util.SchemaLoader.Result
updateSchema
(Optional<tigase.util.Version> oldVersion, tigase.util.Version newVersion) Deprecated.boolean
userExists
(tigase.xmpp.jid.BareJID user) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tigase.db.AuthRepository
getCredentialIds, getUsernames, isMechanismSupported, setCredentialsCodecs
Methods inherited from interface tigase.mongodb.MongoRepositoryVersionAware
getVersion
Methods inherited from interface tigase.db.UserRepository
getDataMap, getDataMap
-
Field Details
-
USERS_COLLECTION
Deprecated.- See Also:
-
NODES_COLLECTION
Deprecated.- See Also:
-
ID_KEY
Deprecated.- See Also:
-
DOMAIN_KEY
Deprecated.- See Also:
-
autoCreateUser
@ConfigField(desc="Auto create user", alias="autoCreateUser=") protected boolean autoCreateUserDeprecated.
-
-
Constructor Details
-
MongoRepositoryOld
public MongoRepositoryOld()Deprecated.
-
-
Method Details
-
addDataList
public void addDataList(tigase.xmpp.jid.BareJID user, String subnode, String key, String[] list) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
addDataList
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
addUser
public void addUser(tigase.xmpp.jid.BareJID user) throws tigase.db.UserExistsException, tigase.db.TigaseDBException Deprecated.- Specified by:
addUser
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserExistsException
tigase.db.TigaseDBException
-
addUser
public void addUser(tigase.xmpp.jid.BareJID user, String password) throws tigase.db.UserExistsException, tigase.db.TigaseDBException Deprecated.- Specified by:
addUser
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserExistsException
tigase.db.TigaseDBException
-
calculateHash
Deprecated.- Throws:
tigase.db.TigaseDBException
-
generateId
protected byte[] generateId(tigase.xmpp.jid.BareJID user) throws tigase.db.TigaseDBException Deprecated.- Throws:
tigase.db.TigaseDBException
-
getAccountStatus
public tigase.db.AuthRepository.AccountStatus getAccountStatus(tigase.xmpp.jid.BareJID user) throws tigase.db.TigaseDBException Deprecated.- Specified by:
getAccountStatus
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.TigaseDBException
-
getCredentials
public tigase.auth.credentials.Credentials getCredentials(tigase.xmpp.jid.BareJID user, String credentialId) throws tigase.db.TigaseDBException Deprecated.- Specified by:
getCredentials
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.TigaseDBException
-
getData
public String getData(tigase.xmpp.jid.BareJID user, String subnode, String key, String def) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getData
public String getData(tigase.xmpp.jid.BareJID user, String subnode, String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getData
public String getData(tigase.xmpp.jid.BareJID user, String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getDataList
public String[] getDataList(tigase.xmpp.jid.BareJID user, String subnode, String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getDataList
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getKeys
public String[] getKeys(tigase.xmpp.jid.BareJID user, String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getKeys
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getKeys
public String[] getKeys(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getKeys
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getPassword
public String getPassword(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getPassword
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getResourceUri
Deprecated.- Specified by:
getResourceUri
in interfacetigase.db.AuthRepository
- Specified by:
getResourceUri
in interfacetigase.db.UserRepository
-
getSubnodes
public String[] getSubnodes(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getSubnodes
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getSubnodes
public String[] getSubnodes(tigase.xmpp.jid.BareJID user, String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getSubnodes
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
getUserUID
Deprecated.Should be removed an only relational DB are using this and it is not required by any other code- Specified by:
getUserUID
in interfacetigase.db.UserRepository
- Throws:
tigase.db.TigaseDBException
-
getUsers
Deprecated.- Specified by:
getUsers
in interfacetigase.db.UserRepository
- Throws:
tigase.db.TigaseDBException
-
getActiveUsersCountIn
Deprecated.- Specified by:
getActiveUsersCountIn
in interfacetigase.db.AuthRepository
-
getUsersCount
public long getUsersCount()Deprecated.- Specified by:
getUsersCount
in interfacetigase.db.AuthRepository
- Specified by:
getUsersCount
in interfacetigase.db.UserRepository
-
getUsersCount
Deprecated.- Specified by:
getUsersCount
in interfacetigase.db.AuthRepository
- Specified by:
getUsersCount
in interfacetigase.db.UserRepository
-
initRepository
@Deprecated public void initRepository(String resource_uri, Map<String, String> params) throws tigase.db.DBInitExceptionDeprecated.- Specified by:
initRepository
in interfacetigase.db.Repository
- Throws:
tigase.db.DBInitException
-
isUserDisabled
public boolean isUserDisabled(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
isUserDisabled
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
loggedIn
public void loggedIn(tigase.xmpp.jid.BareJID jid) throws tigase.db.TigaseDBException Deprecated.- Specified by:
loggedIn
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.TigaseDBException
-
logout
public void logout(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
logout
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
otherAuth
public boolean otherAuth(Map<String, Object> authProps) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException, tigase.db.AuthorizationExceptionDeprecated.- Specified by:
otherAuth
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
tigase.db.AuthorizationException
-
queryAuth
Deprecated.- Specified by:
queryAuth
in interfacetigase.db.AuthRepository
-
readAllDistinctValuesForField
protected <T> List<T> readAllDistinctValuesForField(com.mongodb.client.MongoCollection<org.bson.Document> collection, String field, org.bson.Document crit) throws com.mongodb.MongoException Deprecated.- Throws:
com.mongodb.MongoException
-
removeCredential
public void removeCredential(tigase.xmpp.jid.BareJID user, String credentialId) throws tigase.db.TigaseDBException Deprecated.- Specified by:
removeCredential
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.TigaseDBException
-
removeData
public void removeData(tigase.xmpp.jid.BareJID user, String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
removeData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
removeData
public void removeData(tigase.xmpp.jid.BareJID user, String subnode, String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
removeData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
removeSubnode
public void removeSubnode(tigase.xmpp.jid.BareJID user, String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
removeSubnode
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
removeUser
public void removeUser(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
removeUser
in interfacetigase.db.AuthRepository
- Specified by:
removeUser
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
setAccountStatus
public void setAccountStatus(tigase.xmpp.jid.BareJID user, tigase.db.AuthRepository.AccountStatus status) throws tigase.db.TigaseDBException Deprecated.- Specified by:
setAccountStatus
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.TigaseDBException
-
setData
public void setData(tigase.xmpp.jid.BareJID user, String key, String value) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
setData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
setData
public void setData(tigase.xmpp.jid.BareJID user, String subnode, String key, String value) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
setData
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
setDataList
public void setDataList(tigase.xmpp.jid.BareJID user, String subnode, String key, String[] list) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
setDataList
in interfacetigase.db.UserRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
setDataSource
Deprecated.- Specified by:
setDataSource
in interfacetigase.db.DataSourceAware<MongoDataSource>
-
setUserDisabled
public void setUserDisabled(tigase.xmpp.jid.BareJID user, Boolean value) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
setUserDisabled
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
updateCredential
public void updateCredential(tigase.xmpp.jid.BareJID user, String credentialId, String password) throws tigase.db.TigaseDBException Deprecated.- Specified by:
updateCredential
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.TigaseDBException
-
updatePassword
public void updatePassword(tigase.xmpp.jid.BareJID user, String password) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
updatePassword
in interfacetigase.db.AuthRepository
- Throws:
tigase.db.UserNotFoundException
tigase.db.TigaseDBException
-
updateSchema
public tigase.db.util.SchemaLoader.Result updateSchema(Optional<tigase.util.Version> oldVersion, tigase.util.Version newVersion) throws tigase.db.TigaseDBException Deprecated.- Specified by:
updateSchema
in interfacetigase.db.util.RepositoryVersionAware
- Throws:
tigase.db.TigaseDBException
-
userExists
public boolean userExists(tigase.xmpp.jid.BareJID user) Deprecated.- Specified by:
userExists
in interfacetigase.db.UserRepository
-