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.SingleCredentialNested classes/interfaces inherited from interface tigase.db.Repository
tigase.db.Repository.Meta, tigase.db.Repository.SchemaIdNested classes/interfaces inherited from interface tigase.db.util.RepositoryVersionAware
tigase.db.util.RepositoryVersionAware.SchemaVersionNested classes/interfaces inherited from interface tigase.db.UserRepository
tigase.db.UserRepository.UserRemovedEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.protected static final StringDeprecated.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataList(tigase.xmpp.jid.BareJID user, String subnode, String key, String[] list) Deprecated.voidaddUser(tigase.xmpp.jid.BareJID user) Deprecated.voidDeprecated.protected byte[]calculateHash(String user) Deprecated.protected byte[]generateId(tigase.xmpp.jid.BareJID user) Deprecated.tigase.db.AuthRepository.AccountStatusgetAccountStatus(tigase.xmpp.jid.BareJID user) Deprecated.longgetActiveUsersCountIn(Duration duration) Deprecated.tigase.auth.credentials.CredentialsgetCredentials(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.longDeprecated.longgetUsersCount(String domain) Deprecated.longgetUserUID(tigase.xmpp.jid.BareJID user) Deprecated.voidinitRepository(String resource_uri, Map<String, String> params) Deprecated.booleanisUserDisabled(tigase.xmpp.jid.BareJID user) Deprecated.voidloggedIn(tigase.xmpp.jid.BareJID jid) Deprecated.voidlogout(tigase.xmpp.jid.BareJID user) Deprecated.booleanDeprecated.voidDeprecated.protected <T> List<T>readAllDistinctValuesForField(com.mongodb.client.MongoCollection<org.bson.Document> collection, String field, org.bson.Document crit) Deprecated.voidremoveCredential(tigase.xmpp.jid.BareJID user, String credentialId) Deprecated.voidremoveData(tigase.xmpp.jid.BareJID user, String key) Deprecated.voidremoveData(tigase.xmpp.jid.BareJID user, String subnode, String key) Deprecated.voidremoveSubnode(tigase.xmpp.jid.BareJID user, String subnode) Deprecated.voidremoveUser(tigase.xmpp.jid.BareJID user) Deprecated.voidsetAccountStatus(tigase.xmpp.jid.BareJID user, tigase.db.AuthRepository.AccountStatus status) Deprecated.voidDeprecated.voidDeprecated.voidsetDataList(tigase.xmpp.jid.BareJID user, String subnode, String key, String[] list) Deprecated.voidsetDataSource(MongoDataSource dataSource) Deprecated.voidsetUserDisabled(tigase.xmpp.jid.BareJID user, Boolean value) Deprecated.voidupdateCredential(tigase.xmpp.jid.BareJID user, String credentialId, String password) Deprecated.voidupdatePassword(tigase.xmpp.jid.BareJID user, String password) Deprecated.tigase.db.util.SchemaLoader.ResultupdateSchema(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, waitMethods inherited from interface tigase.db.AuthRepository
getCredentialIds, getUsernames, isMechanismSupported, setCredentialsCodecsMethods inherited from interface tigase.mongodb.MongoRepositoryVersionAware
getVersionMethods 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:
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.TigaseDBException Deprecated.- Specified by:
addUserin interfacetigase.db.UserRepository- Throws:
tigase.db.UserExistsExceptiontigase.db.TigaseDBException
-
addUser
public void addUser(tigase.xmpp.jid.BareJID user, String password) throws tigase.db.UserExistsException, tigase.db.TigaseDBException Deprecated.- Specified by:
addUserin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserExistsExceptiontigase.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:
getAccountStatusin 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:
getCredentialsin 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:
getDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
getDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getData
public String getData(tigase.xmpp.jid.BareJID user, String key) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
getDataListin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getKeys
public String[] getKeys(tigase.xmpp.jid.BareJID user, String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getKeysin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getKeys
public String[] getKeys(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getKeysin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getPassword
public String getPassword(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getPasswordin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getResourceUri
Deprecated.- Specified by:
getResourceUriin interfacetigase.db.AuthRepository- Specified by:
getResourceUriin interfacetigase.db.UserRepository
-
getSubnodes
public String[] getSubnodes(tigase.xmpp.jid.BareJID user) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getSubnodesin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
getSubnodes
public String[] getSubnodes(tigase.xmpp.jid.BareJID user, String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- Specified by:
getSubnodesin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
getUserUIDin interfacetigase.db.UserRepository- Throws:
tigase.db.TigaseDBException
-
getUsers
Deprecated.- Specified by:
getUsersin interfacetigase.db.UserRepository- Throws:
tigase.db.TigaseDBException
-
getActiveUsersCountIn
Deprecated.- Specified by:
getActiveUsersCountInin interfacetigase.db.AuthRepository
-
getUsersCount
public long getUsersCount()Deprecated.- Specified by:
getUsersCountin interfacetigase.db.AuthRepository- Specified by:
getUsersCountin interfacetigase.db.UserRepository
-
getUsersCount
Deprecated.- Specified by:
getUsersCountin interfacetigase.db.AuthRepository- Specified by:
getUsersCountin interfacetigase.db.UserRepository
-
initRepository
@Deprecated public void initRepository(String resource_uri, Map<String, 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.TigaseDBException Deprecated.- Specified by:
isUserDisabledin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
loggedIn
public void loggedIn(tigase.xmpp.jid.BareJID jid) throws tigase.db.TigaseDBException Deprecated.- 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.TigaseDBException Deprecated.- Specified by:
logoutin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
otherAuth
public boolean otherAuth(Map<String, 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
Deprecated.- Specified by:
queryAuthin 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:
removeCredentialin 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:
removeDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
removeDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
removeSubnode
public void removeSubnode(tigase.xmpp.jid.BareJID user, String subnode) throws tigase.db.UserNotFoundException, tigase.db.TigaseDBException Deprecated.- 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.TigaseDBException Deprecated.- 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.TigaseDBException Deprecated.- Specified by:
setAccountStatusin 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:
setDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
setDatain interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
setDataListin interfacetigase.db.UserRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
setDataSource
Deprecated.- Specified by:
setDataSourcein 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:
setUserDisabledin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.db.TigaseDBException
-
updateCredential
public void updateCredential(tigase.xmpp.jid.BareJID user, String credentialId, String password) throws tigase.db.TigaseDBException Deprecated.- Specified by:
updateCredentialin 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:
updatePasswordin interfacetigase.db.AuthRepository- Throws:
tigase.db.UserNotFoundExceptiontigase.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:
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
-