Difference between revisions of "Java API"
imported>Aeric |
imported>Aeric |
||
(45 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>__NUMBEREDHEADINGS__</noinclude>The Java API is a set of built-in calls that are made to programmatically customize and extend the platform. | <noinclude>__NUMBEREDHEADINGS__</noinclude>The Java API is a set of built-in calls that are made to programmatically customize and extend the platform. | ||
__TOC__ | |||
== About the Java API == | |||
The following platform elements provide the ability to make Java API calls from the user interface (UI): | The following platform elements provide the ability to make Java API calls from the user interface (UI): | ||
:*Standard Java [[Classes|classes]], to create custom business logic that models your organization's environment | :*Standard Java [[Classes|classes]], to create custom business logic that models your organization's environment | ||
:*[[Data Policy|Data policies]], by [[Data_Policy#Invoke_a_Java_Method_From_a_Data_Policy|Invoking a Java Method]] | :*[[Data Policy|Data policies]], by [[Data_Policy#Invoke_a_Java_Method_From_a_Data_Policy|Invoking a Java Method]] | ||
== 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:'' | |||
::* [[Getting Started with the Java API]] | |||
::* [[Java API Cheatsheet]] | |||
::* [[Developer_Suite#Java_Code|Java Code in the Developer Suite]] | |||
::* Java API [{{DOCHOST}}/javadocs javadocs] | |||
:''Learn more about web services and programming:'' | |||
::* [http://en.wikipedia.org/wiki/Java_programming_language Java Programming Language] | |||
::* [http://java.sun.com/docs/books/tutorial/java/concepts/index.html Java Tutorial] | |||
==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]]. | |||
{| border="1" cellpadding="5" cellspacing="0" | {| border="1" cellpadding="5" cellspacing="0" | ||
! Classes, Objects and APIs | ! Classes, Objects and APIs | ||
Line 23: | Line 31: | ||
* [[Java API:Record_Handling#addRecord|<tt>addRecord</tt>]] | * [[Java API:Record_Handling#addRecord|<tt>addRecord</tt>]] | ||
* [[Java API:Record_Handling#updateRecord|<tt>updateRecord</tt>]] | * [[Java API:Record_Handling#updateRecord|<tt>updateRecord</tt>]] | ||
* [[Java_API:Record_Handling#changeOwnerShipInfo|<tt>changeOwnerShipInfo</tt>]] | |||
* [[Java API:Record_Handling#deleteRecord|<tt>deleteRecord</tt>]] | * [[Java API:Record_Handling#deleteRecord|<tt>deleteRecord</tt>]] | ||
< | * [[Java API:Record_Handling#getRecord|<tt>getRecord</tt>]] | ||
* [[Java API:Record_Handling#getRecordCount|<tt>getRecordCount</tt>]] | * [[Java API:Record_Handling#getRecordCount|<tt>getRecordCount</tt>]] | ||
* [[Java API:Record_Handling#searchRecords|<tt>searchRecords</tt>]] | * [[Java API:Record_Handling#searchRecords|<tt>searchRecords</tt>]] | ||
* [[Java API:Record_Handling#replaceTemplateVariables|<tt>replaceTemplateVariables</tt>]] | * [[Java API:Record_Handling#replaceTemplateVariables|<tt>replaceTemplateVariables</tt>]] | ||
* [[Java API:Record_Handling#execSQL|<tt>execSQL</tt>]] | |||
|- | |- | ||
Line 36: | Line 44: | ||
| | | | ||
* [[Java API:Composite Objects#getRecordCount|<tt>getRecordCount</tt>]] | * [[Java API:Composite Objects#getRecordCount|<tt>getRecordCount</tt>]] | ||
* [[Java API:Composite Objects#getRecord|<tt>getRecord</tt>]] | |||
* [[Java API:Composite Objects#searchRecords|<tt>searchRecords</tt>]] | * [[Java API:Composite Objects#searchRecords|<tt>searchRecords</tt>]] | ||
Line 45: | Line 54: | ||
* [[Java API:Record_Handling#getWorkflowActionList|<tt>getWorkflowActionList</tt>]] | * [[Java API:Record_Handling#getWorkflowActionList|<tt>getWorkflowActionList</tt>]] | ||
* [[Java API:Record_Handling#getWFOwners|<tt>getWFOwners</tt>]] | * [[Java API:Record_Handling#getWFOwners|<tt>getWFOwners</tt>]] | ||
|-id="relay" | |||
|[[Relay]] | |||
To do social networking. | |||
| | |||
* Groups | |||
** [[Java_API:Relay#getSocialGroup|<tt>getSocialGroup</tt>]] | |||
** [[Java_API:Relay#addSocialGroup|<tt>addSocialGroup</tt>]] | |||
** [[Java_API:Relay#updateSocialGroup|<tt>updateSocialGroup</tt>]] | |||
** [[Java_API:Relay#deleteSocialGroup|<tt>deleteSocialGroup</tt>]] | |||
** [[Java_API:Relay#searchSocialGroups|<tt>searchSocialGroups</tt>]] | |||
* Messages | |||
** [[Java_API:Relay#addSocialFeed|<tt>addSocialFeed</tt>]] (post a msg) | |||
** [[Java_API:Relay#getSocialFeed|<tt>getSocialFeed</tt>]] (get msg) | |||
** [[Java_API:Relay#deleteSocialFeed|<tt>deleteSocialFeed</tt>]] (delete msg) | |||
** [[Java_API:Relay#searchSocialFeeds|<tt>searchSocialFeeds</tt>]] (search msgs) | |||
* Message Voting | |||
** [[Java_API:Relay#getSocialVotes|<tt>getSocialVotes</tt>]] | |||
** [[Java_API:Relay#socialVote|<tt>socialVote</tt>]] | |||
* Following Feeds | |||
** [[Java_API:Relay#socialFollow|<tt>socialFollow</tt>]] | |||
** [[Java_API:Relay#socialUnFollow|<tt>socialUnfollow</tt>]] | |||
** [[Java_API:Relay#getSocialFollowers|<tt>getSocialFollowers</tt>]] | |||
** [[Java_API:Relay#getSocialFollowing|<tt>getSocialFollowing</tt>]] | |||
* Notifications | |||
** [[Java_API:Relay#getSocialNotificationsCount|<tt>getSocialNotificationsCount</tt>]] | |||
** [[Java_API:Relay#getSocialNotificationsList|<tt>getSocialNotificationsList</tt>]] | |||
** [[Java_API:Relay#setAllSocialNotificationsRead|<tt>setAllSocialNotificationsRead</tt>]] | |||
|- | |- | ||
Line 72: | Line 113: | ||
* [[Java API:Email_and_Document_Management#sendEmail|<tt>sendEmail</tt>]] | * [[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#sendEmailUsingTemplate|<tt>sendEmailUsingTemplate</tt>]] | ||
<hr> | |||
* [[Java API:Email_and_Document_Management#generateDocument|<tt>generateDocument</tt>]] | * [[Java API:Email_and_Document_Management#generateDocument|<tt>generateDocument</tt>]] | ||
* [[Java_API_Cheatsheet#getDocument|<tt>getDocument("id")</tt>]] | |||
* [[Java_API_Cheatsheet#getDocumentByTitle|<tt>getDocumentByTitle("title")</tt>]] | |||
<hr> | |||
* [[Java_API_Cheatsheet#Email_Handler_APIs|<tt>EmailHandler</tt> APIs]] | |||
|- | |- | ||
|[[Java_API:Event_and_Task_Management|Event and Task Management]] | |[[Java_API:Event_and_Task_Management|Event and Task Management]] | ||
Line 89: | Line 136: | ||
| | | | ||
*[[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#rollback|<tt>rollback</tt>]] | *[[Java_API:Transaction_Management#rollback|<tt>rollback</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>]] | ||
|- | |- | ||
|[[Java_API:Support_Classes_and_Objects|Support Classes and Objects]] | |[[Java_API:Support_Classes_and_Objects|Support Classes and Objects]] | ||
Use these support classes and objects when you work with the Java API | Use these support classes and objects when you work with the Java API | ||
| | | | ||
* [{{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]] | ||
Line 104: | Line 152: | ||
* [[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> | <hr> | ||
* [[Java_API:Support_Classes_and_Objects#request_Object|<tt>request</tt> object]] - [[Page]] | * [[Java_API:Support_Classes_and_Objects#request_Object|<tt>request</tt> object]] - [[Page]] | ||
* [[Java_API:Support_Classes_and_Objects#requestParams_Object|<tt>requestParams</tt> object]] - [[Data Policies|Data Policy]] | * [[Java_API:Support_Classes_and_Objects#requestParams_Object|<tt>requestParams</tt> object]] - [[Data Policies|Data Policy]] | ||
* [[Java_API:Support_Classes_and_Objects#TenantContext_Object|<tt>TenantContext Object</tt>]] | * [[Java_API:Support_Classes_and_Objects#TenantContext_Object|<tt>TenantContext Object</tt>]] | ||
|- | |- | ||
|[[Java API:Utility|Utility]] | |[[Java API:Utility|Utility]] | ||
Provides APIs to perform general-purpose operations | Provides APIs to perform general-purpose operations | ||
| | | | ||
* [[Java_API:Utility#debug|<tt>debug</tt>]] | * [[Java_API:Utility#debug|<tt>debug</tt>]] - <span style="color:red;">'''''Deprecated'''''</span><br>Use Logger class. (See [[Debug Log]]) | ||
* [[Java_API:Utility#getEnv|<tt>getEnv</tt>]] | * [[Java_API:Utility#getEnv|<tt>getEnv</tt>]] | ||
* [[Java_API:Utility#getParametersInstance|<tt>getParametersInstance</tt>]] | * [[Java_API:Utility#getParametersInstance|<tt>getParametersInstance</tt>]] | ||
Line 120: | Line 167: | ||
* [[Java_API:Utility#getLoggedInUserInfo|<tt>getLoggedInUserInfo</tt>]] | * [[Java_API:Utility#getLoggedInUserInfo|<tt>getLoggedInUserInfo</tt>]] | ||
* [[Java_API:Utility#setTargetPage |<tt>setTargetPage </tt>]] | * [[Java_API:Utility#setTargetPage |<tt>setTargetPage </tt>]] | ||
* [[Java_API:Utility#showMessage |<tt>showMessage </tt>]] | * [[Java_API:Utility#showMessage |<tt>showMessage</tt>]] | ||
* [[Java_API:Utility#sleep |<tt>sleep</tt>]] | |||
* [[Java_API:Utility#throwError|<tt>throwError</tt>]] | * [[Java_API:Utility#throwError|<tt>throwError</tt>]] | ||
* [[Java_API:Utility#translateToken|<tt>translateToken</tt>]] | * [[Java_API:Utility#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>] | |||
|- | |- | ||
Line 144: | Line 180: | ||
| | | | ||
*[[Java_API:Customize#Object_Metadata|Object Metadata]] | *[[Java_API:Customize#Object_Metadata|Object Metadata]] | ||
*[[Java_API:Customize#Field_Metadata|Field Metadata]] | *[[Java_API:Customize#Field_Metadata|Field Metadata]] | ||
*[[Java_API: | **[[Java_API:Enumerated_Fields|Enumerated Fields]] | ||
*[[Java_API:Customize# | **[[Java_API:Global_Picklists|Global Picklists]] | ||
<!--*[[Java_API:Customize#Form_Metadata|Form Metadata]]--> | |||
|- | |- | ||
Line 162: | Line 199: | ||
==Java API Library Reference== | ==Java API Library Reference== | ||
:''This section has moved to the'' [[Java API Cheatsheet]]. | |||
:(Please adjust your bookmarks!) | |||
__FORCETOC__ | __FORCETOC__ | ||
<noinclude> | <noinclude> |
Latest revision as of 20:20, 25 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
- Data policies, by Invoking a Java Method
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.
Classes, Objects and APIs | Detail |
---|---|
Record Handling
To handle records in Objects |
|
Record Handling for Composite Objects
To operate on records in composite Object Relationships |
|
Workflow Record Handling
To manage Workflows |
|
Relay
To do social networking. |
|
Record Handling for Tenant Data Sharing
To handle records in Objects shared using Tenant Data Sharing Policies |
|
Data Import
Import CSV data into Objects |
|
Email and Document Management |
|
Event and Task Management
Provides APIs to create Appointments, Tasks and to Log Activities |
|
Transaction Management
Provides the ability to Rollback transactions to a SavePoint |
|
Support Classes and Objects
Use these support classes and objects when you work with the Java API |
|
Utility
Provides APIs to perform general-purpose operations |
|
Customize
These Provisional APIs give you the ability to manage metadata for program entities. |
|
Status
API for checking status of scheduled jobs. |
4 Identifying Objects and Records
Many of the API record handling calls require an {object} element identifier. To find the Object Type Identifier:
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 Built-in or CRM objects and Custom Objects.
- objectID: This identifier is a human-readable name for Built-in or CRM objects (e.g. CASE), but for Custom Objects, it is a computer-generated string with no humanly-interpretable semantic value (e.g. 123qwe456rty).
- See also:
- Session Identifier - session identifier
- Record Id - record id
4.1 Find the Object Type Identifier
To find the object type identifier for an object:
- Click Designer > Objects > {object}
- The Object Name is displayed at the top of the page.
(To see the object ID, click the section-expansion (triangle) icon next to it. )
Note: The Object Name is typically used as the identifier, because it is human-readable for both Built-in or CRM objects and Custom Objects. Object ID can be used, as well, but it is only human-readable for Built-in or CRM objects.
5 Java API Library Reference
- This section has moved to the Java API Cheatsheet.
- (Please adjust your bookmarks!)