Dashboard > Atlassian Plugins > Home > Suppliers
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  Suppliers

Added by admin , last edited by David Peterson on Jul 17, 2008  (view change)
Labels: 
(None)

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.
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.
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.
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.
News SuppliernewsSupplies information about news items (a.k.a blog posts) in Confluence.
Number SuppliernumberProvides information about numbers.
Page SupplierpageSupplies information about Confluence pages.
Reference SupplierreferenceProvides information about references, which are the data type used by Scaffolding lists.
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.
Salesforce.com SuppliersalesforceProvides access to Salesforce.com account information.
Scaffold Data SupplierdataProvides access to data set using Scaffolding Data macros.
Space SupplierspaceThis supplier provides key values for Confluence Spaces.
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.

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.

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators