RefyUsersService

@Service
@Primary
open class RefyUsersService : EquinoxUsersService<T, R>

The RefyUsersService class is useful to manage all the Refy's user database operations

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxUsersService
ResourcesManager

Constructors

Link copied to clipboard
@Autowired
constructor(usersRepository: RefyUsersRepository, collectionsRepository: CollectionsRepository, teamsRepository: TeamsRepository)
Constructor used to init the EquinoxUsersService service

Properties

Link copied to clipboard
protected val _DROP_COLUMN_: String = " DROP COLUMN "
Link copied to clipboard
protected val _FROM_: String = " FROM "
Link copied to clipboard
protected val ALTER_TABLE_: String = "ALTER TABLE "
Link copied to clipboard
protected val BASE_SIGN_UP_QUERY: String = "INSERT INTO users("
Link copied to clipboard
collectionsRepository instance for the collections repository
Link copied to clipboard
Link copied to clipboard
protected open var discriminatorValue: String
Link copied to clipboard
protected open var entityManager: EntityManager
Link copied to clipboard
val PROFILES_DIRECTORY: String = "profiles"
Link copied to clipboard
val RESOURCES_KEY: String = "resources"
Link copied to clipboard
val RESOURCES_PATH: String = "resources/"
Link copied to clipboard
protected val SELECT_: String = "SELECT "
Link copied to clipboard
teamsRepository instance for the teams repository
Link copied to clipboard
protected val usersRepository: R
Link copied to clipboard
protected val VALUES_QUERY_PART: String = " VALUES ("

Functions

Link copied to clipboard
protected open fun batchDelete(table: String, values: Collection<out Any>, columns: Array<@NotNull String>)
Link copied to clipboard
protected open fun <V> batchInsert(command: EquinoxItemsHelper.InsertCommand, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Link copied to clipboard
open fun changeEmail(newEmail: String, userId: String)
Link copied to clipboard
open fun changeLanguage(newLanguage: String, userId: String)
Link copied to clipboard
open fun changePassword(newPassword: String, userId: String)
Link copied to clipboard
open fun changeProfilePic(profilePic: MultipartFile, userId: String): String
Link copied to clipboard
open fun changeTagName(newTagName: String, userId: String)
Method to change the tag name of the RefyUser
Link copied to clipboard
open fun createProfileResource(resource: MultipartFile, resourceId: String): String
Link copied to clipboard
open fun createResource(resource: MultipartFile, resourcesDirectory: String, resourceId: String): String
Link copied to clipboard
Link copied to clipboard
open fun deleteResource(resourcesDirectory: String, resourceId: String): Boolean
Link copied to clipboard
open fun deleteUser(id: String)
Link copied to clipboard
open fun getDynamicAccountData(userId: String): JSONObject
Method used to get the dynamic data of the user to correctly update in all the devices where the user is connected
Link copied to clipboard
protected open fun getDynamicAccountDataKeys(): List<String>
Link copied to clipboard
open fun getPotentialMembers(userId: String, page: Int, pageSize: Int): PaginatedResponse<Team.RefyTeamMember>
Method to get the potential members for a team
Link copied to clipboard
protected open fun getSignUpKeys(): List<String>
Link copied to clipboard
open fun getSuffixResource(resource: MultipartFile): String
Link copied to clipboard
protected open fun hash(secret: String): String
Link copied to clipboard
open fun saveResource(resource: MultipartFile, path: String)
Link copied to clipboard
open fun signInUser(email: String, password: String, custom: Array<Any>): T
Link copied to clipboard
open fun signUpUser(id: String, token: String, name: String, surname: String, email: String, password: String, language: String, custom: Array<Any>)
Link copied to clipboard
protected open fun <V> syncBatch(model: EquinoxItemsHelper.SyncBatchModel, table: String, batchQuery: EquinoxItemsHelper.BatchQuery<V>)
Link copied to clipboard
open fun userExists(userId: String): Boolean
Link copied to clipboard
protected open fun validateSignIn(user: T, password: String, custom: Array<Any>): Boolean