Skip to content

Commit

Permalink
[WFCORE-6881] Update to the correct list of schema versions (includin…
Browse files Browse the repository at this point in the history
…g minor versions).
  • Loading branch information
darranl committed Aug 15, 2024
1 parent 78e4d29 commit d77cab1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public void writeContent(XMLExtendedStreamWriter streamWriter, ModelMarshallingC
}

public static ManagementSchema create(ManagementXmlReaderWriter readerWriterDelegate,
Stability stability, int majorVersion, String localName) {
Stability stability, int majorVersion, int minorVersion, String localName) {
VersionedNamespace<IntVersion, ManagementXmlSchema> namespace =
IntVersionSchema.createURN(List.of(IntVersionSchema.JBOSS_IDENTIFIER, DOMAIN), stability, new IntVersion(majorVersion));
IntVersionSchema.createURN(List.of(IntVersionSchema.JBOSS_IDENTIFIER, DOMAIN), stability, new IntVersion(majorVersion, minorVersion));
return new ManagementSchema(readerWriterDelegate, namespace, localName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,22 @@ public abstract class ManagementSchemas {

private enum Version implements Feature {

VERSION_1(1),
VERSION_2(2),
VERSION_3(3),
VERSION_4(4),
VERSION_1_0(1, 0),
VERSION_1_1(1, 1),
VERSION_1_2(1, 2),
VERSION_1_3(1, 3),
VERSION_1_4(1, 4),
VERSION_1_5(1, 5),
VERSION_1_6(1, 6),
VERSION_1_7(1, 7),
VERSION_1_8(1, 8),
VERSION_2_0(2, 0),
VERSION_2_1(2, 1),
VERSION_2_2(2, 2),
VERSION_3_0(3, 0),
VERSION_4_0(4, 0),
VERSION_4_1(4, 1),
VERSION_4_2(4,2),
VERSION_5(5),
VERSION_6(6),
VERSION_7(7),
Expand All @@ -47,21 +59,31 @@ private enum Version implements Feature {
;

private final int majorVersion;
private final int minorVersion;
private final Stability stability;

Version(final int majorVersion) {
this(majorVersion, Stability.DEFAULT);
this(majorVersion, 0);
}

Version(final int majorVersion, final Stability stability) {
Version(final int majorVersion, final int minorVersion) {
this(majorVersion, minorVersion, Stability.DEFAULT);
}

Version(final int majorVersion, final int minorVersion, final Stability stability) {
this.majorVersion = majorVersion;
this.minorVersion = minorVersion;
this.stability = stability;
}

public int getMajorVersion() {
return majorVersion;
}

public int getMinorVersion() {
return minorVersion;
}

@Override
public Stability getStability() {
return stability;
Expand All @@ -79,7 +101,7 @@ protected ManagementSchemas(final Stability stability, final ManagementXmlReader
maxVersion = version.getMajorVersion();
}
allSchemas.add(ManagementSchema.create(stability.enables(version.getStability()) ? readerWriterDelegate
: UnstableManagementReaderWriter.INSTANCE, version.getStability(), version.getMajorVersion(), localName));
: UnstableManagementReaderWriter.INSTANCE, version.getStability(), version.getMajorVersion(), version.getMinorVersion(), localName));
}

Set<ManagementXmlSchema> current = new HashSet<>();
Expand Down

0 comments on commit d77cab1

Please sign in to comment.