Confluence Docs 3.0 : What is Bandana? One form of Confluence Persistence This page last changed on Dec 01, 2006 by jnolen. 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. Examples: 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

Document generated by Confluence on Nov 05, 2009 23:34