Accela SDK for Android
V3.0
|
Inherited by com.accela.mobile.AccelaMobileInternal.
Classes | |
enum | AuthorizationStatus |
enum | Environment |
Public Member Functions | |
AccelaMobile (Activity ownerActivity, String appId, String appSecret) | |
AccelaMobile (Activity ownerActivity, String appId, String appSecret, AMSessionDelegate sessionDelegate) | |
void | setAmIsRemember (Boolean remember) |
String | getAppId () |
String | getAppSecret () |
String | getAgency () |
Environment | getEnvironment () |
void | setEnvironment (Environment environment) |
String | getUrlSchema () |
void | setUrlSchema (String urlSchema) |
AMSessionDelegate | getSessionDelegate () |
void | setSessionDelegate (AMSessionDelegate sessionDelegate) |
void | setAuthorizationManager (AuthorizationManager authorizationManager) |
AuthorizationStatus | getAuthorizationStatus () |
void | authorize (String[] permissions) |
void | authorize (String[] permissions, String agency) |
void | authorize2 (String[] permissions) |
void | authorize2 (String[] permissions, String agency) |
Boolean | isSessionValid () |
void | logout () |
JSONObject | fetch (String path, RequestParams urlParams) |
JSONObject | fetch (String path, RequestParams urlParams, HTTPMethod httpMethod, RequestParams postData) |
AMRequest | request (String path, RequestParams urlParams, AMRequestDelegate requestDelegate) |
AMRequest | request (String path, RequestParams urlParams, HTTPMethod httpMethod, RequestParams postData, AMRequestDelegate requestDelegate) |
AMRequest | request (String path, RequestParams urlParams, HTTPMethod httpMethod, RequestParams postData, Map< String, String > attachments, AMRequestDelegate requestDelegate) |
AMRequest | uploadAttachment (String path, RequestParams urlParams, Map< String, String > fileInformation, AMRequestDelegate requestDelegate) |
AMRequest | downloadAttachment (String path, RequestParams urlParams, String localFile, AMRequestDelegate requestDelegate) |
Static Public Member Functions | |
static AccelaMobile | defaultInstance () |
Protected Attributes | |
String | amAuthHost |
String | amApisHost |
AuthorizationManager | authorizationManager |
Boolean | amIsRemember = true |
AMSessionDelegate | sessionDelegate |
AuthorizationStatus | authorizationStatus |
Context | ownerContext |
ResourceBundle | stringLoader = AMSetting.getStringResourceBundle() |
String | agency |
Environment | environment = Environment.PROD |
Accela Amobile File: AccelaMobile.java
Accela, Inc. Copyright (C): 2013
Description: AccelaMobile object, used to call mobile cloud APIs.
Notes:
Revision History@since 1.0
|
inline |
Constructor with the given activity, application Id, and application secret.
ownerActivity | The activity which creates the current AccelaMobile instance. |
appId | The Id string of the current application. |
appSecret | The secret string of the current application. |
|
inline |
Constructor with the given activity, application Id, application secret, and session delegate.
ownerActivity | The activity which creates the current AccelaMobile instance. |
appId | The Id string of the current application. |
appSecret | The secret string of the current application. |
sessionDelegate | The receiever's delegate or null if it doesn't have a delegate. See AMSessionDelegate for more information. |
|
inline |
Authorizes user through web view with the given permissions array.
permissions | The array of access permissions. For example, search_records get_single_record create_record, and etc. |
|
inline |
Authorizes user through web view with the given agency and permissions array.
permissions | The array of access permissions. For example, search_records get_single_record create_record, and etc. |
agency | The agency name. |
|
inline |
Authorizes the user with the given agency, through the login web view wrapped in a native login dialog. The native login dialog will be presented for the user if he / she has not valid token. Otherwise, the user will be authorized directly without the native login dialog.
permissions | The array of access permissions. For example, search_records get_single_record create_record, and etc. |
|
inline |
Authorizes the user with default agency defined in cloud, through the login web view wrapped in a native login dialog. The native login dialog will be presented for the user if he / she has not valid token. Otherwise, the user will be authorized directly without the native login dialog.
permissions | The array of access permissions. For example, search_records get_single_record create_record, and etc. |
agency | The agency name. |
|
inlinestatic |
Get a default static instance of the current class.
|
inline |
Downloads a binary file as an asynchronous operation.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
localFile | The path for file. |
requestDelegate | The request's delegate or null if it doesn't have a delegate. See AMRequestDelegate for more information. |
|
inline |
Synchronously get resource identified by the Accela Mobile Cloud API endpoint with the given parameters using HTTP GET method.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
|
inline |
Synchronously get resource identified by the Accela Mobile Cloud API endpoint with the given parameters using the given HTTP method.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
httpMethod | The HTTP data transfer method (such as GET, POST, PUT or DELETE). |
postData | The content sent with the corresponding request(only used in POST or PUT method). |
|
inline |
Get the value of property agency.
|
inline |
Get the value of property appId.
|
inline |
Get the value of property appSecret.
|
inline |
Get the flag whether the current user has been authorized.
|
inline |
Get the value of property environment.
|
inline |
Get the value of property sessionDelegate.
|
inline |
Get the value of property urlSchema.
|
inline |
Checks if the current session is valid or not.
|
inline |
Logs out the user.
|
inline |
Makes a request to the Accela Mobile Cloud API endpoint with the given parameters using HTTP GET method as an asynchronous operation.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
requestDelegate | The request's delegate or null if it doesn't have a delegate. See AMRequestDelegate for more information. |
|
inline |
Makes a request to the Accela Mobile Cloud API endpoint with the given parameters using the given HTTP method as an asynchronous operation.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
httpMethod | The HTTP data transfer method (such as GET, POST, PUT or DELETE). |
postData | The content sent with the corresponding request(only used in POST or PUT method). |
requestDelegate | The request's delegate or null if it doesn't have a delegate. See AMRequestDelegate for more information. |
|
inline |
Makes a request to upload multiple attachments as an asynchronous operation.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
httpMethod | The HTTP data transfer method (such as GET, POST, PUT or DELETE). |
postData | The content sent with the corresponding request(only used in POST or PUT method). |
attachments | The attachments to be uploaded in the request. Values mapping: Key => File Path. |
requestDelegate | The request's delegate or null if it doesn't have a delegate. See AMRequestDelegate for more information. |
|
inline |
Set the value of property amIsRemember.
remember | true or false. |
|
inline |
Set the value of property authorizationManager.
authorizationManager | The new value to be assigned. |
|
inline |
Set the value of property environment.
environmentType | The new value to be assigned. |
|
inline |
Set the value of property sessionDelegate.
sessionDelegate | The new value to be assigned. |
|
inline |
Set the value of property urlSchema.
urlSchema | The new value to be assigned. |
|
inline |
Uploads a binary file as an asynchronous operation.
path | The path to the Accela Mobile Cloud API endpoint. |
urlParams | The collection of parameters associated with the specific URL. |
fileInformation | A dictionary instance specifies the name of the file as well as the path of it. Note that the key value of the file name should be "fileName" and the key value of the file path should be "localPath". |
requestDelegate | The request's delegate or null if it doesn't have a delegate. See AMRequestDelegate for more information. |
|
protected |
The agency to which user logs in.
|
protected |
The URL of cloud API host. For examle: https://apis.accela.com
|
protected |
The URL of cloud authorization host. For examle: https://auth.accela.com
|
protected |
The flag which indicates whether user profile should be saved to local storage after successful login.
|
protected |
The AuthorizationManager instance which manages session state.
|
protected |
The authorization status
|
protected |
The environment to which user logs in.
|
protected |
The Android context (usually an Activity) which creates the current AccelaMobile instance.
|
protected |
The session delegate which methods are called during the progress of user authentication.
|
protected |
The string loader which loads localized text strings.