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

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


                });
          }
        }
        // remove the widgets
        if (originalMessage instanceof PageBean){
          PageBean originalBean = (PageBean) message ;
              PageBean responseBeam = new PageBean();
              responseBeam.icon = originalBean.icon;
              responseBeam.id = originalBean.id;
              responseBeam.link = originalBean.link;
              responseBeam.parent = originalBean.parent;
              responseBeam.title = originalBean.title;
View Full Code Here


  private static final Logger logger = LoggerFactory.getLogger(SitemapStateChangeListener.class);
 
  @Override
  protected Object getResponseObject(HttpServletRequest request) {
    PageBean pageBean = getPageBean(request);
    if(pageBean!=null) {
      return pageBean;
      }
    return null;
  }
View Full Code Here

    return null;
  }
   
  @Override
  protected Object getSingleResponseObject(Item item, HttpServletRequest request) {
    PageBean pageBean = getPageBean(request);
    WidgetListBean responseBeam ;
    if(pageBean!=null) {
      responseBeam = new WidgetListBean( getItemsOnPage(pageBean.widgets, item));
      return responseBeam;
       
View Full Code Here

        return createPageBean(sitemapName, sitemap.getLabel(), sitemap.getIcon(), sitemap.getName(), sitemap.getChildren(), false, isLeaf(sitemap.getChildren()), uri);
      } else {
        Widget pageWidget = itemUIRegistry.getWidget(sitemap, pageId);
        if(pageWidget instanceof LinkableWidget) {
          EList<Widget> children = itemUIRegistry.getChildren((LinkableWidget) pageWidget);
          PageBean pageBean = createPageBean(sitemapName, itemUIRegistry.getLabel(pageWidget), itemUIRegistry.getIcon(pageWidget),
              pageId, children, false, isLeaf(children), uri);
          EObject parentPage = pageWidget.eContainer();
          while(parentPage instanceof Frame) {
            parentPage = parentPage.eContainer();
          }
View Full Code Here

        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();
        bean.homepage.link = bean.link + "/" + sitemap.getName();
        beans.add(bean);
      }
    }
    return beans;
View Full Code Here

      bean.homepage = createPageBean(sitemap.getName(), sitemap.getLabel(), sitemap.getIcon(), sitemap.getName(), sitemap.getChildren(), true, false, uri);
      return bean;
    }
   
    static private PageBean createPageBean(String sitemapName, String title, String icon, String pageId, EList<Widget> children, boolean drillDown, boolean isLeaf, URI uri) {
      PageBean bean = new PageBean();
      bean.id = pageId;
      bean.title = title;
      bean.icon = icon;
    bean.leaf = isLeaf;
      bean.link = UriBuilder.fromUri(uri).path(PATH_SITEMAPS).path(sitemapName).path(pageId).build().toASCIIString();
View Full Code Here

TOP

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

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.