Accela SDK for Android
V3.1
|
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) | |
AccelaMobile (Activity dialogActivity, String appId, String appSecret, AMSessionDelegate sessionDelegate, String authHost, String apisHost) | |
AccelaMobile (Context ownerActivity, String appId, String appSecret) | |
AccelaMobile (Context ownerActivity, String appId, String appSecret, AMSessionDelegate sessionDelegate) | |
void | authorize (String[] permissions) |
void | authorize (String[] permissions, String agency) |
void | authorize2 (String[] permissions) |
void | authorize2 (String[] permissions, String agency) |
JSONObject | fetch (String path, RequestParams urlParams) |
JSONObject | fetch (String path, RequestParams urlParams, HTTPMethod httpMethod, RequestParams postData) |
String | getAgency () |
String | getAppId () |
String | getAppSecret () |
AuthorizationStatus | getAuthorizationStatus () |
Environment | getEnvironment () |
AMSessionDelegate | getSessionDelegate () |
String | getUrlSchema () |
HashMap< String, String > | getCustomHttpHeader () |
Boolean | isSessionValid () |
void | logout () |
AMRequest | request (String path, RequestParams urlParams, AMRequestDelegate requestDelegate) |
AMRequest | request (AMBatchSession batchSession, String path, RequestParams urlParams, AMRequestDelegate requestDelegate) |
AMRequest | request (String path, RequestParams urlParams, HTTPMethod httpMethod, RequestParams postData, AMRequestDelegate requestDelegate) |
AMRequest | request (AMBatchSession batchSession, 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) |
void | setAmIsRemember (Boolean remember) |
void | setAuthorizationManager (AuthorizationManager authorizationManager) |
void | setEnvironment (Environment environment) |
void | setSessionDelegate (AMSessionDelegate sessionDelegate) |
void | setUrlSchema (String urlSchema) |
void | setCustomHttpHeader (HashMap< String, String > customHttpHeader) |
AMRequest | uploadAttachments (String path, RequestParams postData, Map< String, String > fileInformation, AMRequestDelegate requestDelegate) |
AMRequest | downloadAttachment (String path, RequestParams urlParams, String localFile, AMRequestDelegate requestDelegate) |
Static Public Member Functions | |
static AccelaMobile | defaultInstance () |
static AMBatchSession | batchBegin () |
static void | batchCommit (AMBatchSession session, AMBatchRequestDelegate batchRequestDelegate) |
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 |
HashMap< String, String > | customHttpHeader = new HashMap<String, String>() |
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 |
Constructor with the given context, application Id, session delegate, authorization server URL, and API server URL.
ownerActivity | The Android context 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. |
authHost | The URL of cloud server for user authorization. |
apisHost | The URL of cloud server for service API calling. |
|
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 |
|
inlinestatic |
Commit the currently started batch request.
session | The batch session instance. |
batchRequestDelegate | The delegate of batch session. |
|
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 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 set of binary files as an asynchronous operation.
path | The path to the Accela Mobile Cloud API endpoint. |
postData | The array of file's JSON object is posted together with attachments. Note file's JSON object contains keys "serviceProviderCode","fileName","type",and "description". |
files | The file collection of key-value pairs. Note the key name is "fileName", and the value is file's full path. |
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.