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

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


    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 ItemListBean(getItemBeans()), callback) : new ItemListBean(getItemBeans());
        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.ItemListBean

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.