com.atlassian.confluence.macro.browser
Class UserMacroMetadataProvider

java.lang.Object
  extended by com.atlassian.confluence.macro.browser.UserMacroMetadataProvider
All Implemented Interfaces:
MacroMetadataProvider

public class UserMacroMetadataProvider
extends java.lang.Object
implements MacroMetadataProvider

Serves metadata for user macros managed by the UserMacroLibrary.

Note: this is distinct from user macros managed by the plugin subsystem that are declared using <user-macro> in plugin descriptors.


Field Summary
static java.lang.String USER_MACRO_DUMMY_PLUGIN_KEY
           
 
Constructor Summary
UserMacroMetadataProvider()
           
 
Method Summary
 MacroMetadata getByMacroName(java.lang.String macroName)
          Returns the metadata for the named macro if it is known to this provider.
 MacroMetadata getByMacroNameAndId(java.lang.String macroName, java.lang.String alternateId)
          Returns the metadata for the named macro if it is known to this provider.
 java.util.Collection<MacroMetadata> getData()
          Returns a collection of MacroMetadata for use in the Macro Browser.
 java.util.Collection<MacroSummary> getSummaries()
          Returns a collection of MacroMetadata for use in the Macro Browser.
 void setUserMacroLibrary(UserMacroLibrary userMacroLibrary)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_MACRO_DUMMY_PLUGIN_KEY

public static final java.lang.String USER_MACRO_DUMMY_PLUGIN_KEY
See Also:
Constant Field Values
Constructor Detail

UserMacroMetadataProvider

public UserMacroMetadataProvider()
Method Detail

getData

public java.util.Collection<MacroMetadata> getData()
Description copied from interface: MacroMetadataProvider
Returns a collection of MacroMetadata for use in the Macro Browser. This collection need not necessarily be unique.

Specified by:
getData in interface MacroMetadataProvider

getSummaries

public java.util.Collection<MacroSummary> getSummaries()
Description copied from interface: MacroMetadataProvider
Returns a collection of MacroMetadata for use in the Macro Browser. This collection need not necessarily be unique. It's just the summaries.

Specified by:
getSummaries in interface MacroMetadataProvider

getByMacroName

public MacroMetadata getByMacroName(java.lang.String macroName)
Description copied from interface: MacroMetadataProvider
Returns the metadata for the named macro if it is known to this provider. Otherwise returns null.

Specified by:
getByMacroName in interface MacroMetadataProvider
Parameters:
macroName - the (simple, unfriendly) name of the macro.
Returns:
the macro's metadata or null if it is not known to this provider.

getByMacroNameAndId

public MacroMetadata getByMacroNameAndId(java.lang.String macroName,
                                         java.lang.String alternateId)
Description copied from interface: MacroMetadataProvider
Returns the metadata for the named macro if it is known to this provider. Otherwise returns null.

Specified by:
getByMacroNameAndId in interface MacroMetadataProvider
Parameters:
macroName - the (simple, unfriendly) name of the macro.
alternateId - additional identification for macros where the macroName is not sufficient. If alternateId is null, then it should be ignored.
Returns:
the macro's metadata or null if it is not known to this provider.

setUserMacroLibrary

public void setUserMacroLibrary(UserMacroLibrary userMacroLibrary)


Copyright © 2003-2014 Atlassian. All Rights Reserved.