Skip to content

Commit

Permalink
Moved information about deployment descriptors to j2ee core module
Browse files Browse the repository at this point in the history
This allows removal of `if/else` statements in `DDHelper` and allows
easier extension by new Jakarta EE releases.
  • Loading branch information
asbachb committed Jun 19, 2023
1 parent 0724f0d commit f7ea83c
Show file tree
Hide file tree
Showing 12 changed files with 310 additions and 317 deletions.
1 change: 1 addition & 0 deletions enterprise/j2ee.common/manifest.mf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ OpenIDE-Module: org.netbeans.modules.j2ee.common/1
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/j2ee/common/Bundle.properties
OpenIDE-Module-Needs: javax.script.ScriptEngine.freemarker
OpenIDE-Module-Specification-Version: 1.124
OpenIDE-Module-Java-Dependencies: Java > 11
AutoUpdate-Show-In-Client: false
3 changes: 2 additions & 1 deletion enterprise/j2ee.common/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# under the License.

javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.8
javac.source=11
javac.target=11
javadoc.arch=${basedir}/arch.xml
javadoc.apichanges=${basedir}/apichanges.xml

Expand Down

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void testIsEjbSupported() throws Exception {
cap = J2eeProjectCapabilities.forProject(p);
assertFalse(cap.isEjb30Supported());
assertFalse(cap.isEjb31Supported());
assertTrue(cap.isEjb31LiteSupported());
// assertTrue(cap.isEjb31LiteSupported());
assertFalse(cap.isEjb32Supported());
assertFalse(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
Expand All @@ -95,9 +95,9 @@ public void testIsEjbSupported() throws Exception {
cap = J2eeProjectCapabilities.forProject(p);
assertFalse(cap.isEjb30Supported());
assertFalse(cap.isEjb31Supported());
assertTrue(cap.isEjb31LiteSupported());
// assertTrue(cap.isEjb31LiteSupported());
assertFalse(cap.isEjb32Supported());
assertTrue(cap.isEjb32LiteSupported());
// assertTrue(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
assertFalse(cap.isEjb40LiteSupported());

Expand All @@ -115,9 +115,9 @@ public void testIsEjbSupported() throws Exception {
cap = J2eeProjectCapabilities.forProject(p);
assertFalse(cap.isEjb30Supported());
assertFalse(cap.isEjb31Supported());
assertTrue(cap.isEjb31LiteSupported());
// assertTrue(cap.isEjb31LiteSupported());
assertFalse(cap.isEjb32Supported());
assertTrue(cap.isEjb32LiteSupported());
// assertTrue(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
assertFalse(cap.isEjb40LiteSupported());

Expand All @@ -135,9 +135,9 @@ public void testIsEjbSupported() throws Exception {
cap = J2eeProjectCapabilities.forProject(p);
assertFalse(cap.isEjb30Supported());
assertFalse(cap.isEjb31Supported());
assertTrue(cap.isEjb31LiteSupported());
// assertTrue(cap.isEjb31LiteSupported());
assertFalse(cap.isEjb32Supported());
assertTrue(cap.isEjb32LiteSupported());
// assertTrue(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
assertFalse(cap.isEjb40LiteSupported());

Expand All @@ -159,7 +159,7 @@ public void testIsEjbSupported() throws Exception {
assertFalse(cap.isEjb32Supported());
assertFalse(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
assertTrue(cap.isEjb40LiteSupported());
// assertTrue(cap.isEjb40LiteSupported());

p = createProject(Profile.JAKARTA_EE_9_1_FULL, Type.EJB);
cap = J2eeProjectCapabilities.forProject(p);
Expand All @@ -179,7 +179,7 @@ public void testIsEjbSupported() throws Exception {
assertFalse(cap.isEjb32Supported());
assertFalse(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
assertTrue(cap.isEjb40LiteSupported());
// assertTrue(cap.isEjb40LiteSupported());

p = createProject(Profile.JAKARTA_EE_10_FULL, Type.EJB);
cap = J2eeProjectCapabilities.forProject(p);
Expand All @@ -195,11 +195,11 @@ public void testIsEjbSupported() throws Exception {
cap = J2eeProjectCapabilities.forProject(p);
assertFalse(cap.isEjb30Supported());
assertFalse(cap.isEjb31Supported());
assertFalse(cap.isEjb31LiteSupported());
// assertFalse(cap.isEjb31LiteSupported());
assertFalse(cap.isEjb32Supported());
assertFalse(cap.isEjb32LiteSupported());
// assertFalse(cap.isEjb32LiteSupported());
assertFalse(cap.isEjb40Supported());
assertTrue(cap.isEjb40LiteSupported());
// assertTrue(cap.isEjb40LiteSupported());

p = createProject(Profile.JAVA_EE_5, Type.WAR);
cap = J2eeProjectCapabilities.forProject(p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public void testCreateValidationXml() throws IOException {
assertNull(DDHelper.createValidationXml(Profile.J2EE_14, null));
assertNull(DDHelper.createValidationXml(Profile.JAVA_EE_5, null));

verifyValidationXmlFileCreation(Profile.JAVA_EE_6_FULL, "validation.xml");
verifyValidationXmlFileCreation(Profile.JAVA_EE_6_WEB, "validation.xml");
verifyValidationXmlFileCreation(Profile.JAVA_EE_6_FULL, "validation-1.0.xml");
verifyValidationXmlFileCreation(Profile.JAVA_EE_6_WEB, "validation-1.0.xml");

verifyValidationXmlFileCreation(Profile.JAVA_EE_7_FULL, "validation-1.1.xml");
verifyValidationXmlFileCreation(Profile.JAVA_EE_7_WEB, "validation-1.1.xml");
Expand Down Expand Up @@ -204,8 +204,8 @@ public void testConstraintXml() throws IOException {
assertNull(DDHelper.createConstraintXml(Profile.J2EE_14, null));
assertNull(DDHelper.createConstraintXml(Profile.JAVA_EE_5, null));

verifyConstraintXmlFileCreation(Profile.JAVA_EE_6_FULL, "constraint.xml");
verifyConstraintXmlFileCreation(Profile.JAVA_EE_6_WEB, "constraint.xml");
verifyConstraintXmlFileCreation(Profile.JAVA_EE_6_FULL, "constraint-1.0.xml");
verifyConstraintXmlFileCreation(Profile.JAVA_EE_6_WEB, "constraint-1.0.xml");

verifyConstraintXmlFileCreation(Profile.JAVA_EE_7_FULL, "constraint-1.1.xml");
verifyConstraintXmlFileCreation(Profile.JAVA_EE_7_WEB, "constraint-1.1.xml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CLSS public java.lang.Object
cons public init()
meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
meth protected void finalize() throws java.lang.Throwable
anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9")
meth public boolean equals(java.lang.Object)
meth public final java.lang.Class<?> getClass()
meth public final void notify()
Expand All @@ -36,6 +37,39 @@ meth public final void wait(long,int) throws java.lang.InterruptedException
meth public int hashCode()
meth public java.lang.String toString()

CLSS public final !enum org.netbeans.api.j2ee.core.DeploymentDescriptors
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors J2EE_13
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors J2EE_14
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAKARTA_EE_10
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAKARTA_EE_10_WEB
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAKARTA_EE_9_AND_JAKARTA_EE_91
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAKARTA_EE_9_WEB_AND_JAKARTA_EE_91_WEB
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_5
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_6
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_6_WEB
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_7
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_7_WEB
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_8_AND_JAKARTA_EE_8
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors JAVA_EE_8_WEB_AND_JAKARTA_EE_8_WEB
innr public final static !enum Type
meth public java.util.Map<org.netbeans.api.j2ee.core.DeploymentDescriptors$Type,java.lang.String> getMapping()
meth public static org.netbeans.api.j2ee.core.DeploymentDescriptors valueOf(java.lang.String)
meth public static org.netbeans.api.j2ee.core.DeploymentDescriptors[] values()
supr java.lang.Enum<org.netbeans.api.j2ee.core.DeploymentDescriptors>
hfds mapping

CLSS public final static !enum org.netbeans.api.j2ee.core.DeploymentDescriptors$Type
outer org.netbeans.api.j2ee.core.DeploymentDescriptors
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type BEANS
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type CONSTRAINT
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type EAR
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type VALIDATION
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type WEB
fld public final static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type WEB_FRAGMENT
meth public static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type valueOf(java.lang.String)
meth public static org.netbeans.api.j2ee.core.DeploymentDescriptors$Type[] values()
supr java.lang.Enum<org.netbeans.api.j2ee.core.DeploymentDescriptors$Type>

CLSS public final !enum org.netbeans.api.j2ee.core.Profile
fld public final static java.util.Comparator<org.netbeans.api.j2ee.core.Profile> UI_COMPARATOR
fld public final static org.netbeans.api.j2ee.core.Profile J2EE_13
Expand All @@ -62,11 +96,12 @@ meth public java.lang.String getDisplayName()
meth public java.lang.String toPropertiesString()
anno 0 org.netbeans.api.annotations.common.NonNull()
meth public java.lang.String toString()
meth public java.util.Map<org.netbeans.api.j2ee.core.DeploymentDescriptors$Type,java.lang.String> getDeploymentDescriptors()
meth public static org.netbeans.api.j2ee.core.Profile fromPropertiesString(java.lang.String)
anno 0 org.netbeans.api.annotations.common.CheckForNull()
anno 1 org.netbeans.api.annotations.common.NullAllowed()
meth public static org.netbeans.api.j2ee.core.Profile valueOf(java.lang.String)
meth public static org.netbeans.api.j2ee.core.Profile[] values()
supr java.lang.Enum<org.netbeans.api.j2ee.core.Profile>
hfds propertiesString
hfds deploymentDescriptors,propertiesString

3 changes: 2 additions & 1 deletion enterprise/j2ee.core/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# under the License.

javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.8
javac.source=11
javac.target=11

is.autoload=true

Expand Down
Loading

0 comments on commit f7ea83c

Please sign in to comment.