describeGlobalTheme()

Returns information about both objects and themes available to the current logged-in user.

Syntax

DescribeGlobalTheme = connection.describeGlobalTheme();

Usage

Use describeGlobalTheme() to get both a list of available objects and theme information about those objects for your organization. describeGlobalTheme() is a combination of describeGlobal() and describeTheme() combined into a single call.

Your client application must be logged in with sufficient access rights to retrieve theme and object information about your organization’s data. For more information, see Factors that Affect Data Access.

describeGlobalTheme() is available in API version 29.0 and later.

Sample

This Java sample calls describeGlobalTheme() and then iterates over the retrieved object and theme information.

public static void describeGlobalThemeExample() {
    try {
        // Get current theme and object information
        DescribeGlobalTheme globalThemeResult = connection.describeGlobalTheme();
        DescribeGlobalResult globalResult = globalThemeResult.getGlobal();
        DescribeThemeResult globalTheme = globalThemeResult.getTheme();
        // For the themes, get the array of theme items, one per object			  
        DescribeThemeItem[] themeItems = globalTheme.getThemeItems();			  
        for (int i = 0; i < themeItems.length; i++) {
            DescribeThemeItem themeItem = themeItems[i];
            System.out.println("Theme information for object " + themeItem.getName());
            // Get color and icon info for each themeItem
            DescribeColor colors[] = themeItem.getColors();
            System.out.println("    Number of colors: " + colors.length);
            int k;
            for (k = 0; k < colors.length; k++) {
                DescribeColor color = colors[k];
                System.out.println("    For Color #" + k + ":");
                System.out.println("      Web RGB Color: " + color.getColor());
                System.out.println("      Context: " + color.getContext());
                System.out.println("      Theme: " + color.getTheme());
            }
            DescribeIcon icons[] = themeItem.getIcons();
            System.out.println("    Number of icons: " + icons.length);
            for (k = 0; k < icons.length; k++) {
                DescribeIcon icon = icons[k];
                System.out.println("    For Icon #" + k + ":");
                System.out.println("      ContentType: " + icon.getContentType());
                System.out.println("      Height: " + icon.getHeight());
                System.out.println("      Theme: " + icon.getTheme());
                System.out.println("      URL: " + icon.getUrl());
                System.out.println("      Width: " + icon.getWidth());
            }
        }
    } catch (ConnectionException ce) {
        ce.printStackTrace();
    }
}