Suppliers

Suppliers are services provided by various plugins which provide information about particular content. This is made particular use of by the Reporting Plugin, which uses suppliers to generate the content of the reports displayed.

Available Suppliers

NamePrefixSummary
Attachment SupplierattachmentSupplies information about attachments in Confluence.
Boolean SupplierbooleanAllows some simple post-processing on boolean values.
Child Counter Supplierchild-counterProvides access to the 'current' and 'next' counter for the number of children added to a page in Confluence.
Class SupplierclassProvides information about object classes.
Collection SuppliercollectionProvides information about collections of items.
Comment SuppliercommentSupplies information about comments attached to Pages or News Items in Confluence.
Content SuppliercontentSupplies information about Confluence content, such as pages, news items, attachments and comments.
Date SupplierdateProvides information about dates.
Debug SupplierdebugProvides access to various objects useful for debugging.
Email SupplieremailSupplies information about email addresses.
Expanded SupplierexpandedThis provides access to the 'expanded' object created by the expand-on and expanding-reporter macros.
Global SupplierglobalThis supplier can be used from any context, and provides information about global values, such as the current user, the date/time, etc.
Grouped SuppliergroupedProvides access to the results of the {grouping-reporter}.
Label SupplierlabelProvides information about Confluence content labels.
Link SupplierlinkProvides information about links coming from Confluence content.
Mail SuppliermailSupplies information about archived email files stored in Confluence.
Map Entry SupplierentryProvides access to the key and value of a specific map entry.
Map SuppliermapProvides information about 'Map' collections, which are collections of information with a key/value relationship.
Match SuppliermatchThis provides access to match values using regular expressions.
News SuppliernewsSupplies information about news items (a.k.a blog posts) in Confluence.
Number SuppliernumberProvides information about numbers.
Object SupplierobjectProvides general information about any object.
Page SupplierpageSupplies information about Confluence pages.
Reference SupplierreferenceProvides information about references, which are the data type used by Scaffolding list-data-related macros.
Report SupplierreportProvides access to information about the current report.
Request SupplierrequestProvides access to the headers and parameters passed in the HTTP request for the current context.
Salesforce.com Contact SuppliercontactSupplies information about Salesforce.com contacts. (Only in version 1.x of the plugin)
Salesforce.com Supplier Version 1salesforceProvides access to Salesforce.com account information. (Only in version 1.x of the plugin)
Salesforce.com Supplier Version 2sfProvides access to any type of SalesForce object, please refer to the SalesForce Standard Objects API for a complete list of all object types as well as all available fields for each object
Scaffold Data SupplierdataProvides access to data set using Scaffolding Data macros.
Session SuppliersessionProvides access to the HTTP Session context.
Space SupplierspaceThis supplier provides key values for Confluence Spaces.
Stats On Supplierstats-onPerforms basic statistical analysis on values in a Collection of items.
Stats SupplierstatsProvides access to calculated statistics on a set of data.
Task SuppliertaskProvides access to information about specific tasks created by a Tasklist macro
Tasklist SuppliertasklistProvides access to the items in a Tasklist.
Text SuppliertextProvides information about text values.
Tracking Data SuppliertrackProvides information from the Tracking Plugin regarding content view counts.
User Group Supplieruser-groupProvides information about user groups.
User SupplieruserProvides information about Confluence Users.
Value SuppliervalueFinds or creates specific values for use with keychains.
Variable SuppliervariableRetrieves variables set with the report-variable macro in the current context.

Usage

Typically, suppliers are used in the background by other macros. In particular, the macros in the Reporting Plugin make extensive use of them.

Generally, you can chain supplier keys together using the '>' character. For example, if the current item is a Confluence page, you can access the page creator's full name with a key chain like this:

content:creator > user:full name

Note that each key has a prefix (eg. 'content:' and 'user:') and a key value. The prefix for each supplier is listed below. In this case, the 'content:' prefix belongs to the Content Supplier. Looking on that page will reveal that the 'creator' key returns a User, which is supported by the User Supplier. And the User Supplier has a key value called 'full name' which returns the user's full name.

If you look on the description pages, you'll also note that some suppliers require the prefix and others do not. In our case, both the Content Supplier and the User Supplier do not require the prefix. So another way of stating the above key chain is like so:

creator > full name

However, note that specifying the prefix will generally be more efficient and in some cases is actually required. Also, it makes it clearer what type of value you are expecting to deal with to later editors of the page.

Providing your own Suppliers

The Supplier architecture has been designed to allow 3rd-party plugins to provide their own supplier implementations. This can be advantageous for both users and plugin developers for many reasons, including the following:

  • Teach me Once: Consistent method for accessing and displaying data across plugins.
  • Don't Reinvent the Wheel: Enables use of existing plugins (such as the Reporting Plugin and Linking Plugin) while accessing new data sources.

For more information on how to provide or make use of suppliers in your own plugin, check out the Confluence Supplier Library documentation.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.