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

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


    logger.debug("Received HTTP GET request at '{}'.", UriBuilder.fromUri(uri).build().toASCIIString());
    ModelRepository modelRepository = RESTApplication.getModelRepository();
    for(String modelName : modelRepository.getAllModelNamesOfType("sitemap")) {
      Sitemap sitemap = (Sitemap) modelRepository.getModel(modelName);
      if(sitemap!=null) {
        SitemapBean bean = new SitemapBean();
        bean.name = StringUtils.removeEnd(modelName, SITEMAP_FILEEXT);
        bean.icon = sitemap.getIcon();
        bean.label = sitemap.getLabel();
        bean.link = UriBuilder.fromUri(uri).path(bean.name).build().toASCIIString();
        bean.homepage = new PageBean();
View Full Code Here


      throw new WebApplicationException(404);
    }
  }

  private SitemapBean createSitemapBean(String sitemapName, Sitemap sitemap, URI uri) {
      SitemapBean bean = new SitemapBean();
   
      bean.name = sitemapName;
    bean.icon = sitemap.getIcon();
    bean.label = sitemap.getLabel();
View Full Code Here

TOP

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

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.