You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2020/07/08 18:07:13 UTC
[myfaces-tobago] branch master updated: TOBAGO-2047: Remove
"versioned" attribut from theme. Its now on for all themes.
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/master by this push:
new 8f8f6dc TOBAGO-2047: Remove "versioned" attribut from theme. Its now on for all themes.
8f8f6dc is described below
commit 8f8f6dc8df29ae14b1f6eac2c9b742bf4f3194a5
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Wed Jul 8 20:07:00 2020 +0200
TOBAGO-2047: Remove "versioned" attribut from theme. Its now on for all themes.
---
.../java/org/apache/myfaces/tobago/context/ThemeImpl.java | 10 ----------
.../myfaces/tobago/internal/config/TobagoConfigParser.java | 9 +++++----
.../org/apache/myfaces/tobago/config/tobago-config-5.0.xsd | 8 --------
.../tobago/internal/config/TobagoConfigParserUnitTest.java | 2 --
.../apache/myfaces/tobago/internal/mock/faces/MockTheme.java | 12 ------------
tobago-core/src/test/resources/tobago-config-5.0.xml | 1 -
.../src/main/resources/META-INF/tobago-config.xml | 1 -
.../src/main/resources/META-INF/tobago-config.xml | 1 -
.../src/main/resources/META-INF/tobago-config.xml | 1 -
.../src/main/resources/META-INF/tobago-config.xml | 1 -
.../src/main/resources/META-INF/tobago-config.xml | 1 -
11 files changed, 5 insertions(+), 42 deletions(-)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeImpl.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeImpl.java
index 4e9e34b..fd6eb0c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeImpl.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeImpl.java
@@ -196,16 +196,6 @@ public class ThemeImpl implements Theme, Serializable {
}
}
- public boolean isVersioned() {
- checkLocked();
- return versioned;
- }
-
- public void setVersioned(final boolean versioned) {
- checkLocked();
- this.versioned = versioned;
- }
-
@Override
public String getVersion() {
return version;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParser.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParser.java
index c51c487..d1e0df2 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParser.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParser.java
@@ -89,6 +89,10 @@ public class TobagoConfigParser extends TobagoConfigEntityResolver {
private static final int THEME_DEFINITION = 1515774935;
private static final int DISPLAY_NAME = 1568910518;
private static final int FALLBACK = 761243362;
+ /**
+ * @deprecated since 5.0.0
+ */
+ @Deprecated
private static final int VERSIONED = -1407102089;
private static final int RESOURCES = -1983070683;
private static final int INCLUDES = 90259659;
@@ -376,10 +380,6 @@ public class TobagoConfigParser extends TobagoConfigEntityResolver {
currentTheme = null;
break;
- case VERSIONED:
- currentTheme.setVersioned(Boolean.parseBoolean(text));
- break;
-
case RESOURCES:
production = null;
break;
@@ -436,6 +436,7 @@ public class TobagoConfigParser extends TobagoConfigEntityResolver {
case MIME_TYPES:
case MARKUP:
case INCLUDES:
+ case VERSIONED:
// nothing to do
break;
diff --git a/tobago-core/src/main/resources/org/apache/myfaces/tobago/config/tobago-config-5.0.xsd b/tobago-core/src/main/resources/org/apache/myfaces/tobago/config/tobago-config-5.0.xsd
index 57845f8..3e7410d 100644
--- a/tobago-core/src/main/resources/org/apache/myfaces/tobago/config/tobago-config-5.0.xsd
+++ b/tobago-core/src/main/resources/org/apache/myfaces/tobago/config/tobago-config-5.0.xsd
@@ -319,14 +319,6 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="versioned" type="xs:boolean" minOccurs="0" default="false">
- <xs:annotation>
- <xs:documentation>
- The mode of the theme. If the theme is versioned, a version string will be encoded into the
- resource path, to avoid caching problems.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
<xs:element name="resources" type="tobago:resources-type" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java
index a34e346..22656ba 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/config/TobagoConfigParserUnitTest.java
@@ -78,7 +78,6 @@ public class TobagoConfigParserUnitTest {
final ThemeImpl theme1 = fragment.getThemeDefinitions().get(0);
Assertions.assertEquals("my-theme-1", theme1.getName());
Assertions.assertEquals("My Theme 1", theme1.getDisplayName());
- Assertions.assertTrue(theme1.isVersioned());
Assertions.assertTrue(theme1.getProductionResources().isProduction());
Assertions.assertEquals("script.js", theme1.getProductionResources().getScriptList().get(0).getName());
Assertions.assertEquals("style.css", theme1.getProductionResources().getStyleList().get(0).getName());
@@ -86,7 +85,6 @@ public class TobagoConfigParserUnitTest {
final ThemeImpl theme2 = fragment.getThemeDefinitions().get(1);
Assertions.assertEquals("my-theme-2", theme2.getName());
Assertions.assertEquals("my-theme-1", theme2.getFallbackName());
- Assertions.assertFalse(theme2.isVersioned());
Assertions.assertFalse(theme2.getResources().isProduction());
Assertions.assertEquals(0, theme2.getResources().getScriptList().size());
Assertions.assertEquals(0, theme2.getResources().getStyleList().size());
diff --git a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java
index c0e7162..e10649c 100644
--- a/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java
+++ b/tobago-core/src/test/java/org/apache/myfaces/tobago/internal/mock/faces/MockTheme.java
@@ -34,8 +34,6 @@ public class MockTheme extends ThemeImpl {
private List<Theme> fallbackThemeList;
- private boolean versioned;
-
private String version;
public MockTheme(final String name, final String displayName, final List<Theme> fallbackThemeList) {
@@ -70,16 +68,6 @@ public class MockTheme extends ThemeImpl {
}
@Override
- public boolean isVersioned() {
- return versioned;
- }
-
- @Override
- public void setVersioned(final boolean versioned) {
- this.versioned = versioned;
- }
-
- @Override
public String getVersion() {
return version;
}
diff --git a/tobago-core/src/test/resources/tobago-config-5.0.xml b/tobago-core/src/test/resources/tobago-config-5.0.xml
index 7da951b..240ffa9 100644
--- a/tobago-core/src/test/resources/tobago-config-5.0.xml
+++ b/tobago-core/src/test/resources/tobago-config-5.0.xml
@@ -56,7 +56,6 @@
<theme-definition>
<name>my-theme-1</name>
<display-name>My Theme 1</display-name>
- <versioned>true</versioned>
<resources production="true">
<includes>
<script name="script-1.js" priority="1"/>
diff --git a/tobago-theme/tobago-theme-charlotteville/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-charlotteville/src/main/resources/META-INF/tobago-config.xml
index 49056f7..e61b48f 100644
--- a/tobago-theme/tobago-theme-charlotteville/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-charlotteville/src/main/resources/META-INF/tobago-config.xml
@@ -33,7 +33,6 @@
<name>charlotteville</name>
<display-name>Charlotteville</display-name>
<fallback>standard</fallback>
- <versioned>true</versioned>
<resources production="true">
<includes>
<style name="/tobago/charlotteville/${project.version}/css/tobago.min.css"/>
diff --git a/tobago-theme/tobago-theme-roxborough/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-roxborough/src/main/resources/META-INF/tobago-config.xml
index f50a12c..74ca743 100644
--- a/tobago-theme/tobago-theme-roxborough/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-roxborough/src/main/resources/META-INF/tobago-config.xml
@@ -33,7 +33,6 @@
<name>roxborough</name>
<display-name>Roxborough</display-name>
<fallback>standard</fallback>
- <versioned>true</versioned>
<resources production="true">
<includes>
<style name="/tobago/roxborough/${project.version}/css/tobago.min.css"/>
diff --git a/tobago-theme/tobago-theme-scarborough/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-scarborough/src/main/resources/META-INF/tobago-config.xml
index 874ef5f..0857c2f 100644
--- a/tobago-theme/tobago-theme-scarborough/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-scarborough/src/main/resources/META-INF/tobago-config.xml
@@ -33,7 +33,6 @@
<name>scarborough</name>
<display-name>Scarborough</display-name>
<fallback>standard</fallback>
- <versioned>true</versioned>
<resources production="true">
<includes>
<style name="/tobago/scarborough/${project.version}/css/tobago.min.css"/>
diff --git a/tobago-theme/tobago-theme-speyside/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-speyside/src/main/resources/META-INF/tobago-config.xml
index 8ca572d..d7c5d9d 100644
--- a/tobago-theme/tobago-theme-speyside/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-speyside/src/main/resources/META-INF/tobago-config.xml
@@ -33,7 +33,6 @@
<name>speyside</name>
<display-name>Speyside</display-name>
<fallback>standard</fallback>
- <versioned>true</versioned>
<resources production="true">
<includes>
<style name="/tobago/speyside/${project.version}/css/tobago.min.css"/>
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
index 9d05c4c..9ab01ee 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
@@ -35,7 +35,6 @@
<theme-definition>
<name>standard</name>
<display-name>Standard Theme</display-name>
- <versioned>true</versioned>
<resources production="true">
<includes>
<script name="/webjars/webcomponents__custom-elements/1.2.1/custom-elements.min.js"/>