All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.links.LinksProvider Maven / Gradle / Ivy

The newest version!
package org.jboss.resteasy.links;

import jakarta.ws.rs.core.UriInfo;

import org.jboss.resteasy.core.ResourceMethodRegistry;
import org.jboss.resteasy.core.ResteasyContext;
import org.jboss.resteasy.links.impl.ClassLinksProvider;
import org.jboss.resteasy.links.impl.ObjectLinksProvider;
import org.jboss.resteasy.spi.Registry;

public interface LinksProvider {

    static LinksProvider> getClassLinksProvider() {
        return new ClassLinksProvider(ResteasyContext.getContextData(UriInfo.class),
                (ResourceMethodRegistry) ResteasyContext.getContextData(Registry.class));
    }

    static LinksProvider getObjectLinksProvider() {
        return new ObjectLinksProvider(ResteasyContext.getContextData(UriInfo.class),
                (ResourceMethodRegistry) ResteasyContext.getContextData(Registry.class));
    }

    RESTServiceDiscovery getLinks(T object);

    RESTServiceDiscovery getLinks(T object, ClassLoader classLoader);
}