diff --git a/BulkAPISampleFiles/delete.csv b/BulkAPISampleFiles/delete.csv
new file mode 100644
index 0000000..9535358
--- /dev/null
+++ b/BulkAPISampleFiles/delete.csv
@@ -0,0 +1,5 @@
+Id
+003E000001DJOfxIAH
+003E000001DJOfyIAH
+003E000001DJOV4IAP
+003E000001DJOV5IAP
\ No newline at end of file
diff --git a/BulkAPISampleFiles/delete.xml b/BulkAPISampleFiles/delete.xml
new file mode 100644
index 0000000..e644728
--- /dev/null
+++ b/BulkAPISampleFiles/delete.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ 003E000001DJOfxIAH
+
+
+ 003E000001DJOfyIAH
+
+
+ 003E000001DJOV4IAP
+
+
+ 003E000001DJOV5IAP
+
+
\ No newline at end of file
diff --git a/BulkAPISampleFiles/insert.csv b/BulkAPISampleFiles/insert.csv
new file mode 100644
index 0000000..31cb26a
--- /dev/null
+++ b/BulkAPISampleFiles/insert.csv
@@ -0,0 +1,3 @@
+FirstName,LastName,Department,Birthdate,Description
+Tom,Jones,Marketing,1940-06-07Z,"Self-described as ""the top"" branding guru on the West Coast"
+Ian,Dury,R&D,,"World-renowned expert in fuzzy logic design. Influential in technology purchases."
\ No newline at end of file
diff --git a/BulkAPISampleFiles/insert.xml b/BulkAPISampleFiles/insert.xml
new file mode 100644
index 0000000..686ed5a
--- /dev/null
+++ b/BulkAPISampleFiles/insert.xml
@@ -0,0 +1,17 @@
+
+
+
+
+ Tom
+ Jones
+ Marketing
+ 1940-06-07Z
+ Self-described as "the top" branding guru on the West Coast
+
+
+ Ian
+ Dury
+ R&D
+ World-renowned expert in fuzzy logic design. Influential in technology purchases.
+
+
\ No newline at end of file
diff --git a/BulkAPISampleFiles/update.csv b/BulkAPISampleFiles/update.csv
new file mode 100644
index 0000000..230ef1a
--- /dev/null
+++ b/BulkAPISampleFiles/update.csv
@@ -0,0 +1,2 @@
+Id,Title
+003E000001CbzBi,Ninja
\ No newline at end of file
diff --git a/BulkAPISampleFiles/update.xml b/BulkAPISampleFiles/update.xml
new file mode 100644
index 0000000..8574c72
--- /dev/null
+++ b/BulkAPISampleFiles/update.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ 003E000001CbzBi
+ Pirate
+
+
\ No newline at end of file
diff --git a/BulkAPISampleFiles/upsert.csv b/BulkAPISampleFiles/upsert.csv
new file mode 100644
index 0000000..5841c32
--- /dev/null
+++ b/BulkAPISampleFiles/upsert.csv
@@ -0,0 +1,2 @@
+Twitter_Handle__c,Title
+pattest7,Guru
\ No newline at end of file
diff --git a/BulkAPISampleFiles/upsert.xml b/BulkAPISampleFiles/upsert.xml
new file mode 100644
index 0000000..b942d57
--- /dev/null
+++ b/BulkAPISampleFiles/upsert.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ pattest7
+ Pirate
+
+
\ No newline at end of file
diff --git a/BulkTK.md b/BulkTK.md
new file mode 100644
index 0000000..a5eb38f
--- /dev/null
+++ b/BulkTK.md
@@ -0,0 +1,137 @@
+BulkTK: Force.com Bulk API JavaScript Toolkit
+=============================================
+
+This minimal toolkit extends ForceTK to allow JavaScript in web pages to call the [Force.com Bulk API](https://www.salesforce.com/us/developer/docs/api_asynch/).
+
+Background
+==========
+
+The Force.com Bulk API allows asynchronous data access. BulkTK extends ForceTK with methods to create Bulk API jobs, add batches to them, monitor job status and retrieve job results. Control plane XML is parsed to JavaScript objects for ease of use, while data is returned verbatim.
+
+You should familiarize yourself with the [Force.com Bulk API documentation](https://www.salesforce.com/us/developer/docs/api_asynch/), since BulkTK is a relatively thin layer on the raw XML Bulk API.
+
+[bulk.page](https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/bulk.page) is a simple Visualforce single page application to demonstrate BulkTK. Try it out in a sandbox or developer edition.
+
+Note that, just like ForceTK, BulkTK is unsupported and supplied as is. It is also currently in a very early stage of development. It appears to work well, but bugs cannot be ruled out, and the interface should not be considered stable.
+
+Dependencies
+============
+
+ * [jquery](http://jquery.com/)
+ * [ForceTK](https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit)
+ * [jxon](https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/jxon.js) (originally from the [Ratatosk](https://github.com/wireload/Ratatosk) project; this version preserves case in element and attribute names)
+
+Example Usage
+=============
+
+This example focuses on Visualforce. See the [ForceTK documentation](https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit) for details on authenticating from an external website, such as a Heroku app, or PhoneGap/Cordova.
+
+First, include BulkTK and its dependencies:
+
+
+
+
+
+
+Now create a ForceTK client:
+
+ var client = new forcetk.Client();
+ client.setSessionToken('{!$Api.Session_ID}');
+
+See the [ForceTK documentation](https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit) for details on authenticating from an external website, such as a Heroku app, or PhoneGap/Cordova.
+
+Create a job
+------------
+
+ // See https://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_reference_jobinfo.htm
+ // for details of the JobInfo structure
+
+ // Insert Contact records in CSV format
+ var job = {
+ operation : 'insert',
+ object : 'Contact',
+ contentType : 'CSV'
+ };
+
+ client.createJob(job, function(response) {
+ jobId = response.jobInfo.id;
+ console.log('Job created with id '+jobId+'\n');
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error creating job', jqXHR.responseText);
+ });
+
+Add a batch of records to the job
+---------------------------------
+
+You can add multiple batches to the job; each batch can contain up to 10,000 records. See [batch size and limits](https://www.salesforce.com/us/developer/docs/api_asynch/Content/asynch_api_concepts_limits.htm#batch_size_title) for more details.
+
+ var csvData = "FirstName,LastName,Department,Birthdate,Description\n"+
+ "Tom,Jones,Marketing,1940-06-07Z,"Self-described as ""the top"" branding guru on the West Coast\n"+
+ "Ian,Dury,R&D,,"World-renowned expert in fuzzy logic design. Influential in technology purchases."\n";
+
+ client.addBatch(jobId, "text/csv; charset=UTF-8", csvData,
+ function(response){
+ console.log('Added batch '+response.batchInfo.id+'. State: '+response.batchInfo.state+'\n');
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error adding batch', jqXHR.responseText);
+ });
+
+See BulkAPISampleFiles for sample CSV and XML data for different operations.
+
+Close the job
+-------------
+
+You must close the job to inform Salesforce that no more batches will be submitted for the job.
+
+ client.closeJob(jobId, function(response){
+ console.log('Job closed. State: '+response.jobInfo.state+'\n');
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error closing job', jqXHR.responseText);
+ });
+
+Check batch status
+------------------
+
+ client.getBatchDetails(jobId, batchId, function(response){
+ console.log('Batch state: '+response.batchInfo.state+'\n');
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error getting batch details', jqXHR.responseText);
+ });
+
+Get batch results
+-----------------
+
+Pass `true` as the `parseXML` parameter to get batch results for a query, false otherwise.
+
+ client.getBatchResult(jobId, batchId, false, function(response){
+ console.log('Batch result: '+response);
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error getting batch result', jqXHR.responseText);
+ });
+
+Bulk query
+----------
+
+When adding a batch to a bulk query job, the `contentType` for the request must be either `text/csv` or `application/xml`, depending on the content type specified when the job was created. The actual SOQL statement supplied for the batch will be in plain text format.
+
+ var soql = 'SELECT Id, FirstName, LastName, Email FROM Contact';
+
+ client.addBatch(jobId, 'text/csv', soql, function(response){
+ console.log('Batch state: '+response.batchInfo.state+'\n');
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error getting batch result', jqXHR.responseText);
+ });
+
+Getting bulk query results is a two step process. Call `getBatchResult()` with `parseXML` set to `true` to get a set of result IDs, then call `getBulkQueryResult()` to get the actual records for each result
+
+ client.getBatchResult(jobId, batchId, true, function(response){
+ response['result-list'].result.forEach(function(resultId){
+ client.getBulkQueryResult(jobId, batchId, resultId, function(response){
+ console.log('Batch result: '+response);
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error getting bulk query results', jqXHR.responseText);
+ });
+ });
+ }, function(jqXHR, textStatus, errorThrown) {
+ console.log('Error getting batch result', jqXHR.responseText);
+ });
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 0000000..522fa4a
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1,2 @@
+# Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing.
+#ECCN:Open Source
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..b4612a7
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,105 @@
+# Salesforce Open Source Community Code of Conduct
+
+## About the Code of Conduct
+
+Equality is a core value at Salesforce. We believe a diverse and inclusive
+community fosters innovation and creativity, and are committed to building a
+culture where everyone feels included.
+
+Salesforce open-source projects are committed to providing a friendly, safe, and
+welcoming environment for all, regardless of gender identity and expression,
+sexual orientation, disability, physical appearance, body size, ethnicity, nationality,
+race, age, religion, level of experience, education, socioeconomic status, or
+other similar personal characteristics.
+
+The goal of this code of conduct is to specify a baseline standard of behavior so
+that people with different social values and communication styles can work
+together effectively, productively, and respectfully in our open source community.
+It also establishes a mechanism for reporting issues and resolving conflicts.
+
+All questions and reports of abusive, harassing, or otherwise unacceptable behavior
+in a Salesforce open-source project may be reported by contacting the Salesforce
+Open Source Conduct Committee at ossconduct@salesforce.com.
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of gender
+identity and expression, sexual orientation, disability, physical appearance,
+body size, ethnicity, nationality, race, age, religion, level of experience, education,
+socioeconomic status, or other similar personal characteristics.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy toward other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+advances
+* Personal attacks, insulting/derogatory comments, or trolling
+* Public or private harassment
+* Publishing, or threatening to publish, others' private information—such as
+a physical or electronic address—without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+professional setting
+* Advocating for or encouraging any of the above behaviors
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned with this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project email
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the Salesforce Open Source Conduct Committee
+at ossconduct@salesforce.com. All complaints will be reviewed and investigated
+and will result in a response that is deemed necessary and appropriate to the
+circumstances. The committee is obligated to maintain confidentiality with
+regard to the reporter of an incident. Further details of specific enforcement
+policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership and the Salesforce Open Source Conduct
+Committee.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant-home],
+version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html.
+It includes adaptions and additions from [Go Community Code of Conduct][golang-coc],
+[CNCF Code of Conduct][cncf-coc], and [Microsoft Open Source Code of Conduct][microsoft-coc].
+
+This Code of Conduct is licensed under the [Creative Commons Attribution 3.0 License][cc-by-3-us].
+
+[contributor-covenant-home]: https://www.contributor-covenant.org (https://www.contributor-covenant.org/)
+[golang-coc]: https://golang.org/conduct
+[cncf-coc]: https://github.com/cncf/foundation/blob/master/code-of-conduct.md
+[microsoft-coc]: https://opensource.microsoft.com/codeofconduct/
+[cc-by-3-us]: https://creativecommons.org/licenses/by/3.0/us/
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..9ba9791
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,14 @@
+BSD 3-Clause License
+
+Copyright (c) 2022 Salesforce, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.markdown b/README.markdown
index 92877d2..b72c733 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,3 +1,7 @@
+> [!WARNING]
+> This project is deprecated, use [JSforce](https://jsforce.github.io/) instead.
+
+
Force.com JavaScript REST Toolkit
=================================
@@ -6,16 +10,51 @@ This minimal toolkit allows JavaScript in web pages to call the Force.com REST A
Background
----------
-Due to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy), JavaScript running in Visualforce pages may not use [XmlHttpRequest](http://en.wikipedia.org/wiki/XMLHttpRequest) to directly invoke the REST API, since Visualforce pages have hostnames of the form abc.na1.visual.force.com, and the REST API endpoints are of the form na1.salesforce.com.
+ForceTK provides a convenient, thin JavaScript abstraction of the [Force.com REST API](https://developer.salesforce.com/page/REST_API), making the API more accessible to JavaScript code running in Visualforce, in hybrid mobile apps, and elsewhere.
+
+Due to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy), JavaScript running outside the Force.com Platform may not use [XMLHttpRequest](http://en.wikipedia.org/wiki/XMLHttpRequest) to directly invoke the REST API, so a minimal PHP proxy is provided.
+
+Recent Updates
+--------------
+
+* [Visualforce Remote Objects](https://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_remote_objects.htm|StartTopic=Content%2Fpages_remote_objects.htm|SkinName=webhelp) are proxy objects that enable basic DML operations on sObjects directly from JavaScript. Behind the scenes, the Remote Objects controller handles sharing rules, field level security, and other data accessibility concerns. Pages that use Remote Objects are subject to all the standard Visualforce limits, but like JavaScript remoting, Remote Objects calls don’t count toward API request limits.
+
+
+ Since Remote Objects are more secure than RemoteTK (which does not respect sharing rules, FLS etc since system-level access is proxied via the RemoteTK controller), and similarly do not consume API calls (the main motivation for RemoteTK), RemoteTK has been removed from the toolkit.
+
+* Since the Summer '13 release, the `/services/data` endpoint has been exposed on Visualforce hosts, so no proxy is now required for REST API calls in JavaScript served via Visualforce (although the proxy **is** still required for calls to `/services/apexrest`). `forcetk.js` has been updated to reflect this.
+
+* Inserting or updating blob data using the `create` or `update` functions (passing base64-encoded binary data in JSON) is limited by the REST API to 50 MB of text data or 37.5 MB of base64–encoded data. New functions, `createBlob` and `updateBlob`, allow creation and update of ContentVersion and Document records with binary ('blob') content with a size of up to 500 MB. Here is a minimal sample that shows how to upload a file to Chatter Files:
-The RemoteTK Visualforce Custom Component (comprising RemoteTK.component and RemoteTKController.cls) provides an abstraction very similar to the REST API, implemented via `@RemoteAction` methods in the component's controller. The advantage of this mechanism is that no API calls are consumed.
+
+
+ Select a file to upload as a new Chatter File.
+
+
+
+
+
+
+
-[PhoneGap](http://www.phonegap.com/) provides a way for HTML5/JavaScript apps to run as native applications; in this configuration a proxy is not required - the toolkit simply provides a convenient abstraction of the REST API.
+ Under the covers, `createBlob` sends a multipart message. See the REST API doc page [Insert or Update Blob Data](https://www.salesforce.com/us/developer/docs/api_rest/Content/dome_sobject_insert_update_blob.htm) for more details.
Dependencies
------------
@@ -25,37 +64,8 @@ The toolkit uses [jQuery](http://jquery.com/). It has been tested on jQuery 1.4.
Configuration
-------------
-RemoteTK requires no configuration.
-
ForceTK requires that you add the correct REST endpoint hostname for your instance (i.e. https://na1.salesforce.com/ or similar) as a remote site in *Your Name > Administration Setup > Security Controls > Remote Site Settings*.
-Using RemoteTK in a Visualforce page
-------------------------------------
-
-Add RemoteTKController.cls and RemoteTK.component to your org by creating an Apex Class and a Component and pasting in the respective content, pasting the files into a [Force.com IDE](http://wiki.developerforce.com/page/Force.com_IDE) project, or by using the [Force.com Migration Tool](http://wiki.developerforce.com/page/Migration_Tool_Guide).
-
-Your Visualforce page will need to include the component and create a client object. An absolutely minimal sample is:
-
-
-
-
-
-
-
The first account I see is .
-
-
-More fully featured samples are provided in [RemoteTKExample.page](Force.com-JavaScript-REST-Toolkit/blob/master/RemoteTKExample.page) and [RemoteTKMobile.page](Force.com-JavaScript-REST-Toolkit/blob/master/RemoteTKMobile.page).
-
Using ForceTK in a Visualforce page
-----------------------------------
@@ -67,15 +77,12 @@ Your Visualforce page will need to include jQuery and the toolkit, then create a
The first account I see is .
@@ -130,14 +137,14 @@ Your HTML page will need to include jQuery and the toolkit, then create a client
function sessionCallback(oauthResponse) {
if (typeof oauthResponse === 'undefined'
|| typeof oauthResponse['access_token'] === 'undefined') {
- $('#message').html('Error - unauthorized!');
+ $('#message').text('Error - unauthorized!');
} else {
client.setSessionToken(oauthResponse.access_token, null,
oauthResponse.instance_url);
client.query("SELECT Name FROM Account LIMIT 1",
function(response){
- $('#message').html('The first account I see is '
+ $('#message').text('The first account I see is '
+response.records[0].Name);
});
}
@@ -148,39 +155,50 @@ Your HTML page will need to include jQuery and the toolkit, then create a client
More fully featured samples are provided in [example.html](Force.com-JavaScript-REST-Toolkit/blob/master/example.html) and [mobile.html](Force.com-JavaScript-REST-Toolkit/blob/master/mobile.html).
-Using the Toolkit in a PhoneGap app
------------------------------------
+Using the Toolkit in a Cordova app
+----------------------------------
-Your HTML page will need to include jQuery, the toolkit, PhoneGap and the ChildBrowser plugin, then create a client object, passing a session ID to the constructor. You can use __https://login.salesforce.com/services/oauth2/success__ as the redirect URI and catch the page load in ChildBrowser.
+Your HTML page will need to include jQuery, the toolkit and Cordova. You will also need to install the [InAppBrowser](http://plugins.cordova.io/#/package/org.apache.cordova.inappbrowser) plugin to be able to pop up a browser window for authentication. Create a client object, passing a session ID to the constructor. You can use __https://login.salesforce.com/services/oauth2/success__ as the redirect URI and catch the page load in InAppBrowser.
An absolutely minimal sample using OAuth to obtain a session ID is:
+
-
-
-
-
-
+
+
+
-
Click here.
+
+
+
+
+
-A fully featured sample (including persistence of the OAuth refresh token to the iOS Keychain) is provided in [phonegap.html](Force.com-JavaScript-REST-Toolkit/blob/master/phonegap.html).
+A fully featured sample (including persistence of the OAuth refresh token to the iOS Keychain) for iOS is provided in [cordova-ios.html](https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/cordova-ios.html). The sample uses Cordova 4.3.0 and the InAppBrowser and iOS Keychain plugins. Install these with
+ cordova plugin add org.apache.cordova.inappbrowser
+ cordova plugin add com.shazron.cordova.plugin.keychainutil
diff --git a/RemoteTK.component b/RemoteTK.component
deleted file mode 100644
index 071114a..0000000
--- a/RemoteTK.component
+++ /dev/null
@@ -1,201 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/RemoteTKController.cls b/RemoteTKController.cls
deleted file mode 100644
index c39cff5..0000000
--- a/RemoteTKController.cls
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright (c) 2012, salesforce.com, inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are permitted provided
- * that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the
- * following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
- * the following disclaimer in the documentation and/or other materials provided with the distribution.
- *
- * Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or
- * promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-public class RemoteTKController {
- private static String makeError(String message, String errorCode) {
- JSONGenerator gen = JSON.createGenerator(false);
- gen.writeStartArray();
- gen.writeStartObject();
- gen.writeStringField('message', message);
- gen.writeStringField('errorCode', errorCode);
- gen.writeEndObject();
- gen.writeEndArray();
-
- return gen.getAsString();
- }
-
- @remoteAction
- public static String describe(String objtype) {
- // Just enough to make the sample app work!
- Schema.SObjectType targetType = Schema.getGlobalDescribe().get(objtype);
- if (targetType == null) {
- return makeError('The requested resource does not exist', 'NOT_FOUND');
- }
-
- Schema.DescribeSObjectResult sobjResult = targetType.getDescribe();
-
- Map fieldMap = sobjResult.fields.getMap();
-
- List