io.quarkus.hal.HalWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-hal Show documentation
Show all versions of quarkus-hal Show documentation
Hypertext Application Language (HAL) support
The newest version!
package io.quarkus.hal;
import java.util.Map;
import jakarta.ws.rs.core.Link;
public abstract class HalWrapper {
private final Map links;
public HalWrapper(Map links) {
this.links = links;
}
public Map getLinks() {
return links;
}
/**
* This method is used by Rest Data Panache to programmatically add links to the Hal wrapper.
*
* @param links The links to add into the Hal wrapper.
*/
@SuppressWarnings("unused")
public void addLinks(Link... links) {
for (Link link : links) {
this.links.put(link.getRel(), new HalLink(link.getUri().toString(),
link.getTitle(),
link.getType()));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy