com.atlassian.confluence.xhtml.api
Class MacroDefinition

java.lang.Object
  extended by com.atlassian.confluence.xhtml.api.MacroDefinition

public class MacroDefinition
extends Object

An object that encapsulates the state for a macro.


Constructor Summary
MacroDefinition()
           
MacroDefinition(MacroDefinition macroDefinition)
          Copy constructor.
MacroDefinition(String name, MacroBody body, String defaultParameterValue, Map<String,String> parameters)
          Construct a macro definition.
 
Method Summary
 boolean equals(Object o)
           
 MacroBody getBody()
           
 String getBodyText()
           
 String getDefaultParameterValue()
           
 String getName()
           
 Map<String,String> getParameters()
           
 boolean hasBody()
           
 int hashCode()
           
 boolean isValid()
           
 void setBody(MacroBody body)
           
 void setDefaultParameterValue(String defaultParameterValue)
           
 void setName(String name)
           
 void setParameters(Map<String,String> parameters)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MacroDefinition

public MacroDefinition()

MacroDefinition

public MacroDefinition(MacroDefinition macroDefinition)
Copy constructor.

Parameters:
macroDefinition - copy the state of this macro definition into this new instance

MacroDefinition

public MacroDefinition(String name,
                       MacroBody body,
                       String defaultParameterValue,
                       Map<String,String> parameters)
Construct a macro definition.

Parameters:
name - the name of the macro
body - the macro body. Should be set to null if the macro does not have a body. Also see PlainTextMacroBody and RichTextMacroBody.
defaultParameterValue - the default macro parameter value. This value is not assigned an actual parameter name.
parameters - the macro parameters
Method Detail

getName

public String getName()

getDefaultParameterValue

public String getDefaultParameterValue()

getBodyText

public String getBodyText()

getBody

public MacroBody getBody()

hasBody

public boolean hasBody()

getParameters

public Map<String,String> getParameters()

setName

public void setName(String name)

setDefaultParameterValue

public void setDefaultParameterValue(String defaultParameterValue)

setBody

public void setBody(MacroBody body)

setParameters

public void setParameters(Map<String,String> parameters)

isValid

public boolean isValid()
Returns:
true if there is at least a name on this MacroDefinition.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2011 Atlassian. All Rights Reserved.