Last updated Jul 8, 2024

What is Bandana? One form of Confluence persistence

Bandana is Atlassian's hierarchical data storage mechanism, it breaks objects into XML and stores them, to be retrieved later... uses xstream and a little hierarchical magic under the covers and has another strange Atlassian codename. It is one way to persist data inside your plugin. It is good for global config types of data.

It uses XStream to serialize Java strings (and objects?) to and from XML.


The BandanaManager can be acquired via Confluence's (Spring's) dependency injection.

Data in this case is written to: confluence-data-dir/config/confluence-global.bandana.xml

Writing data:

bandanaManager.setValue(new ConfluenceBandanaContext(), GmapsManager.GOOGLE_MAPS_API_KEY, updateApiKey);

Retrieving data:

public String getGoogleApiKey()
        return (String) bandanaManager.getValue(new ConfluenceBandanaContext(), GmapsManager.GOOGLE_MAPS_API_KEY);

See also: Persistence in Confluence

Rate this page: