AgileApps Support Wiki Pre Release

Difference between revisions of "Java API"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 21: Line 21:


==Classes, Objects, and APIs==
==Classes, Objects, and APIs==
This table lists the APIs and links to detail pages. For a quick synopsis of syntax, see the [[Java API Cheatsheet]].<br>
This table lists the APIs and links to detail pages. For a quick synopsis of syntax, see the [[Java API Cheatsheet]].


{| border="1" cellpadding="5" cellspacing="0"
===Record Handling===
! Classes, Objects and APIs
To handle records in standard [[Objects]]
! Detail
:* [[Java API:Record_Handling#addRecord|<tt>addRecord</tt>]]
|-
:* [[Java API:Record_Handling#updateRecord|<tt>updateRecord</tt>]]
|[[Java_API:Record_Handling|Record Handling]]
:* [[Java_API:Record_Handling#changeOwnerShipInfo|<tt>changeOwnerShipInfo</tt>]]
To handle records in [[Objects]]
:* [[Java API:Record_Handling#deleteRecord|<tt>deleteRecord</tt>]]
|
:* [[Java API:Record_Handling#getRecord|<tt>getRecord</tt>]]
* [[Java API:Record_Handling#addRecord|<tt>addRecord</tt>]]
:* [[Java API:Record_Handling#getRecordCount|<tt>getRecordCount</tt>]]
* [[Java API:Record_Handling#updateRecord|<tt>updateRecord</tt>]]
:* [[Java API:Record_Handling#searchRecords|<tt>searchRecords</tt>]]
* [[Java_API:Record_Handling#changeOwnerShipInfo|<tt>changeOwnerShipInfo</tt>]]
:* [[Java API:Record_Handling#replaceTemplateVariables|<tt>replaceTemplateVariables</tt>]]
* [[Java API:Record_Handling#deleteRecord|<tt>deleteRecord</tt>]]
:* [[Java API:Record_Handling#execSQL|<tt>execSQL</tt>]]
* [[Java API:Record_Handling#getRecord|<tt>getRecord</tt>]]
* [[Java API:Record_Handling#getRecordCount|<tt>getRecordCount</tt>]]
* [[Java API:Record_Handling#searchRecords|<tt>searchRecords</tt>]]
* [[Java API:Record_Handling#replaceTemplateVariables|<tt>replaceTemplateVariables</tt>]]
* [[Java API:Record_Handling#execSQL|<tt>execSQL</tt>]]


|-
''Learn more:'' [[Java_API:Record_Handling]] Β 
|Record Handling for [[Composite Object]]s
To operate on records in composite [[Object Relationships]]
|
* [[Java API:Composite Objects#getRecordCount|<tt>getRecordCount</tt>]]
* [[Java API:Composite Objects#getRecord|<tt>getRecord</tt>]]
* [[Java API:Composite Objects#searchRecords|<tt>searchRecords</tt>]]


|-id="relay"
To operate on records in [[Composite Object]]s:
|Relay
:* [[Java API:Composite Objects#getRecordCount|<tt>getRecordCount</tt>]]
:* [[Java API:Composite Objects#getRecord|<tt>getRecord</tt>]]
:* [[Java API:Composite Objects#searchRecords|<tt>searchRecords</tt>]]
''Learn more:'' [[Object Relationships]]
Β 
===<span id="relay">Relay</span>===
To do social networking.
To do social networking.
|
:* Groups
* Groups
:*:* [[Java_API:Relay#getSocialGroup|<tt>getSocialGroup</tt>]] Β 
** [[Java_API:Relay#getSocialGroup|<tt>getSocialGroup</tt>]] Β 
:*:* [[Java_API:Relay#addSocialGroup|<tt>addSocialGroup</tt>]] Β 
** [[Java_API:Relay#addSocialGroup|<tt>addSocialGroup</tt>]] Β 
:*:* [[Java_API:Relay#updateSocialGroup|<tt>updateSocialGroup</tt>]] Β 
** [[Java_API:Relay#updateSocialGroup|<tt>updateSocialGroup</tt>]] Β 
:*:* [[Java_API:Relay#deleteSocialGroup|<tt>deleteSocialGroup</tt>]] Β 
** [[Java_API:Relay#deleteSocialGroup|<tt>deleteSocialGroup</tt>]] Β 
:*:* [[Java_API:Relay#searchSocialGroups|<tt>searchSocialGroups</tt>]] Β 
** [[Java_API:Relay#searchSocialGroups|<tt>searchSocialGroups</tt>]] Β 


* Messages
:* Messages
** [[Java_API:Relay#addSocialFeed|<tt>addSocialFeed</tt>]] (post a msg) Β 
:*:* [[Java_API:Relay#addSocialFeed|<tt>addSocialFeed</tt>]] (post a msg) Β 
** [[Java_API:Relay#getSocialFeed|<tt>getSocialFeed</tt>]] (get msg)
:*:* [[Java_API:Relay#getSocialFeed|<tt>getSocialFeed</tt>]] (get msg)
** [[Java_API:Relay#deleteSocialFeed|<tt>deleteSocialFeed</tt>]] (delete msg)
:*:* [[Java_API:Relay#deleteSocialFeed|<tt>deleteSocialFeed</tt>]] (delete msg)
** [[Java_API:Relay#searchSocialFeeds|<tt>searchSocialFeeds</tt>]] (search msgs)
:*:* [[Java_API:Relay#searchSocialFeeds|<tt>searchSocialFeeds</tt>]] (search msgs)


* Message Voting
:* Message Voting
** [[Java_API:Relay#getSocialVotes|<tt>getSocialVotes</tt>]]
:*:* [[Java_API:Relay#getSocialVotes|<tt>getSocialVotes</tt>]]
** [[Java_API:Relay#socialVote|<tt>socialVote</tt>]] Β 
:*:* [[Java_API:Relay#socialVote|<tt>socialVote</tt>]] Β 


* Following Feeds
:* Following Feeds
** [[Java_API:Relay#socialFollow|<tt>socialFollow</tt>]] Β 
:*:* [[Java_API:Relay#socialFollow|<tt>socialFollow</tt>]] Β 
** [[Java_API:Relay#socialUnFollow|<tt>socialUnfollow</tt>]] Β 
:*:* [[Java_API:Relay#socialUnFollow|<tt>socialUnfollow</tt>]] Β 
** [[Java_API:Relay#getSocialFollowers|<tt>getSocialFollowers</tt>]] Β 
:*:* [[Java_API:Relay#getSocialFollowers|<tt>getSocialFollowers</tt>]] Β 
** [[Java_API:Relay#getSocialFollowing|<tt>getSocialFollowing</tt>]] Β 
:*:* [[Java_API:Relay#getSocialFollowing|<tt>getSocialFollowing</tt>]] Β 


* Notifications
:* Notifications
** [[Java_API:Relay#getSocialNotificationsCount|<tt>getSocialNotificationsCount</tt>]]Β  Β 
:*:* [[Java_API:Relay#getSocialNotificationsCount|<tt>getSocialNotificationsCount</tt>]]Β  Β 
** [[Java_API:Relay#getSocialNotificationsList|<tt>getSocialNotificationsList</tt>]]Β  Β 
:*:* [[Java_API:Relay#getSocialNotificationsList|<tt>getSocialNotificationsList</tt>]]Β  Β 
** [[Java_API:Relay#setAllSocialNotificationsRead|<tt>setAllSocialNotificationsRead</tt>]]Β  Β 
:*:* [[Java_API:Relay#setAllSocialNotificationsRead|<tt>setAllSocialNotificationsRead</tt>]]Β  Β 


|-
===Record Handling for Tenant Data Sharing===
|[[Tenant_Data_Sharing_Policies#Using the JAVA API to Access Shared Data | Record Handling for Tenant Data Sharing]]
To handle records in Objects shared using [[Tenant Data Sharing Policies]]
To handle records in Objects shared using [[Tenant Data Sharing Policies]]
|
:* [[Tenant_Data_Sharing_Policies#addRecord|<tt>addRecord</tt>]]
* [[Tenant_Data_Sharing_Policies#addRecord|<tt>addRecord</tt>]]
:* [[Tenant_Data_Sharing_Policies#updateRecord|<tt>updateRecord</tt>]]
* [[Tenant_Data_Sharing_Policies#updateRecord|<tt>updateRecord</tt>]]
:* [[Tenant_Data_Sharing_Policies#deleteRecord|<tt>deleteRecord</tt>]]
* [[Tenant_Data_Sharing_Policies#deleteRecord|<tt>deleteRecord</tt>]]
<!--FUTURE
<!--FUTURE
* [[Tenant_Data_Sharing_Policies#getRecordCount|<tt>getRecordCount</tt>]]
:* [[Tenant_Data_Sharing_Policies#getRecordCount|<tt>getRecordCount</tt>]]
-->
-->
* [[Tenant_Data_Sharing_Policies#searchRecords|<tt>searchRecords</tt>]]
:* [[Tenant_Data_Sharing_Policies#searchRecords|<tt>searchRecords</tt>]]
* [[Tenant_Data_Sharing_Policies#getRecord|<tt>getRecord</tt>]]
:* [[Tenant_Data_Sharing_Policies#getRecord|<tt>getRecord</tt>]]


|-
''Learn more:'' [[Tenant_Data_Sharing_Policies#Using the JAVA API to Access Shared Data]]
|[[Java_API:Data Import|Data Import]]
Β 
===Data Import===
Import CSV data into [[Object]]s
Import CSV data into [[Object]]s
|
:* [[Java_API:Data Import#getMappingProfiles|<tt>getMappingProfiles</tt>]]
* [[Java_API:Data Import#getMappingProfiles|<tt>getMappingProfiles</tt>]]
:* [[Java_API:Data Import#importData|<tt>importData</tt>]]
* [[Java_API:Data Import#importData|<tt>importData</tt>]]
Β 
''Learn more:'' [[Java_API:Data Import]]
Β 
===Email and Document Management===
APIs to manage [[Email]] and documents.
:* [[Java API:Email_and_Document_Management#sendEmail|<tt>sendEmail</tt>]]
:* [[Java API:Email_and_Document_Management#sendEmailUsingTemplate|<tt>sendEmailUsingTemplate</tt>]]
:* [[Java API:Email_and_Document_Management#generateDocument|<tt>generateDocument</tt>]]
::<hr>
:* [[Java_API_Cheatsheet#Email_Handler_APIs|<tt>EmailHandler</tt> APIs]]


|-
''Learn more:'' [[Java_API:Email_and_Document_Management]]
|[[Java_API:Email_and_Document_Management|Email and Document Management]]
Provides APIs to manage [[Email]] and documents
|
* [[Java API:Email_and_Document_Management#sendEmail|<tt>sendEmail</tt>]]
* [[Java API:Email_and_Document_Management#sendEmailUsingTemplate|<tt>sendEmailUsingTemplate</tt>]]
* [[Java API:Email_and_Document_Management#generateDocument|<tt>generateDocument</tt>]]
<hr>
* [[Java_API_Cheatsheet#Email_Handler_APIs|<tt>EmailHandler</tt> APIs]]


|-
===Transaction Management===
|[[Java_API:Transaction_Management|Transaction Management]]
Provides the ability to Rollback transactions to a SavePoint
Provides the ability to Rollback transactions to a SavePoint
|
:*[[Java_API:Transaction_Management#addSavePoint|<tt>addSavePoint</tt>]]
*[[Java_API:Transaction_Management#addSavePoint|<tt>addSavePoint</tt>]]
:*[[Java_API:Transaction_Management#doesSavePointExist|<tt>doesSavePointExist</tt>]]
*[[Java_API:Transaction_Management#doesSavePointExist|<tt>doesSavePointExist</tt>]]
:*[[Java_API:Transaction_Management#getAllSavePoints|<tt>getAllSavePoints</tt>]]
*[[Java_API:Transaction_Management#getAllSavePoints|<tt>getAllSavePoints</tt>]]
:*[[Java_API:Transaction_Management#rollback|<tt>rollback</tt>]]
*[[Java_API:Transaction_Management#rollback|<tt>rollback</tt>]]
:*[[Java_API:Transaction_Management#rollbackToSavePoint|<tt>rollbackToSavePoint</tt>]]
*[[Java_API:Transaction_Management#rollbackToSavePoint|<tt>rollbackToSavePoint</tt>]]
:*[[Java_API:Transaction_Management#removeSavePoint|<tt>removeSavePoint</tt>]]
*[[Java_API:Transaction_Management#removeSavePoint|<tt>removeSavePoint</tt>]]
Β 
|-
''Learn more:'' [[Java_API:Transaction_Management]]
|[[Java_API:Support_Classes_and_Objects|Support Classes and Objects]]
Β 
Use these support classes and objects when you work with the Java API
===Support Classes and Objects===
|
Use these support classes and objects when you work with the Java API.
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html Functions] class
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html Functions] class
* [[Java_API:Support_Classes_and_Objects#HttpConnection_Class|<tt>HttpConnection</tt> class]]
:* [[Java_API:Support_Classes_and_Objects#HttpConnection_Class|<tt>HttpConnection</tt> class]]
* [[Java_API:Support_Classes_and_Objects#Parameters_Class|<tt>Parameters</tt> class]]
:* [[Java_API:Support_Classes_and_Objects#Parameters_Class|<tt>Parameters</tt> class]]
* [[Java_API:Support_Classes_and_Objects#ParametersIterator_Class|<tt>ParametersIterator</tt> class]]
:* [[Java_API:Support_Classes_and_Objects#ParametersIterator_Class|<tt>ParametersIterator</tt> class]]
* [[Java_API:Support_Classes_and_Objects#Result_Class|<tt>Result</tt> class]]
:* [[Java_API:Support_Classes_and_Objects#Result_Class|<tt>Result</tt> class]]
* [[Java_API:Support_Classes_and_Objects#SearchContext_Class|<tt>SearchContext</tt> class]]
:* [[Java_API:Support_Classes_and_Objects#SearchContext_Class|<tt>SearchContext</tt> class]]
::<hr>
:* [[Java_API:Support_Classes_and_Objects#request_Object|<tt>request</tt> object]] - [[Page]]
:* [[Java_API:Support_Classes_and_Objects#TenantContext_Object|<tt>TenantContext Object</tt>]]
Β 
''Learn more:'' [[Java_API:Support_Classes_and_Objects]]
Β 
===<span id="localization">Localization Functions</span>===
Use these functions to convert between [[Database Format]]s and localized [[User Format]]s.
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#formatCurrency(java.lang.String,%20int) <tt>formatCurrency</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#formatNumber(java.lang.String,%20int) <tt>formatNumber</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#formatPercent(java.lang.String,%20int) <tt>formatPercent</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#parseCurrency(java.lang.String) <tt>parseCurrency</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#parseNumber(java.lang.String) <tt>parseNumber</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#parsePercent(java.lang.String) <tt>parsePercent</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#validateCurrency(java.lang.String) <tt>validateCurrency</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#validateNumber(java.lang.String) <tt>validateNumber</tt>]
:* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#validatePercent(java.lang.String) <tt>validatePercent</tt>]
Β 
''Learn more:'' [[Localization]]
Β 
===Utility Functions===
General-purpose operations.
:* [[Java_API:Utility functions#debug|<tt>debug</tt>]] - <span style="color:red;">'''''Deprecated'''''</span><br>Use Logger class. (See [[Debug Log]])
:* [[Java_API:Utility functions#getEnv|<tt>getEnv</tt>]]
:* [[Java_API:Utility functions#getParametersInstance|<tt>getParametersInstance</tt>]]
:* [[Java_API:Utility functions#getTimezonesUtility|<tt>getTimezonesUtility</tt>]]
:* [[Java_API:Utility functions#getTimezoneUtility|<tt>getTimezoneUtility</tt>]]
:* [[Java_API:Utility functions#getLoggedInUserInfo|<tt>getLoggedInUserInfo</tt>]]
:* [[Java_API:Utility functions#setTargetPage |<tt>setTargetPage </tt>]]
:* [[Java_API:Utility functions#showMessage |<tt>showMessage</tt>]]
:* [[Java_API:Utility functions#sleep |<tt>sleep</tt>]]
:* [[Java_API:Utility functions#throwError|<tt>throwError</tt>]]
:* [[Java_API:Utility functions#translateToken|<tt>translateToken</tt>]]
<hr>
<hr>
* [[Java_API:Support_Classes_and_Objects#request_Object|<tt>request</tt> object]] - [[Page]]
:* [{{DOCHOST}}/javadocs/com/platform/api/utility/ServiceConfiguration.html#getServiceName() <tt>getServiceName</tt>]
* [[Java_API:Support_Classes_and_Objects#TenantContext_Object|<tt>TenantContext Object</tt>]]
:* [{{DOCHOST}}/javadocs/com/platform/api/utility/ServiceConfiguration.html#getServiceDomainURL() <tt>getServiceDomainURL</tt>]


|-
''Learn more:'' [[Java API:Utility functions|Utility functions]]
| valign="top"|<span id="localization"></span><br><br>'''Localization functions'''
|
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#formatCurrency(java.lang.String,%20int) <tt>formatCurrency</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#formatNumber(java.lang.String,%20int) <tt>formatNumber</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#formatPercent(java.lang.String,%20int) <tt>formatPercent</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#parseCurrency(java.lang.String) <tt>parseCurrency</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#parseNumber(java.lang.String) <tt>parseNumber</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#parsePercent(java.lang.String) <tt>parsePercent</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#validateCurrency(java.lang.String) <tt>validateCurrency</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#validateNumber(java.lang.String) <tt>validateNumber</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/Functions.html#validatePercent(java.lang.String) <tt>validatePercent</tt>]


|-
===Customization APIs===
|[[Java API:Utility functions|Utility functions]]
Use these [[Provisional]] APIs give to manage metadata for program entities.
Provides APIs to perform general-purpose operations
:*[[Java_API:Customize#Object_Metadata|Object Metadata]]
|
:*[[Java_API:Customize#Field_Metadata|Field Metadata]]
* [[Java_API:Utility functions#debug|<tt>debug</tt>]] - <span style="color:red;">'''''Deprecated'''''</span><br>Use Logger class. (See [[Debug Log]])
:*:*[[Java_API:Enumerated_Fields|Enumerated Fields]]
* [[Java_API:Utility functions#getEnv|<tt>getEnv</tt>]]
:*:*[[Java_API:Global_Picklists|Global Picklists]]
* [[Java_API:Utility functions#getParametersInstance|<tt>getParametersInstance</tt>]]
<!--:*[[Java_API:Customize#Form_Metadata|Form Metadata]]-->
* [[Java_API:Utility functions#getTimezonesUtility|<tt>getTimezonesUtility</tt>]]
* [[Java_API:Utility functions#getTimezoneUtility|<tt>getTimezoneUtility</tt>]]
* [[Java_API:Utility functions#getLoggedInUserInfo|<tt>getLoggedInUserInfo</tt>]]
* [[Java_API:Utility functions#setTargetPage |<tt>setTargetPage </tt>]]
* [[Java_API:Utility functions#showMessage |<tt>showMessage</tt>]]
* [[Java_API:Utility functions#sleep |<tt>sleep</tt>]]
* [[Java_API:Utility functions#throwError|<tt>throwError</tt>]]
* [[Java_API:Utility functions#translateToken|<tt>translateToken</tt>]]
<hr>
* [{{DOCHOST}}/javadocs/com/platform/api/utility/ServiceConfiguration.html#getServiceName() <tt>getServiceName</tt>]
* [{{DOCHOST}}/javadocs/com/platform/api/utility/ServiceConfiguration.html#getServiceDomainURL() <tt>getServiceDomainURL</tt>]


|-
''Learn more:'' [[Java_API:Customize|Customize]]
|[[Java_API:Customize|Customize]]
These [[Provisional]] APIs give you the ability to manage metadata for program entities.
|
*[[Java_API:Customize#Object_Metadata|Object Metadata]]
*[[Java_API:Customize#Field_Metadata|Field Metadata]]
**[[Java_API:Enumerated_Fields|Enumerated Fields]]
**[[Java_API:Global_Picklists|Global Picklists]]
<!--*[[Java_API:Customize#Form_Metadata|Form Metadata]]-->


|-
===Status===
|[[getStatus|Status]]
Check status of scheduled jobs.
API for checking status of scheduled jobs.
:*[[getStatus]]
|
*[[getStatus]]


|}
''Learn more:'' [[getStatus]]


==Identifying Objects and Records ==
==Identifying Objects and Records ==

Revision as of 22:55, 18 September 2013

The Java API is a set of built-in calls that are made to programmatically customize and extend the platform.

1 About the Java API

The following platform elements provide the ability to make Java API calls from the user interface (UI):

  • Standard Java classes, to create custom business logic that models your organization's environment
  • JSP Pages, which can invoke Java APIs

2 Prerequisites

You must know the Java programming language to make the Java API calls. This includes knowing the basic elements of Java such as conditional structures (if statement), looping structures (while and for loop statements), variable declaration and assignment, use of operators, variable naming conventions, debugging techniques, and so on.

Learn more about the platform:
Learn more about web services and programming:

3 Classes, Objects, and APIs

This table lists the APIs and links to detail pages. For a quick synopsis of syntax, see the Java API Cheatsheet.

3.1 Record Handling

To handle records in standard Objects

Learn more: Java_API:Record_Handling

To operate on records in Composite Objects:

Learn more: Object Relationships

3.2 Relay

To do social networking.

3.3 Record Handling for Tenant Data Sharing

To handle records in Objects shared using Tenant Data Sharing Policies

Learn more: Tenant_Data_Sharing_Policies#Using the JAVA API to Access Shared Data

3.4 Data Import

Import CSV data into Objects

Learn more: Java_API:Data Import

3.5 Email and Document Management

APIs to manage Email and documents.


Learn more: Java_API:Email_and_Document_Management

3.6 Transaction Management

Provides the ability to Rollback transactions to a SavePoint

Learn more: Java_API:Transaction_Management

3.7 Support Classes and Objects

Use these support classes and objects when you work with the Java API.


Learn more: Java_API:Support_Classes_and_Objects

3.8 Localization Functions

Use these functions to convert between Database Formats and localized User Formats.

Learn more: Localization

3.9 Utility Functions

General-purpose operations.


Learn more: Utility functions

3.10 Customization APIs

Use these Provisional APIs give to manage metadata for program entities.

Learn more: Customize

3.11 Status

Check status of scheduled jobs.

Learn more: getStatus

4 Identifying Objects and Records

An object type identifier uniquely identifies an object type. It is used to specify object types in APIs.

There are two kinds of type identifiers:

  • objectName: This identifier is a human-readable name for both System Objects and Custom Objects.
  • objectID: This identifier is a human-readable name for System Objects (e.g. "cases"), but for Custom Objects, it is a computer-generated string with no humanly-interpretable semantic value (e.g. 123qwe456rty).
See also:

To find an object type identifier:

  1. Click GearIcon.png > Customization > Objects
  2. In the Display Title column, find the object you're looking for.
  3. The Object Name column has the identifier you need.

Alternatively:

  1. Go to GearIcon.png > Customization > Objects > {object}
  2. Click Properties
  3. The object name appears at the top of the page

Notepad.png

Note: