Class Links

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Link>

public final class Links extends HashMap<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
Any Resource implementation can add their resource specific path by calling add(String, Link) Example:

Vivek Pandey
See Also:
  • Constructor Details

  • Method Details

    • add

      public Links add(String ref, Link link)
    • self

      public Link self()
    • add

      public Links add(String ref)
      Add a new link with key 'ref' and href being self.href+ref
      ref - relative path to be added as new Link relative to 'self''s href
      this Links instance
    • ensureTrailingSlash

      public static String ensureTrailingSlash(String path)