public class UserMacroLibrary extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A library of user defined macros, stored in and retrieved from Bandana on request.
Note that since Confluence 4.0 this UserMacroLibrary is now aware of when user macros have been hidden by an identically named macro from a plugin (even a user macro from a plugin). So the existing methods on the library will now only return macros that are not hidden.
Modifier and Type | Field and Description |
---|---|
static String |
LIBRARY_KEY |
Constructor and Description |
---|
UserMacroLibrary(com.atlassian.bandana.BandanaManager bandanaManager,
com.atlassian.event.api.EventPublisher eventPublisher,
TenantRegistry tenantRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
addUpdateMacro(UserMacroConfig userMacroConfig) |
void |
afterPropertiesSet() |
void |
destroy() |
UserMacroConfig |
getMacro(String name) |
SortedSet<String> |
getMacroNames() |
Map<String,UserMacroConfig> |
getMacros() |
boolean |
hasMacro(String name) |
void |
pluginMacroRegistered(PluginMacroRegisteredEvent event) |
void |
pluginMacroUnregistered(PluginMacroUnregisteredEvent event) |
void |
removeMacro(String name) |
public static final String LIBRARY_KEY
public UserMacroLibrary(com.atlassian.bandana.BandanaManager bandanaManager, com.atlassian.event.api.EventPublisher eventPublisher, TenantRegistry tenantRegistry)
public void addUpdateMacro(UserMacroConfig userMacroConfig)
public boolean hasMacro(String name)
public UserMacroConfig getMacro(String name)
public void removeMacro(String name)
public SortedSet<String> getMacroNames()
public Map<String,UserMacroConfig> getMacros()
@EventListener public void pluginMacroRegistered(PluginMacroRegisteredEvent event)
@EventListener public void pluginMacroUnregistered(PluginMacroUnregisteredEvent event)
public void destroy() throws Exception
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
Copyright © 2003–2015 Atlassian. All rights reserved.