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

describeGlobalTheme()

現在のログインユーザーが使用できるオブジェクトとテーマの両方の情報を返します。

構文

1DescribeGlobalTheme = connection.describeGlobalTheme();

使用方法

describeGlobalTheme() を使用して、組織で使用可能なオブジェクトのリストと、それらのオブジェクトに関するテーマ情報の両方を取得します。describeGlobalTheme() は、describeGlobal()describeTheme() を単一のコールに組み合わせたものです。

組織のデータのテーマとオブジェクト情報を取得するには、条件を満たすアクセス権限でクライアントアプリケーションにログインする必要があります。詳細は、「データアクセスに影響する要素」を参照してください。

describeGlobalTheme() は、API バージョン 29.0 以降で使用できます。

サンプル

この Java のサンプルでは、describeGlobalTheme() をコールした後、取得したオブジェクトとテーマ情報を反復します。

1public static void describeGlobalThemeExample() {
2    try {
3        // Get current theme and object information
4        DescribeGlobalTheme globalThemeResult = connection.describeGlobalTheme();
5        DescribeGlobalResult globalResult = globalThemeResult.getGlobal();
6        DescribeThemeResult globalTheme = globalThemeResult.getTheme();
7        // For the themes, get the array of theme items, one per object			  
8        DescribeThemeItem[] themeItems = globalTheme.getThemeItems();			  
9        for (int i = 0; i < themeItems.length; i++) {
10            DescribeThemeItem themeItem = themeItems[i];
11            System.out.println("Theme information for object " + themeItem.getName());
12            // Get color and icon info for each themeItem
13            DescribeColor colors[] = themeItem.getColors();
14            System.out.println("    Number of colors: " + colors.length);
15            int k;
16            for (k = 0; k < colors.length; k++) {
17                DescribeColor color = colors[k];
18                System.out.println("    For Color #" + k + ":");
19                System.out.println("      Web RGB Color: " + color.getColor());
20                System.out.println("      Context: " + color.getContext());
21                System.out.println("      Theme: " + color.getTheme());
22            }
23            DescribeIcon icons[] = themeItem.getIcons();
24            System.out.println("    Number of icons: " + icons.length);
25            for (k = 0; k < icons.length; k++) {
26                DescribeIcon icon = icons[k];
27                System.out.println("    For Icon #" + k + ":");
28                System.out.println("      ContentType: " + icon.getContentType());
29                System.out.println("      Height: " + icon.getHeight());
30                System.out.println("      Theme: " + icon.getTheme());
31                System.out.println("      URL: " + icon.getUrl());
32                System.out.println("      Width: " + icon.getWidth());
33            }
34        }
35    } catch (ConnectionException ce) {
36        ce.printStackTrace();
37    }
38}