Class HalRelation


  • public class HalRelation
    extends java.lang.Object
    Author:
    Daniel Meyer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String relName
      the name of the relation
      protected java.lang.Class<?> resourceType
      the type of the resource we build a relation to.
      protected javax.ws.rs.core.UriBuilder uriTemplate
      the url template used by the relation to construct links
    • Constructor Summary

      Constructors 
      Constructor Description
      HalRelation()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static HalRelation build​(java.lang.String relName, java.lang.Class<?> resourceType, javax.ws.rs.core.UriBuilder urlTemplate)
      Build a relation to a resource.
      java.lang.String getRelName()  
      java.lang.Class<?> getResourceType()  
      javax.ws.rs.core.UriBuilder getUriTemplate()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • relName

        protected java.lang.String relName
        the name of the relation
      • uriTemplate

        protected javax.ws.rs.core.UriBuilder uriTemplate
        the url template used by the relation to construct links
      • resourceType

        protected java.lang.Class<?> resourceType
        the type of the resource we build a relation to.
    • Constructor Detail

      • HalRelation

        public HalRelation()
    • Method Detail

      • build

        public static HalRelation build​(java.lang.String relName,
                                        java.lang.Class<?> resourceType,
                                        javax.ws.rs.core.UriBuilder urlTemplate)
        Build a relation to a resource.
        Parameters:
        relName - the name of the relation.
        resourceType - the type of the resource
        Returns:
        the relation
      • getRelName

        public java.lang.String getRelName()
      • getUriTemplate

        public javax.ws.rs.core.UriBuilder getUriTemplate()
      • getResourceType

        public java.lang.Class<?> getResourceType()