Package be.personify.iam.api.util
Class LinkUtil
- java.lang.Object
-
- be.personify.iam.api.util.LinkUtil
-
public class LinkUtil extends Object
Utility class for links- Author:
- vanderw
-
-
Constructor Summary
Constructors Constructor Description LinkUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<org.springframework.hateoas.Link>filterSelf(List<org.springframework.hateoas.Link> links)Filters self from the linksstatic org.springframework.hateoas.LinkgetSelf(List<org.springframework.hateoas.Link> links)Gets the self linkstatic org.springframework.hateoas.LinkgetSelf(org.springframework.hateoas.EntityModel<?> model)Gets the selfstatic StringgetSelfHref(org.springframework.hateoas.EntityModel<?> model)static List<org.springframework.hateoas.Link>removeLink(List<org.springframework.hateoas.Link> links, String name)static StringremoveProjectionReference(String href)Removes the projection reference fron the href ( {?projection}
-
-
-
Field Detail
-
LINK_REL
public static final String LINK_REL
- See Also:
- Constant Field Values
-
LINK_HREF
public static final String LINK_HREF
- See Also:
- Constant Field Values
-
-
Method Detail
-
filterSelf
public static List<org.springframework.hateoas.Link> filterSelf(List<org.springframework.hateoas.Link> links)
Filters self from the links- Parameters:
links- a list of the links- Returns:
- a list of filtered links
-
removeLink
public static List<org.springframework.hateoas.Link> removeLink(List<org.springframework.hateoas.Link> links, String name)
-
getSelf
public static org.springframework.hateoas.Link getSelf(List<org.springframework.hateoas.Link> links)
Gets the self link- Parameters:
links- a list of links- Returns:
- the link containing the self
-
getSelf
public static org.springframework.hateoas.Link getSelf(org.springframework.hateoas.EntityModel<?> model)
Gets the self- Parameters:
model- the entitymodel- Returns:
- the Link identifying the self
-
getSelfHref
public static String getSelfHref(org.springframework.hateoas.EntityModel<?> model)
-
-