Update sitemap model imports (#138)

Signed-off-by: Wouter Born <github@maindrain.net>
pull/139/head
Wouter Born 2019-11-07 17:22:10 +01:00 committed by Kai Kreuzer
parent bd9b5db691
commit c101937616
39 changed files with 118 additions and 117 deletions

View File

@ -29,7 +29,7 @@ import org.eclipse.smarthome.core.i18n.LocaleProvider;
import org.eclipse.smarthome.core.i18n.TranslationProvider; import org.eclipse.smarthome.core.i18n.TranslationProvider;
import org.eclipse.smarthome.core.library.types.QuantityType; import org.eclipse.smarthome.core.library.types.QuantityType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppActivator; import org.openhab.ui.basic.internal.WebAppActivator;
import org.openhab.ui.basic.internal.WebAppConfig; import org.openhab.ui.basic.internal.WebAppConfig;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.items.GroupItem; import org.eclipse.smarthome.core.items.GroupItem;
import org.eclipse.smarthome.core.items.Item; import org.eclipse.smarthome.core.items.Item;
import org.eclipse.smarthome.core.items.ItemNotFoundException; import org.eclipse.smarthome.core.items.ItemNotFoundException;
import org.eclipse.smarthome.model.sitemap.Chart; import org.eclipse.smarthome.model.sitemap.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppConfig; import org.openhab.ui.basic.internal.WebAppConfig;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.HSBType; import org.eclipse.smarthome.core.library.types.HSBType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Colorpicker; import org.eclipse.smarthome.model.sitemap.sitemap.Colorpicker;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.servlet.WebAppServlet; import org.openhab.ui.basic.internal.servlet.WebAppServlet;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;

View File

@ -18,8 +18,8 @@ import java.util.List;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Frame; import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Group; import org.eclipse.smarthome.model.sitemap.sitemap.Group;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.RawType; import org.eclipse.smarthome.core.library.types.RawType;
import org.eclipse.smarthome.core.library.types.StringType; import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Image; import org.eclipse.smarthome.model.sitemap.sitemap.Image;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.List; import org.eclipse.smarthome.model.sitemap.sitemap.List;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.PointType; import org.eclipse.smarthome.core.library.types.PointType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Mapview; import org.eclipse.smarthome.model.sitemap.sitemap.Mapview;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -22,10 +22,10 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.smarthome.core.i18n.LocaleProvider; import org.eclipse.smarthome.core.i18n.LocaleProvider;
import org.eclipse.smarthome.core.i18n.TranslationProvider; import org.eclipse.smarthome.core.i18n.TranslationProvider;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider; import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppConfig; import org.openhab.ui.basic.internal.WebAppConfig;
import org.openhab.ui.basic.internal.servlet.WebAppServlet; import org.openhab.ui.basic.internal.servlet.WebAppServlet;
@ -136,7 +136,7 @@ public class PageRenderer extends AbstractWidgetRenderer {
EObject firstChild = children.get(0); EObject firstChild = children.get(0);
EObject parent = itemUIRegistry.getParent((Widget) firstChild); EObject parent = itemUIRegistry.getParent((Widget) firstChild);
if (!(firstChild instanceof Frame || parent instanceof Frame || parent instanceof Sitemap if (!(firstChild instanceof Frame || parent instanceof Frame || parent instanceof Sitemap
|| parent instanceof org.eclipse.smarthome.model.sitemap.List)) { || parent instanceof org.eclipse.smarthome.model.sitemap.sitemap.List)) {
String frameSnippet = getSnippet("frame"); String frameSnippet = getSnippet("frame");
frameSnippet = StringUtils.replace(frameSnippet, "%widget_id%", ""); frameSnippet = StringUtils.replace(frameSnippet, "%widget_id%", "");
frameSnippet = StringUtils.replace(frameSnippet, "%label%", ""); frameSnippet = StringUtils.replace(frameSnippet, "%label%", "");

View File

@ -23,9 +23,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription; import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption; import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils; import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping; import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Selection; import org.eclipse.smarthome.model.sitemap.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -18,8 +18,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.DecimalType; import org.eclipse.smarthome.core.library.types.DecimalType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Setpoint; import org.eclipse.smarthome.model.sitemap.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Slider; import org.eclipse.smarthome.model.sitemap.sitemap.Slider;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -26,9 +26,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription; import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption; import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils; import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping; import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Switch; import org.eclipse.smarthome.model.sitemap.sitemap.Switch;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Text; import org.eclipse.smarthome.model.sitemap.sitemap.Text;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -18,8 +18,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.StringType; import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Video; import org.eclipse.smarthome.model.sitemap.sitemap.Video;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.basic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Webview; import org.eclipse.smarthome.model.sitemap.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer; import org.openhab.ui.basic.render.WidgetRenderer;

View File

@ -29,10 +29,10 @@ import org.eclipse.smarthome.config.core.ConfigurableService;
import org.eclipse.smarthome.core.items.ItemRegistry; import org.eclipse.smarthome.core.items.ItemRegistry;
import org.eclipse.smarthome.io.http.HttpContextFactoryService; import org.eclipse.smarthome.io.http.HttpContextFactoryService;
import org.eclipse.smarthome.io.rest.sitemap.SitemapSubscriptionService; import org.eclipse.smarthome.io.rest.sitemap.SitemapSubscriptionService;
import org.eclipse.smarthome.model.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider; import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.basic.internal.WebAppConfig; import org.openhab.ui.basic.internal.WebAppConfig;
import org.openhab.ui.basic.internal.render.PageRenderer; import org.openhab.ui.basic.internal.render.PageRenderer;
import org.openhab.ui.basic.render.RenderException; import org.openhab.ui.basic.render.RenderException;

View File

@ -13,7 +13,7 @@
package org.openhab.ui.basic.render; package org.openhab.ui.basic.render;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.basic.internal.WebAppConfig; import org.openhab.ui.basic.internal.WebAppConfig;
/** /**

View File

@ -30,7 +30,7 @@ import org.eclipse.smarthome.core.library.types.DecimalType;
import org.eclipse.smarthome.core.library.types.PercentType; import org.eclipse.smarthome.core.library.types.PercentType;
import org.eclipse.smarthome.core.library.types.QuantityType; import org.eclipse.smarthome.core.library.types.QuantityType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.WebAppActivator; import org.openhab.ui.classic.internal.WebAppActivator;
import org.openhab.ui.classic.internal.WebAppConfig; import org.openhab.ui.classic.internal.WebAppConfig;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.items.GroupItem; import org.eclipse.smarthome.core.items.GroupItem;
import org.eclipse.smarthome.core.items.Item; import org.eclipse.smarthome.core.items.Item;
import org.eclipse.smarthome.core.items.ItemNotFoundException; import org.eclipse.smarthome.core.items.ItemNotFoundException;
import org.eclipse.smarthome.model.sitemap.Chart; import org.eclipse.smarthome.model.sitemap.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.HSBType; import org.eclipse.smarthome.core.library.types.HSBType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Colorpicker; import org.eclipse.smarthome.model.sitemap.sitemap.Colorpicker;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet; import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;

View File

@ -15,8 +15,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Frame; import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Group; import org.eclipse.smarthome.model.sitemap.sitemap.Group;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.RawType; import org.eclipse.smarthome.core.library.types.RawType;
import org.eclipse.smarthome.core.library.types.StringType; import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Image; import org.eclipse.smarthome.model.sitemap.sitemap.Image;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -15,8 +15,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.List; import org.eclipse.smarthome.model.sitemap.sitemap.List;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.PointType; import org.eclipse.smarthome.core.library.types.PointType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Mapview; import org.eclipse.smarthome.model.sitemap.sitemap.Mapview;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -19,8 +19,8 @@ import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.smarthome.model.sitemap.Frame; import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.WebAppConfig; import org.openhab.ui.classic.internal.WebAppConfig;
import org.openhab.ui.classic.internal.servlet.WebAppServlet; import org.openhab.ui.classic.internal.servlet.WebAppServlet;

View File

@ -23,9 +23,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription; import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption; import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils; import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping; import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Selection; import org.eclipse.smarthome.model.sitemap.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -19,8 +19,8 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.DecimalType; import org.eclipse.smarthome.core.library.types.DecimalType;
import org.eclipse.smarthome.core.library.types.QuantityType; import org.eclipse.smarthome.core.library.types.QuantityType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Setpoint; import org.eclipse.smarthome.model.sitemap.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet; import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Slider; import org.eclipse.smarthome.model.sitemap.sitemap.Slider;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet; import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;

View File

@ -27,9 +27,9 @@ import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.core.types.StateDescription; import org.eclipse.smarthome.core.types.StateDescription;
import org.eclipse.smarthome.core.types.StateOption; import org.eclipse.smarthome.core.types.StateOption;
import org.eclipse.smarthome.core.types.util.UnitUtils; import org.eclipse.smarthome.core.types.util.UnitUtils;
import org.eclipse.smarthome.model.sitemap.Mapping; import org.eclipse.smarthome.model.sitemap.sitemap.Mapping;
import org.eclipse.smarthome.model.sitemap.Switch; import org.eclipse.smarthome.model.sitemap.sitemap.Switch;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.openhab.ui.classic.internal.servlet.WebAppServlet; import org.openhab.ui.classic.internal.servlet.WebAppServlet;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Text; import org.eclipse.smarthome.model.sitemap.sitemap.Text;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -16,8 +16,8 @@ import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.core.library.types.StringType; import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.model.sitemap.Video; import org.eclipse.smarthome.model.sitemap.sitemap.Video;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -14,8 +14,8 @@ package org.openhab.ui.classic.internal.render;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Webview; import org.eclipse.smarthome.model.sitemap.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.items.ItemUIRegistry; import org.eclipse.smarthome.ui.items.ItemUIRegistry;
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.Reference;

View File

@ -13,7 +13,7 @@
package org.openhab.ui.classic.internal.render; package org.openhab.ui.classic.internal.render;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.classic.internal.WebAppConfig; import org.openhab.ui.classic.internal.WebAppConfig;
/** /**

View File

@ -35,13 +35,13 @@ import org.eclipse.smarthome.core.items.ItemRegistry;
import org.eclipse.smarthome.core.items.StateChangeListener; import org.eclipse.smarthome.core.items.StateChangeListener;
import org.eclipse.smarthome.core.types.State; import org.eclipse.smarthome.core.types.State;
import org.eclipse.smarthome.io.http.HttpContextFactoryService; import org.eclipse.smarthome.io.http.HttpContextFactoryService;
import org.eclipse.smarthome.model.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider; import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.VisibilityRule; import org.eclipse.smarthome.model.sitemap.sitemap.Chart;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Frame;
import org.eclipse.smarthome.model.sitemap.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.sitemap.VisibilityRule;
import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.classic.internal.WebAppConfig; import org.openhab.ui.classic.internal.WebAppConfig;
import org.openhab.ui.classic.internal.render.PageRenderer; import org.openhab.ui.classic.internal.render.PageRenderer;
import org.openhab.ui.classic.internal.render.RenderException; import org.openhab.ui.classic.internal.render.RenderException;

View File

@ -34,7 +34,7 @@ import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.library.types.UpDownType; import org.eclipse.smarthome.core.library.types.UpDownType;
import org.eclipse.smarthome.core.types.Command; import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.core.types.TypeParser; import org.eclipse.smarthome.core.types.TypeParser;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.eclipse.smarthome.ui.icon.IconProvider; import org.eclipse.smarthome.ui.icon.IconProvider;
import org.eclipse.smarthome.ui.icon.IconSet.Format; import org.eclipse.smarthome.ui.icon.IconSet.Format;
import org.openhab.ui.cometvisu.internal.Config; import org.openhab.ui.cometvisu.internal.Config;
@ -441,7 +441,8 @@ public class ConfigHelper {
return null; return null;
} }
public Mapping createMapping(String name, EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping) { public Mapping createMapping(String name,
EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping) {
Mapping mapping = null; Mapping mapping = null;
if (mappings.containsKey(name)) { if (mappings.containsKey(name)) {
mapping = mappings.get(name); mapping = mappings.get(name);
@ -450,7 +451,7 @@ public class ConfigHelper {
mapping = new Mapping(); mapping = new Mapping();
mapping.setName(name); mapping.setName(name);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Entry entry = new Entry(); Entry entry = new Entry();
entry.setValue(map.getCmd()); entry.setValue(map.getCmd());
entry.getContent().add(map.getLabel()); entry.getContent().add(map.getLabel());
@ -519,7 +520,7 @@ public class ConfigHelper {
} }
public void mapToTriggers(Object element, Item item, Widget widget) { public void mapToTriggers(Object element, Item item, Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping = getMapping(widget); EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping = getMapping(widget);
int groupColumns = 6; int groupColumns = 6;
@ -546,7 +547,7 @@ public class ConfigHelper {
states.add(UpDownType.class); states.add(UpDownType.class);
states.add(StringType.class); states.add(StringType.class);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Command command = TypeParser.parseCommand(states, map.getCmd()); Command command = TypeParser.parseCommand(states, map.getCmd());
if (!(command instanceof DecimalType)) { if (!(command instanceof DecimalType)) {
// no number command // no number command
@ -560,7 +561,7 @@ public class ConfigHelper {
Mapping mapping = createMapping(mappingName, sitemapMapping); Mapping mapping = createMapping(mappingName, sitemapMapping);
addToMappings(mapping); addToMappings(mapping);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Trigger trigger = new Trigger(); Trigger trigger = new Trigger();
trigger.setValue(map.getCmd()); trigger.setValue(map.getCmd());
@ -581,7 +582,7 @@ public class ConfigHelper {
* @param widget * @param widget
*/ */
public void mapToMultiTrigger(Object element, Item item, Widget widget) { public void mapToMultiTrigger(Object element, Item item, Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping = getMapping(widget); EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping = getMapping(widget);
Transform transform = Transform.NUMBER; Transform transform = Transform.NUMBER;
@ -592,7 +593,7 @@ public class ConfigHelper {
states.add(UpDownType.class); states.add(UpDownType.class);
states.add(StringType.class); states.add(StringType.class);
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
Command command = TypeParser.parseCommand(states, map.getCmd()); Command command = TypeParser.parseCommand(states, map.getCmd());
if (!(command instanceof DecimalType)) { if (!(command instanceof DecimalType)) {
// no number command // no number command
@ -610,7 +611,7 @@ public class ConfigHelper {
mtrigger.setLayout(createLayout(6)); mtrigger.setLayout(createLayout(6));
int i = 1; int i = 1;
for (org.eclipse.smarthome.model.sitemap.Mapping map : sitemapMapping) { for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : sitemapMapping) {
switch (i) { switch (i) {
case 1: case 1:
mtrigger.setButton1Label(map.getLabel()); mtrigger.setButton1Label(map.getLabel());
@ -635,11 +636,11 @@ public class ConfigHelper {
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private EList<org.eclipse.smarthome.model.sitemap.Mapping> getMapping(Widget widget) { private EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> getMapping(Widget widget) {
EList<org.eclipse.smarthome.model.sitemap.Mapping> mapping = null; EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> mapping = null;
try { try {
Method getter = widget.getClass().getMethod("getMappings"); Method getter = widget.getClass().getMethod("getMappings");
mapping = (EList<org.eclipse.smarthome.model.sitemap.Mapping>) getter.invoke(widget); mapping = (EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping>) getter.invoke(widget);
} catch (NoSuchMethodException | SecurityException e) { } catch (NoSuchMethodException | SecurityException e) {
// do nothing, normal behaviour for item that have no mappingdefined // do nothing, normal behaviour for item that have no mappingdefined
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
@ -654,7 +655,7 @@ public class ConfigHelper {
public Mapping addMapping(Object element, Widget widget) { public Mapping addMapping(Object element, Widget widget) {
Mapping mapping = null; Mapping mapping = null;
EList<org.eclipse.smarthome.model.sitemap.Mapping> smap = getMapping(widget); EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> smap = getMapping(widget);
if (smap != null && smap.size() > 0) { if (smap != null && smap.size() > 0) {
mapping = addMapping(element, String.valueOf(smap.hashCode()), smap); mapping = addMapping(element, String.valueOf(smap.hashCode()), smap);
} }
@ -663,7 +664,7 @@ public class ConfigHelper {
} }
public Mapping addMapping(Object element, String name, public Mapping addMapping(Object element, String name,
EList<org.eclipse.smarthome.model.sitemap.Mapping> sitemapMapping) { EList<org.eclipse.smarthome.model.sitemap.sitemap.Mapping> sitemapMapping) {
Mapping mapping = createMapping(name, sitemapMapping); Mapping mapping = createMapping(name, sitemapMapping);
addMapping(element, mapping); addMapping(element, mapping);
return mapping; return mapping;
@ -831,7 +832,7 @@ public class ConfigHelper {
* the page for wich the pagejump should be created * the page for wich the pagejump should be created
* @param widget * @param widget
*/ */
public void addToNavbar(Page barPage, Page targetPage, org.eclipse.smarthome.model.sitemap.Group widget, public void addToNavbar(Page barPage, Page targetPage, org.eclipse.smarthome.model.sitemap.sitemap.Group widget,
NavbarPositionType position, Item item) { NavbarPositionType position, Item item) {
Pagejump pagejump = new Pagejump(); Pagejump pagejump = new Pagejump();
pagejump.setBindClickToWidget(true); pagejump.setBindClickToWidget(true);

View File

@ -33,12 +33,12 @@ import org.eclipse.smarthome.core.library.items.ContactItem;
import org.eclipse.smarthome.core.library.items.DateTimeItem; import org.eclipse.smarthome.core.library.items.DateTimeItem;
import org.eclipse.smarthome.core.library.items.NumberItem; import org.eclipse.smarthome.core.library.items.NumberItem;
import org.eclipse.smarthome.core.library.items.RollershutterItem; import org.eclipse.smarthome.core.library.items.RollershutterItem;
import org.eclipse.smarthome.model.sitemap.LinkableWidget; import org.eclipse.smarthome.model.sitemap.sitemap.LinkableWidget;
import org.eclipse.smarthome.model.sitemap.Selection; import org.eclipse.smarthome.model.sitemap.sitemap.Selection;
import org.eclipse.smarthome.model.sitemap.Setpoint; import org.eclipse.smarthome.model.sitemap.sitemap.Setpoint;
import org.eclipse.smarthome.model.sitemap.Sitemap; import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.Webview; import org.eclipse.smarthome.model.sitemap.sitemap.Webview;
import org.eclipse.smarthome.model.sitemap.Widget; import org.eclipse.smarthome.model.sitemap.sitemap.Widget;
import org.openhab.ui.cometvisu.internal.Config; import org.openhab.ui.cometvisu.internal.Config;
import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform; import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform;
import org.openhab.ui.cometvisu.internal.config.beans.Address; import org.openhab.ui.cometvisu.internal.config.beans.Address;
@ -208,7 +208,7 @@ public class VisuConfig {
EList<Widget> children = app.getItemUIRegistry().getChildren((LinkableWidget) widget); EList<Widget> children = app.getItemUIRegistry().getChildren((LinkableWidget) widget);
if (children.size() == 0) { if (children.size() == 0) {
processItemWidget(rootPage, widget, item, pages, level); processItemWidget(rootPage, widget, item, pages, level);
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Frame) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Frame) {
Group group = new Group(); Group group = new Group();
group.setLayout(configHelper.createLayout(6)); group.setLayout(configHelper.createLayout(6));
group.setName(configHelper.getLabel(widget)); group.setName(configHelper.getLabel(widget));
@ -220,8 +220,8 @@ public class VisuConfig {
Page page = new Page(); Page page = new Page();
page.setName(configHelper.getLabel(widget)); page.setName(configHelper.getLabel(widget));
configHelper.addToRoot(rootPage, factory.createPagePage(page)); configHelper.addToRoot(rootPage, factory.createPagePage(page));
if (widget instanceof org.eclipse.smarthome.model.sitemap.Group) { if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Group) {
org.eclipse.smarthome.model.sitemap.Group group = (org.eclipse.smarthome.model.sitemap.Group) widget; org.eclipse.smarthome.model.sitemap.sitemap.Group group = (org.eclipse.smarthome.model.sitemap.sitemap.Group) widget;
// add Group item to the Navbar // add Group item to the Navbar
// logger.debug("page '{}' on level {}",page.getName(),level); // logger.debug("page '{}' on level {}",page.getName(),level);
NavbarPositionType position = (level <= 1) ? NavbarPositionType.TOP : NavbarPositionType.LEFT; NavbarPositionType position = (level <= 1) ? NavbarPositionType.TOP : NavbarPositionType.LEFT;
@ -247,8 +247,8 @@ public class VisuConfig {
} }
private void processItemWidget(Object rootPage, Widget widget, Item item, Pages pages, int level) { private void processItemWidget(Object rootPage, Widget widget, Item item, Pages pages, int level) {
if (widget instanceof org.eclipse.smarthome.model.sitemap.Switch) { if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Switch) {
org.eclipse.smarthome.model.sitemap.Switch switchWidget = (org.eclipse.smarthome.model.sitemap.Switch) widget; org.eclipse.smarthome.model.sitemap.sitemap.Switch switchWidget = (org.eclipse.smarthome.model.sitemap.sitemap.Switch) widget;
if (item instanceof RollershutterItem) { if (item instanceof RollershutterItem) {
// in the demo-sitemap a rullershutter item is defined as // in the demo-sitemap a rullershutter item is defined as
@ -272,7 +272,7 @@ public class VisuConfig {
configHelper.addStyling(switchBean, widget); configHelper.addStyling(switchBean, widget);
configHelper.addToRoot(rootPage, factory.createPageSwitch(switchBean)); configHelper.addToRoot(rootPage, factory.createPageSwitch(switchBean));
} }
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Text) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Text) {
Info info = new Info(); Info info = new Info();
Transform transform = Transform.STRING; Transform transform = Transform.STRING;
boolean skipFormat = false; boolean skipFormat = false;
@ -304,7 +304,7 @@ public class VisuConfig {
configHelper.addToRoot(rootPage, factory.createPageText(text)); configHelper.addToRoot(rootPage, factory.createPageText(text));
} }
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Slider) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Slider) {
Slide bean = new Slide(); Slide bean = new Slide();
bean.setFormat("%d%%"); bean.setFormat("%d%%");
configHelper.addAddress(bean, item, Transform.DIMMER); configHelper.addAddress(bean, item, Transform.DIMMER);
@ -334,7 +334,7 @@ public class VisuConfig {
Mapping mapping = configHelper.createMapping(mappingName, selection.getMappings()); Mapping mapping = configHelper.createMapping(mappingName, selection.getMappings());
configHelper.addToMappings(mapping); configHelper.addToMappings(mapping);
for (org.eclipse.smarthome.model.sitemap.Mapping map : selection.getMappings()) { for (org.eclipse.smarthome.model.sitemap.sitemap.Mapping map : selection.getMappings()) {
Trigger trigger = new Trigger(); Trigger trigger = new Trigger();
trigger.setValue(map.getCmd()); trigger.setValue(map.getCmd());
trigger.setMapping(mappingName); trigger.setMapping(mappingName);
@ -356,8 +356,8 @@ public class VisuConfig {
configHelper.addLabel(bean, widget); configHelper.addLabel(bean, widget);
configHelper.addToRoot(rootPage, factory.createPageWeb(bean)); configHelper.addToRoot(rootPage, factory.createPageWeb(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Image) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Image) {
org.eclipse.smarthome.model.sitemap.Image image = (org.eclipse.smarthome.model.sitemap.Image) widget; org.eclipse.smarthome.model.sitemap.sitemap.Image image = (org.eclipse.smarthome.model.sitemap.sitemap.Image) widget;
Image bean = new Image(); Image bean = new Image();
bean.setSrc(image.getUrl()); bean.setSrc(image.getUrl());
bean.setRefresh(new BigDecimal(image.getRefresh())); bean.setRefresh(new BigDecimal(image.getRefresh()));
@ -365,19 +365,19 @@ public class VisuConfig {
configHelper.addLabel(bean, widget); configHelper.addLabel(bean, widget);
configHelper.addToRoot(rootPage, factory.createPageImage(bean)); configHelper.addToRoot(rootPage, factory.createPageImage(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Video) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Video) {
org.eclipse.smarthome.model.sitemap.Video video = (org.eclipse.smarthome.model.sitemap.Video) widget; org.eclipse.smarthome.model.sitemap.sitemap.Video video = (org.eclipse.smarthome.model.sitemap.sitemap.Video) widget;
Video bean = new Video(); Video bean = new Video();
bean.setSrc(video.getUrl()); bean.setSrc(video.getUrl());
configHelper.addLabel(bean, widget); configHelper.addLabel(bean, widget);
configHelper.addToRoot(rootPage, factory.createPageVideo(bean)); configHelper.addToRoot(rootPage, factory.createPageVideo(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Chart && item != null) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Chart && item != null) {
Plugin plugin = new Plugin(); Plugin plugin = new Plugin();
plugin.setName("diagram"); plugin.setName("diagram");
configHelper.addPlugin(plugin); configHelper.addPlugin(plugin);
org.eclipse.smarthome.model.sitemap.Chart chart = (org.eclipse.smarthome.model.sitemap.Chart) widget; org.eclipse.smarthome.model.sitemap.sitemap.Chart chart = (org.eclipse.smarthome.model.sitemap.sitemap.Chart) widget;
Diagram bean = new Diagram(); Diagram bean = new Diagram();
bean.setSeries(configHelper.getCvChartPeriod(chart.getPeriod())); bean.setSeries(configHelper.getCvChartPeriod(chart.getPeriod()));
bean.setRefresh(new BigInteger(String.valueOf(chart.getRefresh()))); bean.setRefresh(new BigInteger(String.valueOf(chart.getRefresh())));
@ -406,7 +406,7 @@ public class VisuConfig {
} }
configHelper.addToRoot(rootPage, factory.createPageDiagram(bean)); configHelper.addToRoot(rootPage, factory.createPageDiagram(bean));
} else if (widget instanceof org.eclipse.smarthome.model.sitemap.Colorpicker) { } else if (widget instanceof org.eclipse.smarthome.model.sitemap.sitemap.Colorpicker) {
Plugin plugin = new Plugin(); Plugin plugin = new Plugin();
plugin.setName("colorchooser"); plugin.setName("colorchooser");
configHelper.addPlugin(plugin); configHelper.addPlugin(plugin);

View File

@ -68,8 +68,8 @@ import org.eclipse.smarthome.core.persistence.FilterCriteria.Ordering;
import org.eclipse.smarthome.core.persistence.HistoricItem; import org.eclipse.smarthome.core.persistence.HistoricItem;
import org.eclipse.smarthome.core.persistence.QueryablePersistenceService; import org.eclipse.smarthome.core.persistence.QueryablePersistenceService;
import org.eclipse.smarthome.core.types.Command; import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.model.sitemap.Sitemap;
import org.eclipse.smarthome.model.sitemap.SitemapProvider; import org.eclipse.smarthome.model.sitemap.SitemapProvider;
import org.eclipse.smarthome.model.sitemap.sitemap.Sitemap;
import org.openhab.ui.cometvisu.internal.Config; import org.openhab.ui.cometvisu.internal.Config;
import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform; import org.openhab.ui.cometvisu.internal.config.ConfigHelper.Transform;
import org.openhab.ui.cometvisu.internal.config.VisuConfig; import org.openhab.ui.cometvisu.internal.config.VisuConfig;