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 java.lang.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
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoCreateUserDeprecated.protected static java.lang.StringDOMAIN_KEYDeprecated.protected static java.lang.StringID_KEYDeprecated.protected static java.lang.StringNODES_COLLECTIONDeprecated.protected static java.lang.StringUSERS_COLLECTIONDeprecated.
-
Constructor Summary
Constructors Constructor Description MongoRepositoryOld()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDataList(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String[] list)Deprecated.voidaddUser(tigase.xmpp.jid.BareJID user)Deprecated.voidaddUser(tigase.xmpp.jid.BareJID user, java.lang.String password)Deprecated.protected byte[]calculateHash(java.lang.String user)Deprecated.protected byte[]generateId(tigase.xmpp.jid.BareJID user)Deprecated.tigase.db.AuthRepository.AccountStatusgetAccountStatus(tigase.xmpp.jid.BareJID user)Deprecated.tigase.auth.credentials.CredentialsgetCredentials(tigase.xmpp.jid.BareJID user, java.lang.String credentialId)Deprecated.java.lang.StringgetData(tigase.xmpp.jid.BareJID user, java.lang.String key)Deprecated.java.lang.StringgetData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key)Deprecated.java.lang.StringgetData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String def)Deprecated.java.lang.String[]getDataList(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key)Deprecated.java.lang.String[]getKeys(tigase.xmpp.jid.BareJID user)Deprecated.java.lang.String[]getKeys(tigase.xmpp.jid.BareJID user, java.lang.String subnode)Deprecated.java.lang.StringgetPassword(tigase.xmpp.jid.BareJID user)Deprecated.java.lang.StringgetResourceUri()Deprecated.java.lang.String[]getSubnodes(tigase.xmpp.jid.BareJID user)Deprecated.java.lang.String[]getSubnodes(tigase.xmpp.jid.BareJID user, java.lang.String subnode)Deprecated.java.util.List<tigase.xmpp.jid.BareJID>getUsers()Deprecated.longgetUsersCount()Deprecated.longgetUsersCount(java.lang.String domain)Deprecated.longgetUserUID(tigase.xmpp.jid.BareJID user)Deprecated.voidinitRepository(java.lang.String resource_uri, java.util.Map<java.lang.String,java.lang.String> params)Deprecated.booleanisUserDisabled(tigase.xmpp.jid.BareJID user)Deprecated.voidloggedIn(tigase.xmpp.jid.BareJID jid)Deprecated.voidlogout(tigase.xmpp.jid.BareJID user)Deprecated.booleanotherAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)Deprecated.voidqueryAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)Deprecated.protected <T> java.util.List<T>readAllDistinctValuesForField(com.mongodb.client.MongoCollection<org.bson.Document> collection, java.lang.String field, org.bson.Document crit)Deprecated.voidremoveCredential(tigase.xmpp.jid.BareJID user, java.lang.String credentialId)Deprecated.voidremoveData(tigase.xmpp.jid.BareJID user, java.lang.String key)Deprecated.voidremoveData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key)Deprecated.voidremoveSubnode(tigase.xmpp.jid.BareJID user, java.lang.String subnode)Deprecated.voidremoveUser(tigase.xmpp.jid.BareJID user)Deprecated.voidsetAccountStatus(tigase.xmpp.jid.BareJID user, tigase.db.AuthRepository.AccountStatus status)Deprecated.voidsetData(tigase.xmpp.jid.BareJID user, java.lang.String key, java.lang.String value)Deprecated.voidsetData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String value)Deprecated.voidsetDataList(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String[] list)Deprecated.voidsetDataSource(MongoDataSource dataSource)Deprecated.voidsetUserDisabled(tigase.xmpp.jid.BareJID user, java.lang.Boolean value)Deprecated.voidupdateCredential(tigase.xmpp.jid.BareJID user, java.lang.String credentialId, java.lang.String password)Deprecated.voidupdatePassword(tigase.xmpp.jid.BareJID user, java.lang.String password)Deprecated.tigase.db.util.SchemaLoader.ResultupdateSchema(java.util.Optional<tigase.util.Version> oldVersion, tigase.util.Version newVersion)Deprecated.booleanuserExists(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
-
-
-
-
Field Detail
-
USERS_COLLECTION
protected static final java.lang.String USERS_COLLECTION
Deprecated.- See Also:
- Constant Field Values
-
NODES_COLLECTION
protected static final java.lang.String NODES_COLLECTION
Deprecated.- See Also:
- Constant Field Values
-
ID_KEY
protected static final java.lang.String ID_KEY
Deprecated.- See Also:
- Constant Field Values
-
DOMAIN_KEY
protected static final java.lang.String DOMAIN_KEY
Deprecated.- See Also:
- Constant Field Values
-
autoCreateUser
@ConfigField(desc="Auto create user", alias="autoCreateUser=") protected boolean autoCreateUserDeprecated.
-
-
Method Detail
-
addDataList
public void addDataList(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String[] list) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
addDataListin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
addUser
public void addUser(tigase.xmpp.jid.BareJID user) throws tigase.db.UserExistsException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
addUserin interfacetigase.db.UserRepository- Throws:
tigase.db.UserExistsExceptiontigase.db.TigaseDBException
-
addUser
public void addUser(tigase.xmpp.jid.BareJID user, java.lang.String password) throws tigase.db.UserExistsException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
addUserin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserExistsExceptiontigase.db.TigaseDBException
-
calculateHash
protected byte[] calculateHash(java.lang.String user) throws tigase.db.TigaseDBExceptionDeprecated.- Throws:
tigase.db.TigaseDBException
-
generateId
protected byte[] generateId(tigase.xmpp.jid.BareJID user) throws tigase.db.TigaseDBExceptionDeprecated.- Throws:
tigase.db.TigaseDBException
-
getAccountStatus
public tigase.db.AuthRepository.AccountStatus getAccountStatus(tigase.xmpp.jid.BareJID user) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getAccountStatusin interfacetigase.db.AuthRepository- Throws:
tigase.db.TigaseDBException
-
getCredentials
public tigase.auth.credentials.Credentials getCredentials(tigase.xmpp.jid.BareJID user, java.lang.String credentialId) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getCredentialsin interfacetigase.db.AuthRepository- Throws:
tigase.db.TigaseDBException
-
getData
public java.lang.String getData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String def) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getData
public java.lang.String getData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getData
public java.lang.String getData(tigase.xmpp.jid.BareJID user, java.lang.String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getDataList
public java.lang.String[] getDataList(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getDataListin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getKeys
public java.lang.String[] getKeys(tigase.xmpp.jid.BareJID user, java.lang.String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getKeysin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getKeys
public java.lang.String[] getKeys(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getKeysin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getPassword
public java.lang.String getPassword(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getPasswordin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getResourceUri
public java.lang.String getResourceUri()
Deprecated.- Specified by:
getResourceUriin interfacetigase.db.AuthRepository- Specified by:
getResourceUriin interfacetigase.db.UserRepository
-
getSubnodes
public java.lang.String[] getSubnodes(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getSubnodesin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getSubnodes
public java.lang.String[] getSubnodes(tigase.xmpp.jid.BareJID user, java.lang.String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getSubnodesin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getUserUID
@Deprecated public long getUserUID(tigase.xmpp.jid.BareJID user) throws tigase.db.TigaseDBExceptionDeprecated.Should be removed an only relational DB are using this and it is not required by any other code- Specified by:
getUserUIDin interfacetigase.db.UserRepository- Throws:
tigase.db.TigaseDBException
-
getUsers
public java.util.List<tigase.xmpp.jid.BareJID> getUsers() throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
getUsersin interfacetigase.db.UserRepository- Throws:
tigase.db.TigaseDBException
-
getUsersCount
public long getUsersCount()
Deprecated.- Specified by:
getUsersCountin interfacetigase.db.AuthRepository- Specified by:
getUsersCountin interfacetigase.db.UserRepository
-
getUsersCount
public long getUsersCount(java.lang.String domain)
Deprecated.- Specified by:
getUsersCountin interfacetigase.db.AuthRepository- Specified by:
getUsersCountin interfacetigase.db.UserRepository
-
initRepository
@Deprecated public void initRepository(java.lang.String resource_uri, java.util.Map<java.lang.String,java.lang.String> params) throws tigase.db.DBInitExceptionDeprecated.- Specified by:
initRepositoryin interfacetigase.db.Repository- Throws:
tigase.db.DBInitException
-
isUserDisabled
public boolean isUserDisabled(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
isUserDisabledin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
loggedIn
public void loggedIn(tigase.xmpp.jid.BareJID jid) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
loggedInin interfacetigase.db.AuthRepository- Throws:
tigase.db.TigaseDBException
-
logout
public void logout(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
logoutin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
otherAuth
public boolean otherAuth(java.util.Map<java.lang.String,java.lang.Object> authProps) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException, tigase.db.AuthorizationExceptionDeprecated.- Specified by:
otherAuthin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBExceptiontigase.db.AuthorizationException
-
queryAuth
public void queryAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)
Deprecated.- Specified by:
queryAuthin interfacetigase.db.AuthRepository
-
readAllDistinctValuesForField
protected <T> java.util.List<T> readAllDistinctValuesForField(com.mongodb.client.MongoCollection<org.bson.Document> collection, java.lang.String field, org.bson.Document crit) throws com.mongodb.MongoExceptionDeprecated.- Throws:
com.mongodb.MongoException
-
removeCredential
public void removeCredential(tigase.xmpp.jid.BareJID user, java.lang.String credentialId) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
removeCredentialin interfacetigase.db.AuthRepository- Throws:
tigase.db.TigaseDBException
-
removeData
public void removeData(tigase.xmpp.jid.BareJID user, java.lang.String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
removeDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
removeData
public void removeData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
removeDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
removeSubnode
public void removeSubnode(tigase.xmpp.jid.BareJID user, java.lang.String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
removeSubnodein interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
removeUser
public void removeUser(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
removeUserin interfacetigase.db.AuthRepository- Specified by:
removeUserin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
setAccountStatus
public void setAccountStatus(tigase.xmpp.jid.BareJID user, tigase.db.AuthRepository.AccountStatus status) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
setAccountStatusin interfacetigase.db.AuthRepository- Throws:
tigase.db.TigaseDBException
-
setData
public void setData(tigase.xmpp.jid.BareJID user, java.lang.String key, java.lang.String value) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
setDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
setData
public void setData(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String value) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
setDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
setDataList
public void setDataList(tigase.xmpp.jid.BareJID user, java.lang.String subnode, java.lang.String key, java.lang.String[] list) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
setDataListin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
setDataSource
public void setDataSource(MongoDataSource dataSource)
Deprecated.- Specified by:
setDataSourcein interfacetigase.db.DataSourceAware<MongoDataSource>
-
setUserDisabled
public void setUserDisabled(tigase.xmpp.jid.BareJID user, java.lang.Boolean value) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
setUserDisabledin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
updateCredential
public void updateCredential(tigase.xmpp.jid.BareJID user, java.lang.String credentialId, java.lang.String password) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
updateCredentialin interfacetigase.db.AuthRepository- Throws:
tigase.db.TigaseDBException
-
updatePassword
public void updatePassword(tigase.xmpp.jid.BareJID user, java.lang.String password) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBExceptionDeprecated.- Specified by:
updatePasswordin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
updateSchema
public tigase.db.util.SchemaLoader.Result updateSchema(java.util.Optional<tigase.util.Version> oldVersion, tigase.util.Version newVersion) throws tigase.db.TigaseDBExceptionDeprecated.- Specified by:
updateSchemain interfacetigase.db.util.RepositoryVersionAware- Throws:
tigase.db.TigaseDBException
-
userExists
public boolean userExists(tigase.xmpp.jid.BareJID user)
Deprecated.- Specified by:
userExistsin interfacetigase.db.UserRepository
-
-