#567 - Add extra attributes to Link and use for HAL mediatype.
Adds many additional attributes defined in RFC5988 and verifies they work properly in the neutral representation of Link while also being rendered properly in the HAL module. Related tickets: #100, #417, #235 Previous pull requests: #240, #238, #223, #79
This commit is contained in:
committed by
Oliver Gierke
parent
af3ec1a242
commit
891fd90f5a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,13 +28,46 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
*
|
||||
* @author Alexander Baetz
|
||||
* @author Oliver Gierke
|
||||
* @author Greg Turnquist
|
||||
*/
|
||||
@JsonIgnoreProperties(value = "rel")
|
||||
@JsonIgnoreProperties({"rel", "media"})
|
||||
abstract class LinkMixin extends Link {
|
||||
|
||||
private static final long serialVersionUID = 4720588561299667409L;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.Link#getHreflang()
|
||||
*/
|
||||
@Override
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
public abstract String getHreflang();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.Link#getTitle()
|
||||
*/
|
||||
@Override
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
public abstract String getTitle();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.Link#getType()
|
||||
*/
|
||||
@Override
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
public abstract String getType();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.Link#getDeprecation()
|
||||
*/
|
||||
@Override
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
public abstract String getDeprecation();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.hateoas.Link#isTemplate()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user