|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.internal.macro.wikibridge.DefaultWikiMacroManager
@Component public class DefaultWikiMacroManager
Default implementation of WikiMacroManager.
| Constructor Summary | |
|---|---|
DefaultWikiMacroManager()
|
|
| Method Summary | |
|---|---|
boolean |
hasWikiMacro(DocumentReference documentReference)
Utility method for querying WikiMacroManager to see if there is a WikiMacro already registered
for the given document. |
void |
registerWikiMacro(DocumentReference documentReference,
WikiMacro wikiMacro)
Registers the given WikiMacro against the ComponentManager matching the Wiki Macro visibility defined
(Current User, Current Wiki, Global). |
void |
unregisterWikiMacro(DocumentReference documentReference)
Unregisters the wiki macro defined on the given document (if there is one). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultWikiMacroManager()
| Method Detail |
|---|
public boolean hasWikiMacro(DocumentReference documentReference)
WikiMacroManager to see if there is a WikiMacro already registered
for the given document.
hasWikiMacro in interface WikiMacroManagerdocumentReference - the name of the document which contains the wiki macro
WikiMacroManager.hasWikiMacro(org.xwiki.model.reference.DocumentReference)
public void registerWikiMacro(DocumentReference documentReference,
WikiMacro wikiMacro)
throws InsufficientPrivilegesException,
WikiMacroException
WikiMacro against the ComponentManager matching the Wiki Macro visibility defined
(Current User, Current Wiki, Global). For example Macros defined with a "Current User" visibility are
registered against the User Component Manager so that they are only visible from that Component Manager and not
from other Component Manager.
Note that the Execution Context must be set properly (the current user or the current wiki must be set) prior
to calling this API.
registerWikiMacro in interface WikiMacroManagerdocumentReference - the name of the document which contains the wiki macrowikiMacro - the WikiMacro instance
InsufficientPrivilegesException - if asked visibility is not allowed
WikiMacroException - if a problem happened when registering the macro (document doesn't exist, etc.)WikiMacroManager.registerWikiMacro(org.xwiki.model.reference.DocumentReference , WikiMacro)
public void unregisterWikiMacro(DocumentReference documentReference)
throws WikiMacroException
unregisterWikiMacro in interface WikiMacroManagerdocumentReference - the name of the document which contains the wiki macro
WikiMacroException - if a problem happened when registering the macro (document doesn't exist, etc)WikiMacroManager.unregisterWikiMacro(org.xwiki.model.reference.DocumentReference)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||