com.atlassian.confluence.macro.browser.beans
Class MacroFormDetails

java.lang.Object
  extended by com.atlassian.confluence.macro.browser.beans.MacroFormDetails

public class MacroFormDetails
extends Object

A Bean that encapsulates the detailed metadata of a macro. This includes the macro parameter information, documentation links and notation help guide contents.


Method Summary
 MacroBody getBody()
           
 String getDocumentationUrl()
           
 String getMacroName()
           
 String getNotationHelp()
           
 List<MacroParameter> getParameters()
           
 boolean isFreeform()
           
static MacroFormDetails makeFreeformDetails(String macroName, String documentationUrl, com.atlassian.plugin.elements.ResourceDescriptor notationHelpResource)
           
static MacroFormDetails makeParameterFormDetails(String macroName, String documentationUrl, List<MacroParameter> parameters)
           
 void renderForDisplay(org.apache.velocity.context.Context context)
          This method should be called to render macro details before passing to the front end for display.
 void setBody(MacroBody body)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

makeFreeformDetails

public static MacroFormDetails makeFreeformDetails(String macroName,
                                                   String documentationUrl,
                                                   com.atlassian.plugin.elements.ResourceDescriptor notationHelpResource)

makeParameterFormDetails

public static MacroFormDetails makeParameterFormDetails(String macroName,
                                                        String documentationUrl,
                                                        List<MacroParameter> parameters)

getMacroName

public String getMacroName()

renderForDisplay

public void renderForDisplay(org.apache.velocity.context.Context context)
This method should be called to render macro details before passing to the front end for display.

Parameters:
context - the velocity context to render with

getNotationHelp

public String getNotationHelp()
Returns:
the notation help as raw HTML. The renderForDisplay(Context) method must be called before this.

getDocumentationUrl

public String getDocumentationUrl()
Returns:
the url string to the macro's documentation, if available. Otherwise, null is returned.

setBody

public void setBody(MacroBody body)

getBody

public MacroBody getBody()
Returns:
true if the macro implementation of hasBody() returns true.
See Also:
MacroMetadata.isBodyDeprecated()

isFreeform

public boolean isFreeform()
Returns:
true if the macro parameter information is not available.

getParameters

public List<MacroParameter> getParameters()
Returns:
a list of macro paramaters.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2011 Atlassian. All Rights Reserved.