Package org.cedj.geekseek.web.rest.core

Examples of org.cedj.geekseek.web.rest.core.Resource


    @Inject
    private Instance<Resource> resources;

    @Override
    public void appendLinks(LinkableRepresentation<?> representation) {
        Resource source = getResource(representation);
        if(source == null) {
            return;
        }

        if(representation instanceof Identifiable) {
View Full Code Here


    private UriInfo uriInfo;

    @GET
    @Path("/{type}/{id}")
    public Response get(@PathParam("type") String type, @PathParam("id") String id) {
        Resource resource = locateResource(type);
        if(resource == null) {
            return Response.status(404).build();
        }

        URI uri = uriInfo.getBaseUriBuilder()
                .path(resource.getResourceClass())
                .path(id)
                .build();
        return Response.temporaryRedirect(uri).build();
    }
View Full Code Here

TOP

Related Classes of org.cedj.geekseek.web.rest.core.Resource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.