Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra improvements #240

Merged
merged 5 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bom/openhab-ui/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 3 additions & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 3 additions & 1 deletion bundles/org.openhab.ui.basic/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ public void stop(BundleContext bc) throws Exception {
public static BundleContext getContext() {
return context;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.openhab.core.i18n.LocaleProvider;
import org.openhab.core.i18n.TranslationProvider;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.types.State;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.State;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.WebAppActivator;
import org.openhab.ui.basic.internal.WebAppConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.openhab.core.library.types.HSBType;
import org.openhab.core.types.State;
import org.openhab.core.model.sitemap.sitemap.Colorpicker;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.State;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.internal.servlet.WebAppServlet;
import org.openhab.ui.basic.render.RenderException;
Expand Down Expand Up @@ -119,5 +119,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import org.eclipse.emf.common.util.EList;
import org.openhab.core.library.types.RawType;
import org.openhab.core.library.types.StringType;
import org.openhab.core.types.State;
import org.openhab.core.model.sitemap.sitemap.Image;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.State;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;
Expand Down Expand Up @@ -116,5 +116,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.openhab.core.library.types.PointType;
import org.openhab.core.types.State;
import org.openhab.core.model.sitemap.sitemap.Mapview;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.State;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;
Expand Down Expand Up @@ -105,5 +105,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
import org.openhab.core.items.ItemNotFoundException;
import org.openhab.core.library.items.NumberItem;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.model.sitemap.sitemap.Mapping;
import org.openhab.core.model.sitemap.sitemap.Selection;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.CommandDescription;
import org.openhab.core.types.CommandOption;
import org.openhab.core.types.State;
import org.openhab.core.types.util.UnitUtils;
import org.openhab.core.model.sitemap.sitemap.Mapping;
import org.openhab.core.model.sitemap.sitemap.Selection;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;
Expand Down Expand Up @@ -165,5 +165,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.types.State;
import org.openhab.core.model.sitemap.sitemap.Setpoint;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.State;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;
Expand Down Expand Up @@ -125,5 +125,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
import org.openhab.core.library.items.SwitchItem;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.model.sitemap.sitemap.Mapping;
import org.openhab.core.model.sitemap.sitemap.Switch;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.CommandDescription;
import org.openhab.core.types.CommandOption;
import org.openhab.core.types.State;
import org.openhab.core.types.util.UnitUtils;
import org.openhab.core.model.sitemap.sitemap.Mapping;
import org.openhab.core.model.sitemap.sitemap.Switch;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;
Expand Down Expand Up @@ -196,5 +196,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.EList;
import org.openhab.core.library.types.StringType;
import org.openhab.core.types.State;
import org.openhab.core.model.sitemap.sitemap.Video;
import org.openhab.core.model.sitemap.sitemap.Widget;
import org.openhab.core.types.State;
import org.openhab.core.ui.items.ItemUIRegistry;
import org.openhab.ui.basic.render.RenderException;
import org.openhab.ui.basic.render.WidgetRenderer;
Expand Down Expand Up @@ -118,5 +118,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
super.unsetItemUIRegistry(ItemUIRegistry);
}

}
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
/**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.ui.basic.internal.servlet;

import org.openhab.core.items.ItemRegistry;
import org.openhab.core.io.http.servlet.SmartHomeBundleServlet;

/**
* This is the base servlet class for other servlet in the Basic UI.
*
* @author Thomas.Eichstaedt-Engelen
*/
public abstract class BaseServlet extends SmartHomeBundleServlet {

private static final long serialVersionUID = -4012800772403491132L;

/** the root path of this web application */
public static final String WEBAPP_ALIAS = "/basicui";

protected ItemRegistry itemRegistry;

public void setItemRegistry(ItemRegistry itemRegistry) {
this.itemRegistry = itemRegistry;
}

public void unsetItemRegistry(ItemRegistry itemRegistry) {
this.itemRegistry = null;
}

}
/**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.ui.basic.internal.servlet;

import org.openhab.core.io.http.servlet.SmartHomeBundleServlet;
import org.openhab.core.items.ItemRegistry;

/**
* This is the base servlet class for other servlet in the Basic UI.
*
* @author Thomas.Eichstaedt-Engelen
*/
public abstract class BaseServlet extends SmartHomeBundleServlet {

private static final long serialVersionUID = -4012800772403491132L;

/** the root path of this web application */
public static final String WEBAPP_ALIAS = "/basicui";

protected ItemRegistry itemRegistry;

public void setItemRegistry(ItemRegistry itemRegistry) {
this.itemRegistry = itemRegistry;
}

public void unsetItemRegistry(ItemRegistry itemRegistry) {
this.itemRegistry = null;
}
}
Loading