Skip to content

Commit 937cf24

Browse files
authored
Infra improvements (openhab#240)
* Update to SAT 0.10.0 * Add sortpom-maven-plugin configuration * Sort POMs * Add spotless-maven-plugin configuration * Apply Spotless changes Signed-off-by: Wouter Born <[email protected]>
1 parent 5f72e38 commit 937cf24

File tree

85 files changed

+1014
-937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1014
-937
lines changed

bom/openhab-ui/pom.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?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">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24

35
<modelVersion>4.0.0</modelVersion>
46

bom/pom.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?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">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24

35
<modelVersion>4.0.0</modelVersion>
46

bundles/org.openhab.ui.basic/pom.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?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">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24

35
<modelVersion>4.0.0</modelVersion>
46

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/WebAppActivator.java

-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@ public void stop(BundleContext bc) throws Exception {
4343
public static BundleContext getContext() {
4444
return context;
4545
}
46-
4746
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/AbstractWidgetRenderer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import org.openhab.core.i18n.LocaleProvider;
2929
import org.openhab.core.i18n.TranslationProvider;
3030
import org.openhab.core.library.types.QuantityType;
31-
import org.openhab.core.types.State;
3231
import org.openhab.core.model.sitemap.sitemap.Widget;
32+
import org.openhab.core.types.State;
3333
import org.openhab.core.ui.items.ItemUIRegistry;
3434
import org.openhab.ui.basic.internal.WebAppActivator;
3535
import org.openhab.ui.basic.internal.WebAppConfig;

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ChartRenderer.java

-1
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
146146
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
147147
super.unsetItemUIRegistry(ItemUIRegistry);
148148
}
149-
150149
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ColorpickerRenderer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import org.apache.commons.lang.StringUtils;
1616
import org.eclipse.emf.common.util.EList;
1717
import org.openhab.core.library.types.HSBType;
18-
import org.openhab.core.types.State;
1918
import org.openhab.core.model.sitemap.sitemap.Colorpicker;
2019
import org.openhab.core.model.sitemap.sitemap.Widget;
20+
import org.openhab.core.types.State;
2121
import org.openhab.core.ui.items.ItemUIRegistry;
2222
import org.openhab.ui.basic.internal.servlet.WebAppServlet;
2323
import org.openhab.ui.basic.render.RenderException;
@@ -119,5 +119,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
119119
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
120120
super.unsetItemUIRegistry(ItemUIRegistry);
121121
}
122-
123122
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/FrameRenderer.java

-1
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
9494
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
9595
super.unsetItemUIRegistry(ItemUIRegistry);
9696
}
97-
9897
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ImageRenderer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
import org.eclipse.emf.common.util.EList;
1919
import org.openhab.core.library.types.RawType;
2020
import org.openhab.core.library.types.StringType;
21-
import org.openhab.core.types.State;
2221
import org.openhab.core.model.sitemap.sitemap.Image;
2322
import org.openhab.core.model.sitemap.sitemap.Widget;
23+
import org.openhab.core.types.State;
2424
import org.openhab.core.ui.items.ItemUIRegistry;
2525
import org.openhab.ui.basic.render.RenderException;
2626
import org.openhab.ui.basic.render.WidgetRenderer;
@@ -116,5 +116,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
116116
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
117117
super.unsetItemUIRegistry(ItemUIRegistry);
118118
}
119-
120119
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/MapviewRenderer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import org.apache.commons.lang.StringUtils;
1616
import org.eclipse.emf.common.util.EList;
1717
import org.openhab.core.library.types.PointType;
18-
import org.openhab.core.types.State;
1918
import org.openhab.core.model.sitemap.sitemap.Mapview;
2019
import org.openhab.core.model.sitemap.sitemap.Widget;
20+
import org.openhab.core.types.State;
2121
import org.openhab.core.ui.items.ItemUIRegistry;
2222
import org.openhab.ui.basic.render.RenderException;
2323
import org.openhab.ui.basic.render.WidgetRenderer;
@@ -105,5 +105,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
105105
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
106106
super.unsetItemUIRegistry(ItemUIRegistry);
107107
}
108-
109108
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/SelectionRenderer.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
import org.openhab.core.items.ItemNotFoundException;
1919
import org.openhab.core.library.items.NumberItem;
2020
import org.openhab.core.library.types.QuantityType;
21+
import org.openhab.core.model.sitemap.sitemap.Mapping;
22+
import org.openhab.core.model.sitemap.sitemap.Selection;
23+
import org.openhab.core.model.sitemap.sitemap.Widget;
2124
import org.openhab.core.types.CommandDescription;
2225
import org.openhab.core.types.CommandOption;
2326
import org.openhab.core.types.State;
2427
import org.openhab.core.types.util.UnitUtils;
25-
import org.openhab.core.model.sitemap.sitemap.Mapping;
26-
import org.openhab.core.model.sitemap.sitemap.Selection;
27-
import org.openhab.core.model.sitemap.sitemap.Widget;
2828
import org.openhab.core.ui.items.ItemUIRegistry;
2929
import org.openhab.ui.basic.render.RenderException;
3030
import org.openhab.ui.basic.render.WidgetRenderer;
@@ -165,5 +165,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
165165
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
166166
super.unsetItemUIRegistry(ItemUIRegistry);
167167
}
168-
169168
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/SetpointRenderer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
import org.apache.commons.lang.StringUtils;
1818
import org.eclipse.emf.common.util.EList;
1919
import org.openhab.core.library.types.DecimalType;
20-
import org.openhab.core.types.State;
2120
import org.openhab.core.model.sitemap.sitemap.Setpoint;
2221
import org.openhab.core.model.sitemap.sitemap.Widget;
22+
import org.openhab.core.types.State;
2323
import org.openhab.core.ui.items.ItemUIRegistry;
2424
import org.openhab.ui.basic.render.RenderException;
2525
import org.openhab.ui.basic.render.WidgetRenderer;
@@ -125,5 +125,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
125125
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
126126
super.unsetItemUIRegistry(ItemUIRegistry);
127127
}
128-
129128
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/SliderRenderer.java

-1
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
116116
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
117117
super.unsetItemUIRegistry(ItemUIRegistry);
118118
}
119-
120119
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/SwitchRenderer.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
import org.openhab.core.library.items.SwitchItem;
2323
import org.openhab.core.library.types.OnOffType;
2424
import org.openhab.core.library.types.QuantityType;
25+
import org.openhab.core.model.sitemap.sitemap.Mapping;
26+
import org.openhab.core.model.sitemap.sitemap.Switch;
27+
import org.openhab.core.model.sitemap.sitemap.Widget;
2528
import org.openhab.core.types.CommandDescription;
2629
import org.openhab.core.types.CommandOption;
2730
import org.openhab.core.types.State;
2831
import org.openhab.core.types.util.UnitUtils;
29-
import org.openhab.core.model.sitemap.sitemap.Mapping;
30-
import org.openhab.core.model.sitemap.sitemap.Switch;
31-
import org.openhab.core.model.sitemap.sitemap.Widget;
3232
import org.openhab.core.ui.items.ItemUIRegistry;
3333
import org.openhab.ui.basic.render.RenderException;
3434
import org.openhab.ui.basic.render.WidgetRenderer;
@@ -196,5 +196,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
196196
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
197197
super.unsetItemUIRegistry(ItemUIRegistry);
198198
}
199-
200199
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/TextRenderer.java

-1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
7878
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
7979
super.unsetItemUIRegistry(ItemUIRegistry);
8080
}
81-
8281
}

bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/VideoRenderer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
import org.apache.commons.lang.StringUtils;
1818
import org.eclipse.emf.common.util.EList;
1919
import org.openhab.core.library.types.StringType;
20-
import org.openhab.core.types.State;
2120
import org.openhab.core.model.sitemap.sitemap.Video;
2221
import org.openhab.core.model.sitemap.sitemap.Widget;
22+
import org.openhab.core.types.State;
2323
import org.openhab.core.ui.items.ItemUIRegistry;
2424
import org.openhab.ui.basic.render.RenderException;
2525
import org.openhab.ui.basic.render.WidgetRenderer;
@@ -118,5 +118,4 @@ protected void setItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
118118
protected void unsetItemUIRegistry(ItemUIRegistry ItemUIRegistry) {
119119
super.unsetItemUIRegistry(ItemUIRegistry);
120120
}
121-
122121
}
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
/**
2-
* Copyright (c) 2010-2020 Contributors to the openHAB project
3-
*
4-
* See the NOTICE file(s) distributed with this work for additional
5-
* information.
6-
*
7-
* This program and the accompanying materials are made available under the
8-
* terms of the Eclipse Public License 2.0 which is available at
9-
* http://www.eclipse.org/legal/epl-2.0
10-
*
11-
* SPDX-License-Identifier: EPL-2.0
12-
*/
13-
package org.openhab.ui.basic.internal.servlet;
14-
15-
import org.openhab.core.items.ItemRegistry;
16-
import org.openhab.core.io.http.servlet.SmartHomeBundleServlet;
17-
18-
/**
19-
* This is the base servlet class for other servlet in the Basic UI.
20-
*
21-
* @author Thomas.Eichstaedt-Engelen
22-
*/
23-
public abstract class BaseServlet extends SmartHomeBundleServlet {
24-
25-
private static final long serialVersionUID = -4012800772403491132L;
26-
27-
/** the root path of this web application */
28-
public static final String WEBAPP_ALIAS = "/basicui";
29-
30-
protected ItemRegistry itemRegistry;
31-
32-
public void setItemRegistry(ItemRegistry itemRegistry) {
33-
this.itemRegistry = itemRegistry;
34-
}
35-
36-
public void unsetItemRegistry(ItemRegistry itemRegistry) {
37-
this.itemRegistry = null;
38-
}
39-
40-
}
1+
/**
2+
* Copyright (c) 2010-2020 Contributors to the openHAB project
3+
*
4+
* See the NOTICE file(s) distributed with this work for additional
5+
* information.
6+
*
7+
* This program and the accompanying materials are made available under the
8+
* terms of the Eclipse Public License 2.0 which is available at
9+
* http://www.eclipse.org/legal/epl-2.0
10+
*
11+
* SPDX-License-Identifier: EPL-2.0
12+
*/
13+
package org.openhab.ui.basic.internal.servlet;
14+
15+
import org.openhab.core.io.http.servlet.SmartHomeBundleServlet;
16+
import org.openhab.core.items.ItemRegistry;
17+
18+
/**
19+
* This is the base servlet class for other servlet in the Basic UI.
20+
*
21+
* @author Thomas.Eichstaedt-Engelen
22+
*/
23+
public abstract class BaseServlet extends SmartHomeBundleServlet {
24+
25+
private static final long serialVersionUID = -4012800772403491132L;
26+
27+
/** the root path of this web application */
28+
public static final String WEBAPP_ALIAS = "/basicui";
29+
30+
protected ItemRegistry itemRegistry;
31+
32+
public void setItemRegistry(ItemRegistry itemRegistry) {
33+
this.itemRegistry = itemRegistry;
34+
}
35+
36+
public void unsetItemRegistry(ItemRegistry itemRegistry) {
37+
this.itemRegistry = null;
38+
}
39+
}

0 commit comments

Comments
 (0)