com.atlassian.jira.plugin.viewissue.issuelink
Class GlobalIdFactory

java.lang.Object
  extended by com.atlassian.jira.plugin.viewissue.issuelink.GlobalIdFactory

public class GlobalIdFactory
extends Object

Factory for encoding and decoding globalIds.

Since:
v5.0

Constructor Summary
GlobalIdFactory()
           
 
Method Summary
static Map<String,String> decode(String globalId, List<String> keys)
          Decode the given String to a Map of values.
static String encode(List<String> keys, Map<String,String> values)
          Encode the given Map of values to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalIdFactory

public GlobalIdFactory()
Method Detail

encode

public static String encode(List<String> keys,
                            Map<String,String> values)
Encode the given Map of values to a String.

Parameters:
keys - the order in which the keys will be appended to the result
values - the values to encode as a String
Returns:
a String

decode

public static Map<String,String> decode(String globalId,
                                        List<String> keys)
Decode the given String to a Map of values.

Parameters:
globalId - the String to decode
keys - the order in which the keys should appear. If the keys are not in this order an IllegalArgumentException is thrown.
Returns:
a Map of values


Copyright © 2002-2014 Atlassian. All Rights Reserved.