org.xwiki.rendering.macro
Interface MacroCategoryManager


@Role
public interface MacroCategoryManager

Component interface for managing macro category information. Each rendering macro defines a default category under which it falls, but this category may be overwritten by xwiki configuration mechanism. This component will handle such overwriting operations and make sure latest macro category information is presented to client code.

Since:
2.0M3
Version:
$Id: 9196696801c1dcde7fd79a7b3ac3d8be23239316 $

Method Summary
 Set<String> getMacroCategories()
          Returns all the macro categories currently available in the system.
 Set<String> getMacroCategories(Syntax syntax)
          Returns all the macro categories currently available in the system for macros registered for a given syntax and for all syntaxes.
 Set<MacroId> getMacroIds(String category)
           
 Set<MacroId> getMacroIds(String category, Syntax syntax)
           
 

Method Detail

getMacroCategories

Set<String> getMacroCategories()
                               throws MacroLookupException
Returns all the macro categories currently available in the system. Macros that don't have default or overridden categories are not included and thus clients should be aware that there can be macros in the system which do not belong to any category.

Returns:
the macro categories available in the system.
Throws:
MacroLookupException - error when looking up macros

getMacroCategories

Set<String> getMacroCategories(Syntax syntax)
                               throws MacroLookupException
Returns all the macro categories currently available in the system for macros registered for a given syntax and for all syntaxes. Macros that don't have default or overridden categories are not included and thus clients should be aware that there can be macros in the system which do not belong to any category.

Parameters:
syntax - the syntax to filter the macros by syntax.
Returns:
the macro categories available for the given syntax
Throws:
MacroLookupException - error when looking up macros

getMacroIds

Set<MacroId> getMacroIds(String category)
                         throws MacroLookupException
Parameters:
category - name of the category or null.
Returns:
ids of all the macros belonging to the given category or if the category parameter is null, ids of all the macros which do not belong to any category.
Throws:
MacroLookupException - error when lookup macros

getMacroIds

Set<MacroId> getMacroIds(String category,
                         Syntax syntax)
                         throws MacroLookupException
Parameters:
category - name of the category or null.
syntax - the syntax to filter the macros by syntax.
Returns:
ids of all the macros belonging to the given category (and registered for the given syntax) or if the category parameter is null, ids of all the macros which do not belong to any category (and registered for the given syntax).
Throws:
MacroLookupException - error when lookup macros


Copyright © 2004-2012 XWiki. All Rights Reserved.