この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える
Clouds with binary code floating aboveCloud with binary code floating above

No Results

Search Tips:

  • Please consider misspellings
  • Try different search keywords

Tooling API

Tooling API を使用すると、Salesforce アプリケーション用のカスタム開発ツールを作成できます。

Tooling API を使用するケース

Tooling API は、Force.com アプリケーション用のカスタム開発ツールを作成可能な SOAP および REST インターフェースを提供します。Tooling API は、開発者ツール作成で使用され、REST や SOAP からアクセスできるオブジェクトを公開します。また、Salesforce REST APISOAP API と同様に機能します。

たとえば、Tooling API を使用して次のことができます。
  • 既存の Force.com ツールに機能を追加する。
  • Force.com 開発用の動的モジュールをエンタープライズインテグレーションツールに組み込む。
  • 特定のアプリケーションまたはサービス専用の開発ツールを作成する。
こうした目標を達成するために、Tooling API には、次の処理を実行するためのコールが用意されています。
  • Apex クラスおよびトリガと Visualforce ページおよびコンポーネントの作業コピーを管理する。
  • 静的リソースファイルの作業コピーを管理する。
  • Apex クラスおよびトリガと Visualforce ページおよびコンポーネントの作業コピーに更新やエラーがないかチェックし、変更を組織にコミットする。
  • ヒープダンプマーカーを設定する。
  • Apex 実行時に Apex コードまたは SOQL ステートメントをフロート表示する。
  • Apex を匿名実行する。
  • チェックポイントを設定して自分または他のユーザ用にログファイルを生成する。
  • デバッグログおよびヒープダンプファイルにアクセスする。
  • カスタムオブジェクトのカスタム項目を管理する。
  • コードカバー率の結果にアクセスする。
次の Java コードスニペットでは、Tooling API の SOAP ベースのインターフェースを使用して、SayHello というメソッドが 1 つ含まれる Apex クラスをプログラムで作成します。
1swfobject.registerObject("clippy.codeblock-0", "9");   String classBody = "public class Messages {\n"
2      + "public string SayHello() {\n"
3      + " return 'Hello';\n" + "}\n"
4      + "}";
5
6   // create a new ApexClass object and set the body 
7   ApexClass apexClass = new ApexClass();
8   apexClass.Body = classBody;
9   ApexClass[] classes = { apexClass };
10
11   // call create() to add the class
12   SaveResult[] saveResults = sforce.create(classes);
13   for (int i = 0; i < saveResults.Length; i++)
14      {
15      if (saveResults[i].success)
16         {
17           Console.WriteLine("Successfully created Class: " +
18            saveResults[i].id);
19         }
20      else
21         {
22            Console.WriteLine("Error: could not create Class ");
23            Console.WriteLine("   The error reported was: " +
24            saveResults[i].errors[0].message + "\n");
25         }
26      }
27

サポート対象のエディションとプラットフォーム

Tooling API を使用するには、組織で Enterprise Edition、Performance Edition、Unlimited Edition、または Developer Edition を使用している必要があります。既存の Salesforce のお客様が Enterprise Edition、Unlimited Edition、または Performance Edition にアップグレードする場合は、担当者にご連絡ください。