Classes
The Formbird Web Service Connector exposes the following Java Classes:
Package | Class | Description |
---|---|---|
com.fieldtec.webcllient.config | WebclientConfig | Singleton instance used to hold configuration details. Must be set before FieldtecService is instantiated. |
com.fieldtec.webclient.model | Document | Object used to construct and/or hold retrieved Formbird documents. Includes getValue and setValue methods to simplify access to document values. |
com.fieldtec.webclient.service | FieldtecService | The primary service. Provides document create, find, search and update capabilities by calling the Formbird APIs. |
com.fieldtec.webclient.util | UtilJson | Utility class |
Class WebclientConfig (com.fieldtec.webcllient.config.WebclientConfig)
Singleton instance used to hold configuration details.
Must be set before FieldtecService is instantiated.
Modifier and Type | Method and Description |
---|---|
String | getUsername() Get username |
String | getPassword() Get password |
String | getAuthUrl() Get Authentication URL |
String | getWebServiceUrl() Get Web Service URL |
String | getLoggerName() Get Logger Name |
void | setUsername(String username) Set username |
void | setPassword(String password) Set password |
void | setAuthUrl(String authUrl) Set authentication URL |
void | setWebserviceUrl(String webserviceUrl) Set Web Service URL |
void | setLoggerName(String val) Set Logger Name |
Class Document (com.fieldtec.webclient.model.Document)
Object used to construct and/or hold retrieved Formbird documents.
Includes getValue and setValue methods to simplify document manipulation.
Modifier and Type | Method and Description |
---|---|
Object | getValue(String key) Returns a value from the Document for a given key |
void | setValue(String key, Object value) Sets a value in the Document for a given key |
String | toJson() Returns formatted json string |
String | toString() Returns formatted json string |
Class FieldtecService (com.fieldtec.webclient.service.FieldtecService)
The primary service.
Provides document create, find, search and update capabilities.
Modifier and Type | Method and Description |
---|---|
Document | insert(Document document) Insert document |
Document | update(Document document) Update document |
Document | find(String documentId) Find document using documentId |
Document | findOne(String queryString) Find one document using elastic search query string |
Document | findFirst(String queryString) Find first document returned using elastic search query string |
List\ |
findAll(String queryString) Find all documents using elastic search query string |
List\ |
findAll(String queryString, int page, int pageSize) Find all documents using elastic search query string (using paging) |
Document | convertToObject(String json) Convert json string to Document |
List\ |
convertToObjects(String json) Convert json string containing an array of JSON documents to a List of Documents |
Document | convertFromJsonObject(JSONObject jsonObject) Convert JSONObject to Document |
Class UtilJson (com.fieldtec.webclient.util.UtilJson)
Utility class.
Modifier and Type | Method and Description |
---|---|
String | prettyPrint(String jsonString) Returns formatted json string |
String | prettyPrint(JSONObject jsonObject) Returns formatted json string |
String | prettyPrint(Object object) Returns formatted json string |
String | print(Object object) Returns unformatted json string |