io.quarkus.hal.HalService 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
package io.quarkus.hal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* Service with Hal utilities. This service is used by the Resteasy Links, Resteasy Reactive Links and the
* Rest Data Panache extensions.
*/
@SuppressWarnings("unused")
public abstract class HalService {
private static final String SELF_REF = "self";
/**
* Wrap a collection of objects into a Hal collection wrapper by resolving the Hal links.
* The Hal collection wrapper is then serialized by either json or jackson.
*
* @param collection The collection of objects to wrap.
* @param collectionName The name that will include the collection of objects within the `_embedded` Hal object.
* @param entityClass The class of the objects in the collection. If null, it will not resolve the links for these objects.
* @return The Hal collection wrapper instance.
*/
public HalCollectionWrapper toHalCollectionWrapper(Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy