Class DefaultMacroParameterSerializer
- java.lang.Object
-
- 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
Constructors Constructor Description DefaultMacroParameterSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 interfaceMacroParameterSerializer
- 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 interfaceMacroParameterSerializer
- Parameters:
encodedParameters
- String to decode.- Returns:
- the parameters.
-
-