Package org.openhab.io.rest.internal.resources.beans

Examples of org.openhab.io.rest.internal.resources.beans.SitemapListBean


        @QueryParam("jsoncallback") @DefaultValue("callback") String callback) {
    logger.debug("Received HTTP GET request at '{}' for media type '{}'.", new String[] { uriInfo.getPath(), type });
    String responseType = MediaTypeHelper.getResponseMediaType(headers.getAcceptableMediaTypes(), type);
    if(responseType!=null) {
        Object responseObject = responseType.equals(MediaTypeHelper.APPLICATION_X_JAVASCRIPT) ?
            new JSONWithPadding(new SitemapListBean(getSitemapBeans(uriInfo.getAbsolutePathBuilder().build())), callback) : new SitemapListBean(getSitemapBeans(uriInfo.getAbsolutePathBuilder().build()));
        return Response.ok(responseObject, responseType).build();
    } else {
      return Response.notAcceptable(null).build();
    }
    }
View Full Code Here

TOP

Related Classes of org.openhab.io.rest.internal.resources.beans.SitemapListBean

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.