com.atlassian.mywork.util
Class GlobalIdFactory
java.lang.Object
com.atlassian.mywork.util.GlobalIdFactory
public class GlobalIdFactory
- extends java.lang.Object
Factory for encoding and decoding globalIds.
|
Method Summary |
static java.util.Map<java.lang.String,java.lang.String> |
decode(java.lang.String globalId,
java.util.List<java.lang.String> keys)
Decode the given String to a Map of values. |
static java.lang.String |
encode(java.util.List<java.lang.String> keys,
java.util.Map<java.lang.String,java.lang.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 |
GlobalIdFactory
public GlobalIdFactory()
encode
public static java.lang.String encode(java.util.List<java.lang.String> keys,
java.util.Map<java.lang.String,java.lang.String> values)
- Encode the given Map of values to a String.
- Parameters:
keys - the order in which the keys will be appended to the resultvalues - the values to encode as a String
- Returns:
- a String
decode
public static java.util.Map<java.lang.String,java.lang.String> decode(java.lang.String globalId,
java.util.List<java.lang.String> keys)
- Decode the given String to a Map of values.
- Parameters:
globalId - the String to decodekeys - 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 © 2012 Atlassian. All Rights Reserved.