Package io.jenkins.blueocean.rest.hal
Class Links
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<String,- Link> 
Implementation of
 JSON Hypertext application language (HAL).
 
- Only _links element is implemented
- Only required href element is supported
- TODO: decide on whether application/hal+json or just use application/json
Resource implementation can add their resource specific path by calling
 add(String, Link)
 Example:
 
 
   {
       "_links":{
          "self":{"href":"http://.../pipelines/1/runs/23"},
          "test":{"href":"http://.../pipelines/1/runs/23/test"}
       }
   }
 
 - Author:
- Vivek Pandey
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> 
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.util.HashMapclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMapequals, hashCode, toString
- 
Constructor Details- 
Links
 
- 
- 
Method Details- 
add
- 
self
- 
addAdd a new link with key 'ref' and href being self.href+reflinks.add("testResult"); { "_links":[ { "self":{"href":"/organizations/jenkins/pipelines/p1/runs/2/"}, "testResult":{"href":"/organizations/jenkins/pipelines/p1/runs/2/testResult"}, } ] }- Parameters:
- ref- relative path to be added as new- Linkrelative to 'self''s href
- Returns:
- this Links instance
 
- 
ensureTrailingSlash
 
-