Index: core/xwiki-core/src/main/resources/META-INF/components.txt =================================================================== --- core/xwiki-core/src/main/resources/META-INF/components.txt (revision 22777) +++ core/xwiki-core/src/main/resources/META-INF/components.txt Wed Aug 19 16:49:54 CEST 2009 @@ -17,7 +17,7 @@ com.xpn.xwiki.store.XWikiHibernateRecycleBinStore com.xpn.xwiki.store.hibernate.HibernateAttachmentRecycleBinStore com.xpn.xwiki.internal.ComponentManagerBridgeEventListener -com.xpn.xwiki.internal.DefaultWikiMacroBuilder +com.xpn.xwiki.internal.DefaultWikiMacroFactory com.xpn.xwiki.internal.DefaultWikiMacroInitializer com.xpn.xwiki.internal.XWikiStubContextInitializer com.xpn.xwiki.internal.DefaultXWikiStubContextProvider Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/DefaultWikiMacro.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/DefaultWikiMacro.java (revision 22735) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/DefaultWikiMacro.java Fri Aug 21 10:41:22 CEST 2009 @@ -202,7 +202,7 @@ // it's parameters, otherwise macro will not be able to access it's parameters if the user executing the // macro does not have programming rights. DocumentAccessBridge docBridge = componentManager.lookup(DocumentAccessBridge.class); - xwikiContext.put(CONTEXT_DOCUMENT_KEY, docBridge.getDocument(macroDocument)); + xwikiContext.put(CONTEXT_DOCUMENT_KEY, docBridge.getDocument(getDocumentName())); } catch (Exception ex) { throw new MacroExecutionException("Error while preparing macro execution environment", ex); } Index: core/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java =================================================================== --- core/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java (revision 22776) +++ core/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java Wed Aug 19 17:01:53 CEST 2009 @@ -775,11 +775,12 @@ this.configuredSyntaxes = Arrays.asList(StringUtils.split(syntaxes, " ,")); // Initialize all wiki macros + // TODO: Use a component-based init mechanism instead. Note that we need the DB access to be available. try { WikiMacroInitializer wikiMacroInitializer = Utils.getComponentManager().lookup(WikiMacroInitializer.class); wikiMacroInitializer.init(); - } catch (ComponentLookupException ex) { - LOG.error("Error while initializing wiki macros", ex); + } catch (ComponentLookupException e) { + LOG.error("Error while initializing wiki macros", e); } } Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroBuilder.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroBuilder.java (revision 22052) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroFactory.java Sat Aug 15 18:16:25 CEST 2009 @@ -17,19 +17,18 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ - package org.xwiki.rendering.macro.wikibridge; import org.xwiki.component.annotation.ComponentRole; /** - * Component interface for defining wiki macro builders. + * Create a Wiki Macro object by gathering the Macro metadata from a document. * * @version $Id: WikiMacroBuilder.java 22052 2009-07-24 19:21:19Z sdumitriu $ - * @since 2.0M2 + * @since 2.0RC1 */ @ComponentRole -public interface WikiMacroBuilder +public interface WikiMacroFactory { /** * Searches the given document for a wiki macro definition. @@ -37,15 +36,15 @@ * @param documentName name of the document to search for a wiki macro definition. * @return true if the given document contains a wiki macro definition, false otherwise. */ - boolean containsMacro(String documentName); + boolean containsWikiMacro(String documentName); /** * Tries to build a {@link WikiMacro} if a definition is found on the given document. * * @param documentName name of the document on which the macro is defined. * @return a {@link WikiMacro} corresponding to the macro definition found. - * @throws WikiMacroBuilderException if no macro definition is found or if an error is encountered while building + * @throws WikiMacroException if no macro definition is found or if an error is encountered while building * the macro. */ - WikiMacro buildMacro(String documentName) throws WikiMacroBuilderException; + WikiMacro createWikiMacro(String documentName) throws WikiMacroException; } Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroParameters.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroParameters.java (revision 22052) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroParameters.java Sat Aug 15 18:16:46 CEST 2009 @@ -17,7 +17,6 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ - package org.xwiki.rendering.macro.wikibridge; import java.util.Collections; Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/DefaultWikiMacroManager.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/DefaultWikiMacroManager.java (revision 22498) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/DefaultWikiMacroManager.java Sat Aug 15 19:11:44 CEST 2009 @@ -51,19 +51,9 @@ * Map of wiki macros against document names. This is used to de-register wiki macros when corresponding documents * are deleted. */ - @SuppressWarnings("unchecked") - private Map> wikiMacroMap; + private Map> wikiMacroMap = new HashMap>(); /** - * Creates a new {@link WikiMacroEventListener} component. - */ - @SuppressWarnings("unchecked") - public DefaultWikiMacroManager() - { - wikiMacroMap = new HashMap>(); - } - - /** * {@inheritDoc} */ public boolean hasWikiMacro(String documentName) @@ -74,7 +64,6 @@ /** * {@inheritDoc} */ - @SuppressWarnings("unchecked") public void registerWikiMacro(String documentName, WikiMacro wikiMacro) { DefaultComponentDescriptor descriptor = new DefaultComponentDescriptor(); @@ -94,7 +83,6 @@ /** * {@inheritDoc} */ - @SuppressWarnings("unchecked") public void unregisterWikiMacro(String documentName) { ComponentDescriptor macroDescriptor = wikiMacroMap.get(documentName); Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/WikiMacroEventListener.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/WikiMacroEventListener.java (revision 22498) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/internal/macro/wikibridge/WikiMacroEventListener.java Sat Aug 15 18:21:54 CEST 2009 @@ -17,7 +17,6 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ - package org.xwiki.rendering.internal.macro.wikibridge; import java.util.ArrayList; @@ -37,8 +36,8 @@ import org.xwiki.observation.event.DocumentUpdateEvent; import org.xwiki.observation.event.Event; import org.xwiki.rendering.macro.wikibridge.WikiMacro; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilder; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilderException; +import org.xwiki.rendering.macro.wikibridge.WikiMacroFactory; +import org.xwiki.rendering.macro.wikibridge.WikiMacroException; import org.xwiki.rendering.macro.wikibridge.WikiMacroManager; /** @@ -64,10 +63,10 @@ private DocumentNameSerializer docNameSerializer; /** - * The {@link WikiMacroBuilder} component. + * The {@link org.xwiki.rendering.macro.wikibridge.WikiMacroFactory} component. */ @Requirement - private WikiMacroBuilder macroBuilder; + private WikiMacroFactory macroFactory; /** * The {@link WikiMacroManager} component. @@ -112,23 +111,29 @@ } // Check whether the given document has a wiki macro defined in it. - if (macroBuilder.containsMacro(fullDocumentName)) { + if (macroFactory.containsWikiMacro(fullDocumentName)) { // Make sure the wiki macro is defined on the main wiki. if (!fullDocumentName.startsWith("xwiki:")) { getLogger().error("Wiki macro registration from virtual wikis are not allowed"); return; } - // Attempt to build a wiki macro. + // Attempt to create a wiki macro. WikiMacro wikiMacro = null; try { - wikiMacro = macroBuilder.buildMacro(fullDocumentName); - } catch (WikiMacroBuilderException ex) { + wikiMacro = macroFactory.createWikiMacro(fullDocumentName); + } catch (WikiMacroException ex) { getLogger().error(ex.getMessage()); return; } // Check if the user has programming rights before continuing further. + // TODO: This is temporary and it's done to prevent users in a farm to be able to create wiki + // macros since they would be visible by all wikis in the farm. In the future this will be + // fixed when we introduce the notion of Realms in the Component Manager. When this happens + // we'll be able to register the macro so it's visible in the current user's realm only and + // offer an admin screen so that admins can promote user-visible macros to wiki-instance-visible + // macros. if (!docBridge.hasProgrammingRights()) { String errorMessage = "Unable to register macro [%s] due to insufficient privileges"; getLogger().error(String.format(errorMessage, wikiMacro.getId())); Index: core/xwiki-core/src/main/java/com/xpn/xwiki/internal/DefaultWikiMacroInitializer.java =================================================================== --- core/xwiki-core/src/main/java/com/xpn/xwiki/internal/DefaultWikiMacroInitializer.java (revision 22052) +++ core/xwiki-core/src/main/java/com/xpn/xwiki/internal/DefaultWikiMacroInitializer.java Sat Aug 15 18:25:23 CEST 2009 @@ -30,8 +30,8 @@ import org.xwiki.context.Execution; import org.xwiki.rendering.macro.wikibridge.WikiMacroInitializer; import org.xwiki.rendering.macro.wikibridge.WikiMacro; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilder; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilderException; +import org.xwiki.rendering.macro.wikibridge.WikiMacroFactory; +import org.xwiki.rendering.macro.wikibridge.WikiMacroException; import org.xwiki.rendering.macro.wikibridge.WikiMacroManager; import com.xpn.xwiki.XWikiContext; @@ -52,10 +52,10 @@ private static final String MAIN_WIKI = "xwiki"; /** - * The {@link WikiMacroBuilder} component. + * The {@link org.xwiki.rendering.macro.wikibridge.WikiMacroFactory} component. */ @Requirement - private WikiMacroBuilder wikiMacroBuilder; + private WikiMacroFactory wikiMacroFactory; /** * The {@link WikiMacroManager} component. @@ -90,6 +90,7 @@ xcontext.setDatabase(MAIN_WIKI); // Search for all those documents with macro definitions. + // TODO: Use the query manager instead String sql = "select doc.fullName from XWikiDocument doc, BaseObject obj where doc.fullName=obj.name and obj.className=?"; List wikiMacroDocs = null; @@ -106,9 +107,9 @@ for (Object obj : wikiMacroDocs) { String wikiMacroDoc = (String) obj; try { - WikiMacro macro = wikiMacroBuilder.buildMacro(wikiMacroDoc); + WikiMacro macro = wikiMacroFactory.createWikiMacro(wikiMacroDoc); wikiMacros.put(wikiMacroDoc, macro); - } catch (WikiMacroBuilderException ex) { + } catch (WikiMacroException ex) { // Just log the exception and skip to the next. getLogger().error(ex.getMessage(), ex); } @@ -116,6 +117,8 @@ // Register the wiki macros against WikiMacroManager. for (String documentName : wikiMacros.keySet()) { + // TODO: Fix this to allow macros to be registered for any wiki + // TODO: In addition the main wiki name should never be hardcoded!! wikiMacroManager.registerWikiMacro(MAIN_WIKI + ":" + documentName, wikiMacros.get(documentName)); } } Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroManager.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroManager.java (revision 22052) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroManager.java Sat Aug 15 18:14:46 CEST 2009 @@ -34,7 +34,7 @@ * Registers the given {@link WikiMacro} against ComponentManager and keeps a reference to it for future reference. * * @param documentName name of the document which contains the wiki macro. - * @param wikiMacro the {@link WikiMacro} instance. + * @param wikiMacro the {@link org.xwiki.rendering.macro.wikibridge.WikiMacro} instance. */ void registerWikiMacro(String documentName, WikiMacro wikiMacro); Index: core/xwiki-core/src/test/java/com/xpn/xwiki/internal/DefaultWikiMacroBuilderTest.java =================================================================== --- core/xwiki-core/src/test/java/com/xpn/xwiki/internal/DefaultWikiMacroBuilderTest.java (revision 22526) +++ core/xwiki-core/src/test/java/com/xpn/xwiki/internal/DefaultWikiMacroBuilderTest.java Wed Aug 19 17:12:59 CEST 2009 @@ -22,15 +22,14 @@ import org.jmock.Mock; import org.xwiki.rendering.macro.wikibridge.WikiMacro; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilder; - +import org.xwiki.rendering.macro.wikibridge.WikiMacroFactory; import com.xpn.xwiki.XWiki; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.objects.BaseObject; import com.xpn.xwiki.test.AbstractBridgedXWikiComponentTestCase; /** - * Unit test for {@link DefaultWikiMacroBuilder}. + * Unit test for {@link DefaultWikiMacroFactory}. * * @since 2.0M3 * @version $Id: DefaultWikiMacroBuilderTest.java 22526 2009-08-11 18:58:51Z sdumitriu $ @@ -41,13 +40,13 @@ private Mock mockXWiki; - private WikiMacroBuilder wikiMacroBuilder; + private WikiMacroFactory wikiMacroFactory; - + @Override protected void setUp() throws Exception { super.setUp(); - this.wikiMacroBuilder = getComponentManager().lookup(WikiMacroBuilder.class); + this.wikiMacroFactory = getComponentManager().lookup(WikiMacroFactory.class); // Build the macro definition document. BaseObject obj = new BaseObject(); @@ -73,11 +72,10 @@ public void testWikiMacroBuilding() throws Exception { // Build a wiki macro. - WikiMacro macro = this.wikiMacroBuilder.buildMacro("xwiki:Macros.Test"); + WikiMacro macro = this.wikiMacroFactory.createWikiMacro("xwiki:Macros.Test"); assertNotNull(macro); // Check if the macro was built correctly. - assertEquals("xwiki:Macros.Test", macro.getDocumentName()); assertEquals("testmacro", macro.getId()); assertEquals("Test Macro", macro.getDescriptor().getName()); assertEquals("This is a macro used for testing purposes.", macro.getDescriptor().getDescription()); Index: core/xwiki-core/src/main/java/com/xpn/xwiki/internal/DefaultWikiMacroBuilder.java =================================================================== --- core/xwiki-core/src/main/java/com/xpn/xwiki/internal/DefaultWikiMacroBuilder.java (revision 22498) +++ core/xwiki-core/src/main/java/com/xpn/xwiki/internal/DefaultWikiMacroFactory.java Sat Aug 15 18:00:33 CEST 2009 @@ -36,24 +36,23 @@ import org.xwiki.rendering.macro.descriptor.DefaultContentDescriptor; import org.xwiki.rendering.macro.descriptor.MacroDescriptor; import org.xwiki.rendering.macro.wikibridge.WikiMacro; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilder; -import org.xwiki.rendering.macro.wikibridge.WikiMacroBuilderException; +import org.xwiki.rendering.macro.wikibridge.WikiMacroFactory; +import org.xwiki.rendering.macro.wikibridge.WikiMacroException; import org.xwiki.rendering.macro.wikibridge.WikiMacroDescriptor; import org.xwiki.rendering.macro.wikibridge.WikiMacroParameterDescriptor; - import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.objects.BaseObject; /** - * The default implementation of {@link WikiMacroBuilder}. + * The default implementation of {@link org.xwiki.rendering.macro.wikibridge.WikiMacroFactory}. * * @version $Id: DefaultWikiMacroBuilder.java 22498 2009-08-11 09:14:17Z asiri $ * @since 2.0M2 */ @Component -public class DefaultWikiMacroBuilder extends AbstractLogEnabled implements WikiMacroBuilder +public class DefaultWikiMacroFactory extends AbstractLogEnabled implements WikiMacroFactory { /** * Constant for representing XWiki.WikiMacroClass xwiki class. @@ -166,13 +165,13 @@ /** * {@inheritDoc} */ - public WikiMacro buildMacro(String documentName) throws WikiMacroBuilderException + public WikiMacro createWikiMacro(String documentName) throws WikiMacroException { XWikiDocument doc = null; try { doc = getContext().getWiki().getDocument(documentName, getContext()); } catch (XWikiException ex) { - throw new WikiMacroBuilderException(String.format( + throw new WikiMacroException(String.format( "Could not build macro from : [%s], unable to load document", documentName), ex); } return buildMacro(doc); @@ -183,16 +182,16 @@ * * @param doc the {@link XWikiDocument} to look for a macro definition. * @return a {@link WikiMacro} found inside the document. - * @throws WikiMacroBuilderException invalid macro definition / no macro definition found. + * @throws org.xwiki.rendering.macro.wikibridge.WikiMacroException invalid macro definition / no macro definition found. */ - private WikiMacro buildMacro(XWikiDocument doc) throws WikiMacroBuilderException + private WikiMacro buildMacro(XWikiDocument doc) throws WikiMacroException { String fullDocumentName = docNameSerializer.serialize(doc.getDocumentName()); // Check whether this document contains a macro definition. BaseObject macroDefinition = doc.getObject(WIKI_MACRO_CLASS); if (null == macroDefinition) { - throw new WikiMacroBuilderException(String.format("No macro definition found in document : [%s]", + throw new WikiMacroException(String.format("No macro definition found in document : [%s]", fullDocumentName)); } @@ -208,13 +207,13 @@ // Verify macro id. if (StringUtils.isEmpty(macroId)) { - throw new WikiMacroBuilderException(String.format( + throw new WikiMacroException(String.format( "Incomplete macro definition in [%s], macro id is empty", fullDocumentName)); } // Verify macro name. if (StringUtils.isEmpty(macroName)) { - throw new WikiMacroBuilderException(String.format( + throw new WikiMacroException(String.format( "Incomplete macro definition in [%s], macro name is empty", fullDocumentName)); } @@ -247,7 +246,7 @@ // Verify macro code. if (StringUtils.isEmpty(macroCode)) { - throw new WikiMacroBuilderException(String.format( + throw new WikiMacroException(String.format( "Incomplete macro definition in [%s], macro code is empty", fullDocumentName)); } @@ -269,7 +268,7 @@ // Verify parameter name. if (StringUtils.isEmpty(parameterName)) { - throw new WikiMacroBuilderException(String.format( + throw new WikiMacroException(String.format( "Incomplete macro definition in [%s], macro parameter name is empty", fullDocumentName)); } @@ -304,7 +303,7 @@ /** * {@inheritDoc} */ - public boolean containsMacro(String documentName) + public boolean containsWikiMacro(String documentName) { boolean result = true; try { Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacro.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacro.java (revision 22498) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacro.java Sat Aug 15 19:16:39 CEST 2009 @@ -17,7 +17,6 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ - package org.xwiki.rendering.macro.wikibridge; import org.xwiki.rendering.macro.Macro; @@ -31,16 +30,7 @@ public interface WikiMacro extends Macro { /** - * Returns the id under which this macro is registered with component manager. - * - * @return name of this wiki macro. + * @return the id under which this macro is registered with the component manager */ String getId(); - - /** - * Returns the name of the document which contains the definition of this {@link WikiMacro}. - * - * @return - */ - String getDocumentName(); } Index: core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroBuilderException.java =================================================================== --- core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroBuilderException.java (revision 22052) +++ core/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-wikibridge/src/main/java/org/xwiki/rendering/macro/wikibridge/WikiMacroException.java Sat Aug 15 18:16:29 CEST 2009 @@ -17,16 +17,15 @@ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ - package org.xwiki.rendering.macro.wikibridge; /** - * Exception class used by the {@link WikiMacroBuilder} to indicate exceptional conditions. + * Indicate a problem when using the Wiki Macro API. * * @version $Id: WikiMacroBuilderException.java 22052 2009-07-24 19:21:19Z sdumitriu $ - * @since 2.0M2 + * @since 2.0RC1 */ -public class WikiMacroBuilderException extends Exception +public class WikiMacroException extends Exception { /** * Class version. @@ -34,22 +33,22 @@ private static final long serialVersionUID = 8573258491423031831L; /** - * Builds a new {@link WikiMacroBuilderException} with the given error message. + * Builds a new {@link WikiMacroException} with the given error message. * * @param message error messge. */ - public WikiMacroBuilderException(String message) + public WikiMacroException(String message) { super(message); } /** - * Builds a new {@link WikiMacroBuilderException} with the given error message and cause. + * Builds a new {@link WikiMacroException} with the given error message and cause. * * @param message error message. * @param cause cause of error. */ - public WikiMacroBuilderException(String message, Throwable cause) + public WikiMacroException(String message, Throwable cause) { super(message, cause); }