com.atlassian.confluence.content.render.xhtml.editor.macro
Class DefaultMacroParameterSerializer

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.editor.macro.DefaultMacroParameterSerializer
All Implemented Interfaces:
MacroParameterSerializer

public class DefaultMacroParameterSerializer
extends Object
implements MacroParameterSerializer

Serializes and deserializes macro parameters in the following format a=b|c=d. This is similar to how parameters are declared in macros in wiki markup.

This strategy is also duplicated on the client-side in the script macro-parameter-serializer.js


Constructor Summary
DefaultMacroParameterSerializer()
           
 
Method Summary
 Map<String,String> deserialize(String encodedParameters)
          Deserializes a String into a Map of parameters.
 String serialize(Map<String,String> parameters)
          Serializes a map of parameters into a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMacroParameterSerializer

public DefaultMacroParameterSerializer()
Method Detail

serialize

public String serialize(Map<String,String> parameters)
Description copied from interface: MacroParameterSerializer
Serializes a map of parameters into a String.

Specified by:
serialize in interface MacroParameterSerializer
Parameters:
parameters - Map to encode. May be null or empty.
Returns:
the encoded String.

deserialize

public Map<String,String> deserialize(String encodedParameters)
Description copied from interface: MacroParameterSerializer
Deserializes a String into a Map of parameters.

Specified by:
deserialize in interface MacroParameterSerializer
Parameters:
encodedParameters - String to decode.
Returns:
the parameters.


Copyright © 2003-2012 Atlassian. All Rights Reserved.