Default Ametista Controller

abstract class DefaultAmetistaController : EquinoxController<T, R, H>

The DefaultAmetistaController class is useful to give the base behavior of the Ametista's controllers

Author

N7ghtm4r3 - Tecknobit

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
protected val configuration: EquinoxBackendConfiguration
Link copied to clipboard
protected open var jsonHelper: JsonHelper
Link copied to clipboard
protected open var me: T
Link copied to clipboard
protected open var messageSource: MessageSource
Link copied to clipboard
open var resourcesProvider: ResourcesProvider
Link copied to clipboard
val RESPONSE_SUCCESSFUL_MESSAGE: String = "operation_executed_successfully"
Link copied to clipboard
protected open var serverProtector: ServerProtector
Link copied to clipboard
protected open var usersRepository: R
Link copied to clipboard
val WRONG_EMAIL_MESSAGE: String = "wrong_email"
Link copied to clipboard
val WRONG_LANGUAGE_MESSAGE: String = "wrong_language"
Link copied to clipboard
val WRONG_NAME_MESSAGE: String = "wrong_name"
Link copied to clipboard
val WRONG_PASSWORD_MESSAGE: String = "wrong_password"
Link copied to clipboard
val WRONG_PROCEDURE_MESSAGE: String = "wrong_procedure"
Link copied to clipboard
val WRONG_SURNAME_MESSAGE: String = "wrong_surname"

Functions

Link copied to clipboard
protected open fun failedResponse(errorKey: String): String
Link copied to clipboard
Link copied to clipboard
protected open fun getInternationalizedMessage(messageKey: String): String
Link copied to clipboard
open fun initEquinoxEnvironment(context: Class<out Any>, args: Array<String>)
Link copied to clipboard
protected open fun isAdmin(userId: String, token: String): Boolean
Method to get whether the user who request to execute an action is a ADMIN
Link copied to clipboard
protected open fun isMe(id: String, token: String): Boolean
Link copied to clipboard
protected open fun isViewer(userId: String, token: String): Boolean
Method to get whether the user who request to execute an action is a VIEWER
Link copied to clipboard
protected open fun loadJsonHelper(payload: JSONObject)
Link copied to clipboard
protected open fun plainResponse(status: ResponseStatus, message: String): String
Link copied to clipboard
protected open fun setSessionLocale(locale: String)
Link copied to clipboard
protected open fun successResponse(): String
protected open fun <V> successResponse(value: V): HashMap<String, V>