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

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

public class MacroFormDetails
extends java.lang.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()
           
 DocumentationLink getDocumentationLink()
           
 java.lang.String getDocumentationUrl()
          Deprecated. 
 java.lang.String getMacroName()
           
 java.lang.String getNotationHelp()
           
 java.util.List<MacroParameter> getParameters()
           
 boolean hasRequiredParameters()
           
 boolean isFreeform()
           
 boolean isShowDefaultParamInPlaceholder()
           
static MacroFormDetails makeFreeformDetails(java.lang.String macroName, java.lang.String documentationUrl, com.atlassian.plugin.elements.ResourceDescriptor notationHelpResource)
          Deprecated. since 4.0 freeform macros are no longer supported
static MacroFormDetails makeParameterFormDetails(java.lang.String macroName, java.lang.String documentationUrl, boolean showDefaultParamInPlaceholder, java.util.List<MacroParameter> parameters)
           
static MacroFormDetails makeParameterFormDetails(java.lang.String macroName, java.lang.String documentationUrl, java.util.List<MacroParameter> parameters)
          Deprecated. since 4.0 use makeParameterFormDetails(String, String, boolean, java.util.List) instead
 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)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

makeFreeformDetails

@Deprecated
public static MacroFormDetails makeFreeformDetails(java.lang.String macroName,
                                                              java.lang.String documentationUrl,
                                                              com.atlassian.plugin.elements.ResourceDescriptor notationHelpResource)
Deprecated. since 4.0 freeform macros are no longer supported


makeParameterFormDetails

@Deprecated
public static MacroFormDetails makeParameterFormDetails(java.lang.String macroName,
                                                                   java.lang.String documentationUrl,
                                                                   java.util.List<MacroParameter> parameters)
Deprecated. since 4.0 use makeParameterFormDetails(String, String, boolean, java.util.List) instead


makeParameterFormDetails

public static MacroFormDetails makeParameterFormDetails(java.lang.String macroName,
                                                        java.lang.String documentationUrl,
                                                        boolean showDefaultParamInPlaceholder,
                                                        java.util.List<MacroParameter> parameters)

getMacroName

public java.lang.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 java.lang.String getNotationHelp()
Returns:
the notation help as raw HTML. The renderForDisplay(Context) method must be called before this.

getDocumentationUrl

@Deprecated
public java.lang.String getDocumentationUrl()
Deprecated. 

deprecated since 5.5, use getDocumentationLink() instead.

Returns:
the url to the macro's documentation, if available. Otherwise, null is returned.

getDocumentationLink

public DocumentationLink getDocumentationLink()
Returns:
the url 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.

isShowDefaultParamInPlaceholder

public boolean isShowDefaultParamInPlaceholder()

getParameters

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

hasRequiredParameters

public boolean hasRequiredParameters()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.