Package org.rundeck.app.components.jobs
Class JobXMLUtil
- java.lang.Object
-
- org.rundeck.app.components.jobs.JobXMLUtil
-
public class JobXMLUtil extends java.lang.Object
Utility methods and data for use by Job XML XMAP de/serialization
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_PREFIX
Prefix for map keys which will be converted to xml attributesstatic java.lang.String
CDATA_SUFFIX
Suffix for map key of string values, to output the content as CDATA sectionstatic java.lang.String
DATAVALUE_SUFFIX
Suffix for map key of map value, to output value map in "generic data" structure, allowing automatic reversalstatic java.lang.String
PLURAL_REPL
static java.lang.String
PLURAL_SUFFIX
suffix for map keys of Collection values, to convert a collection to a plural/single* element setstatic java.lang.String
TEXT_KEY
map key for text value to output the value as element text, must be the only non-attribute map entry on output.
-
Constructor Summary
Constructors Constructor Description JobXMLUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addAttribute(java.util.Map map, java.lang.String key, java.lang.Object val)
Add entry to the map for the given key, converting the key into an attribute key identifierstatic java.lang.String
asAttributeName(java.lang.String key)
Return the key as an attribute key identifierstatic java.lang.String
asCDATAName(java.lang.String key)
Return the key name for use as a CDATA sectionstatic java.lang.String
asDataValueKey(java.lang.String key)
Return the key name for use as generic data structurestatic void
makeAttribute(java.util.Map map, java.lang.String key)
Replace the key in the map with the attribute key identifier, if the map entry exists and is not nullstatic java.util.Map
makePlural(java.util.Map map, java.lang.String key)
change the key for the map entry to the pluralized key formstatic java.lang.String
pluralize(java.lang.String key)
Return the pluralized key form of the keystatic java.util.Map
toAttrMap(java.lang.String key, java.lang.Object val)
Return a Map with an attribute key identifier created from the given key, and the given value
-
-
-
Field Detail
-
ATTR_PREFIX
public static final java.lang.String ATTR_PREFIX
Prefix for map keys which will be converted to xml attributes- See Also:
- Constant Field Values
-
PLURAL_SUFFIX
public static final java.lang.String PLURAL_SUFFIX
suffix for map keys of Collection values, to convert a collection to a plural/single* element set- See Also:
- Constant Field Values
-
PLURAL_REPL
public static final java.lang.String PLURAL_REPL
- See Also:
- Constant Field Values
-
CDATA_SUFFIX
public static final java.lang.String CDATA_SUFFIX
Suffix for map key of string values, to output the content as CDATA section- See Also:
- Constant Field Values
-
DATAVALUE_SUFFIX
public static final java.lang.String DATAVALUE_SUFFIX
Suffix for map key of map value, to output value map in "generic data" structure, allowing automatic reversal- See Also:
- Constant Field Values
-
TEXT_KEY
public static final java.lang.String TEXT_KEY
map key for text value to output the value as element text, must be the only non-attribute map entry on output.- See Also:
- Constant Field Values
-
-
Method Detail
-
addAttribute
public static void addAttribute(java.util.Map map, java.lang.String key, java.lang.Object val)
Add entry to the map for the given key, converting the key into an attribute key identifier
-
asAttributeName
public static java.lang.String asAttributeName(java.lang.String key)
Return the key as an attribute key identifier
-
makeAttribute
public static void makeAttribute(java.util.Map map, java.lang.String key)
Replace the key in the map with the attribute key identifier, if the map entry exists and is not null
-
toAttrMap
public static java.util.Map toAttrMap(java.lang.String key, java.lang.Object val)
Return a Map with an attribute key identifier created from the given key, and the given value
-
pluralize
public static java.lang.String pluralize(java.lang.String key)
Return the pluralized key form of the key
-
makePlural
public static java.util.Map makePlural(java.util.Map map, java.lang.String key)
change the key for the map entry to the pluralized key form
-
asCDATAName
public static java.lang.String asCDATAName(java.lang.String key)
Return the key name for use as a CDATA section
-
asDataValueKey
public static java.lang.String asDataValueKey(java.lang.String key)
Return the key name for use as generic data structure
-
-