okcore / winkit.android.okcore / CoreController
CoreController
open class CoreController<T :
CoreRest
>
Extends this class to create the Model-controllers.
Parameters <T: CoreRest> The class that the controller will use as restClient
Constructors
Name | Summary |
---|---|
<init> | CoreController(view: CoreUi , rest: T ) Primary constructor |
Properties
Name | Summary |
---|---|
rest | val rest: T |
view | val view: CoreUi |
Functions
Name | Summary |
---|---|
enqueue | fun enqueue(viewLife: Boolean , request: CoreRequest ): Unit Add a request to the client |
executeJsonArray | fun executeJsonArray(request: CoreRequest ): JSONArray ? Execute on the current thread the request that return a JSONArray |
executeJsonObject | fun executeJsonObject(request: CoreRequest ): JSONObject ? Execute on the current thread the request that return a JSONObject |
executeString | fun executeString(request: CoreRequest ): String ? Execute on the current thread the request that return a String |
mapJsonArray | fun <T> mapJsonArray(jsonArray: JSONArray , callback: (json: JSONObject ) -> T ): List < T > Util’s method to map a JSONArray to a model class list in a simple way |