Typically, suppliers are used in the background by other macros. In particular, the macros in Reporting for Confluence make extensive use of them. Suppliers allow you to retrieve values about various objects by using a "
For example, on any given page, you can do this using the Report Info macro:
This uses the Page Supplier and grabs the
title parameter, which returns the name of the current page. However, you can then use that value to return something else.
For example, if you wanted to know the number of characters in the page title, you can do this:
Note that each key has a
text:) and a
key value (
In this case, the
page: prefix belongs to the Page Supplier. A quick look at the Page Supplier documentation will reveal that the
title key returns a
text value, which is supported by the Text Supplier. And the Text Supplier has a key value called
length which returns the number of characters in the
This can be done indefinitely, chaining one value to the next. If a null or blank value is returned at any point in the chain, the chain breaks and a blank value is returned.