diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java index 1f60e1d0919a..ab1b2f4f47f8 100644 --- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java +++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JpaSupportImpl.java @@ -39,7 +39,7 @@ public JpaSupportImpl(JBJ2eePlatformFactory.J2eePlatformImplImpl platformImpl) { public JpaProvider getDefaultProvider() { String defaultProvider = platformImpl.getDefaultJpaProvider(); boolean jpa2 = platformImpl.isJpa2Available(); - return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, jpa2, false, false, false, false); + return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, jpa2, false, false, false, false, false); } @Override @@ -48,13 +48,16 @@ public Set getProviders() { boolean jpa2 = platformImpl.isJpa2Available(); Set providers = new HashSet(); if (platformImpl.containsPersistenceProvider(JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER)) { - providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER, JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, false, false)); + providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER, + JBJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, false, false, false, false, false)); } if (platformImpl.containsPersistenceProvider(JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER)) { - providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER, JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false)); + providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER, + JBJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false)); } if (platformImpl.containsPersistenceProvider(JBJ2eePlatformFactory.KODO_JPA_PROVIDER)) { - providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.KODO_JPA_PROVIDER, JBJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false)); + providers.add(JpaProviderFactory.createJpaProvider(JBJ2eePlatformFactory.KODO_JPA_PROVIDER, + JBJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false)); } return providers; } diff --git a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java index 20e7f36c17e7..0e31bae10c67 100644 --- a/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java +++ b/contrib/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/j2ee/JpaSupportImpl.java @@ -39,7 +39,7 @@ public JpaSupportImpl(WLJ2eePlatformFactory.J2eePlatformImplImpl platformImpl) { public JpaProvider getDefaultProvider() { String defaultProvider = platformImpl.getDefaultJpaProvider(); return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, - platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false); + platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false, false, false, false); } @Override @@ -47,11 +47,11 @@ public Set getProviders() { String defaultProvider = platformImpl.getDefaultJpaProvider(); Set providers = new HashSet(); providers.add(JpaProviderFactory.createJpaProvider(WLJ2eePlatformFactory.OPENJPA_JPA_PROVIDER, - WLJ2eePlatformFactory.OPENJPA_JPA_PROVIDER.equals(defaultProvider), true, false, false, false)); + WLJ2eePlatformFactory.OPENJPA_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false)); providers.add(JpaProviderFactory.createJpaProvider( WLJ2eePlatformFactory.ECLIPSELINK_JPA_PROVIDER, WLJ2eePlatformFactory.ECLIPSELINK_JPA_PROVIDER.equals(defaultProvider), - true, platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false)); + true, platformImpl.isJpa2Available(), platformImpl.isJpa21Available(), false, false, false, false)); return providers; } diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties index e99e24eb362f..725663f83031 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/Bundle.properties @@ -179,6 +179,7 @@ STR_709_SERVER_NAME=GlassFish Server 7.0.9 STR_7010_SERVER_NAME=GlassFish Server 7.0.10 STR_7011_SERVER_NAME=GlassFish Server 7.0.11 STR_7012_SERVER_NAME=GlassFish Server 7.0.12 +STR_800_SERVER_NAME=GlassFish Server 8.0.0 # CommonServerSupport.java MSG_FLAKEY_NETWORK=Network communication problem
Could not establish \ diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java index eaa06e9e7331..081be2bca9f8 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/GlassfishInstanceProvider.java @@ -69,6 +69,7 @@ public final class GlassfishInstanceProvider implements ServerInstanceProvider, public static final String JAKARTAEE9_DEPLOYER_FRAGMENT = "deployer:gfv6ee9"; public static final String JAKARTAEE91_DEPLOYER_FRAGMENT = "deployer:gfv610ee9"; public static final String JAKARTAEE10_DEPLOYER_FRAGMENT = "deployer:gfv700ee10"; + public static final String JAKARTAEE11_DEPLOYER_FRAGMENT = "deployer:gfv800ee11"; public static final String EE6WC_DEPLOYER_FRAGMENT = "deployer:gfv3ee6wc"; // NOI18N public static final String PRELUDE_DEPLOYER_FRAGMENT = "deployer:gfv3"; // NOI18N private static String EE6_INSTANCES_PATH = "/GlassFishEE6/Instances"; // NOI18N @@ -78,6 +79,7 @@ public final class GlassfishInstanceProvider implements ServerInstanceProvider, private static String JAKARTAEE9_INSTANCES_PATH = "/GlassFishJakartaEE9/Instances"; // NOI18N private static String JAKARTAEE91_INSTANCES_PATH = "/GlassFishJakartaEE91/Instances"; // NOI18N private static String JAKARTAEE10_INSTANCES_PATH = "/GlassFishJakartaEE10/Instances"; // NOI18N + private static String JAKARTAEE11_INSTANCES_PATH = "/GlassFishJakartaEE11/Instances"; // NOI18N private static String EE6WC_INSTANCES_PATH = "/GlassFishEE6WC/Instances"; // NOI18N public static String PRELUDE_DEFAULT_NAME = "GlassFish_v3_Prelude"; //NOI18N @@ -102,11 +104,13 @@ public static GlassfishInstanceProvider getProvider() { new String[]{EE6_DEPLOYER_FRAGMENT, EE6WC_DEPLOYER_FRAGMENT, EE7_DEPLOYER_FRAGMENT, EE8_DEPLOYER_FRAGMENT, JAKARTAEE8_DEPLOYER_FRAGMENT, JAKARTAEE9_DEPLOYER_FRAGMENT, - JAKARTAEE91_DEPLOYER_FRAGMENT, JAKARTAEE10_DEPLOYER_FRAGMENT}, + JAKARTAEE91_DEPLOYER_FRAGMENT, JAKARTAEE10_DEPLOYER_FRAGMENT, + JAKARTAEE11_DEPLOYER_FRAGMENT}, new String[]{EE6_INSTANCES_PATH, EE6WC_INSTANCES_PATH, EE7_INSTANCES_PATH, EE8_INSTANCES_PATH, JAKARTAEE8_INSTANCES_PATH, JAKARTAEE9_INSTANCES_PATH, - JAKARTAEE91_INSTANCES_PATH, JAKARTAEE10_INSTANCES_PATH}, + JAKARTAEE91_INSTANCES_PATH, JAKARTAEE10_INSTANCES_PATH, + JAKARTAEE11_INSTANCES_PATH}, null, true, new String[]{"--nopassword"}, // NOI18N diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java index aef11f44925a..3ec506ad13d1 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/ServerDetails.java @@ -422,6 +422,17 @@ public enum ServerDetails { "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.12/glassfish-7.0.12.zip", // NOI18N "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/7.0.12/glassfish-7.0.12.zip", // NOI18N "http://www.eclipse.org/legal/epl-2.0" //NOI18N + ), + + /** + * details for an instance of GlassFish Server 8.0.0 + */ + GLASSFISH_SERVER_8_0_0(NbBundle.getMessage(ServerDetails.class, "STR_800_SERVER_NAME", new Object[]{}), // NOI18N + GlassfishInstanceProvider.JAKARTAEE11_DEPLOYER_FRAGMENT, + GlassFishVersion.GF_8_0_0, + "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M2/glassfish-8.0.0-M2.zip", // NOI18N + "https://repo.maven.apache.org/maven2/org/glassfish/main/distributions/glassfish/8.0.0-M2/glassfish-8.0.0-M2.zip", // NOI18N + "http://www.eclipse.org/legal/epl-2.0" //NOI18N ); /** diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java index bc1cc25d9cf1..5c906f0f9a8e 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistration.java @@ -84,7 +84,10 @@ private static int autoregisterGlassFishInstance(String clusterDirValue, String String deployer = "deployer:gfv3ee6"; String defaultDisplayNamePrefix = "GlassFish Server "; GlassFishVersion version = ServerUtils.getServerVersion(glassfishRoot); - if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { + if (GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) { + deployer = "deployer:gfv800ee11"; + config = "GlassFishJakartaEE11/Instances"; + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { deployer = "deployer:gfv700ee10"; config = "GlassFishJakartaEE10/Instances"; } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) { diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties index ac76c4dc23fe..397afe9462be 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/Bundle.properties @@ -181,6 +181,9 @@ STR_7010_SERVER_NAME=GlassFish Server 7.0.10 STR_7011_SERVER_NAME=GlassFish Server 7.0.11 STR_7012_SERVER_NAME=GlassFish Server 7.0.12 +STR_V8_FAMILY_NAME=GlassFish Server +STR_800_SERVER_NAME=GlassFish Server 8.0.0 + LBL_SELECT_BITS=Select LBL_ChooseOne=Choose server to download: diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java index 9a433efcccfe..e095842f864a 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/GlassfishWizardProvider.java @@ -75,7 +75,14 @@ public static GlassfishWizardProvider createJakartaEe91() { public static GlassfishWizardProvider createJakartaEe10() { return new GlassfishWizardProvider( org.openide.util.NbBundle.getMessage(GlassfishWizardProvider.class, - "STR_V7_FAMILY_NAME", new Object[]{}) // NOI18N + "STR_V7_FAMILY_NAME", new Object[]{}) // NOI18N + ); + } + + public static GlassfishWizardProvider createJakartaEe11() { + return new GlassfishWizardProvider( + org.openide.util.NbBundle.getMessage(GlassfishWizardProvider.class, + "STR_V8_FAMILY_NAME", new Object[]{}) // NOI18N ); } diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java index 3a17762b28e7..e81b108df9f2 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/spi/ServerUtilities.java @@ -112,6 +112,12 @@ public static ServerUtilities getJakartaEe10Utilities() { return null == gip ? null : new ServerUtilities(gip, GlassfishWizardProvider.createJakartaEe10()); } + + public static ServerUtilities getJakartaEe11Utilities() { + GlassfishInstanceProvider gip = GlassfishInstanceProvider.getProvider(); + return null == gip ? null : new ServerUtilities(gip, + GlassfishWizardProvider.createJakartaEe11()); + } // public static ServerUtilities getEe6WCUtilities() { // GlassfishInstanceProvider gip = GlassfishInstanceProvider.getProvider(); diff --git a/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java b/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java index 0be18423d0c4..37e1a77d83ad 100644 --- a/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java +++ b/enterprise/glassfish.common/test/unit/src/org/netbeans/modules/glassfish/common/registration/AutomaticRegistrationTest.java @@ -28,6 +28,38 @@ */ public class AutomaticRegistrationTest { + @Test + public void testRegistrationGF8() { + GlassFishVersion version = GlassFishVersion.GF_8_0_0; + if (GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) { + assertTrue("Success!", true); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6)) { + fail("GF_6"); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) { + fail("GF_5_1_0"); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5)) { + fail("GF_5"); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_3_1)) { + fail("GF_3_1"); + } + } + + @Test + public void testRegistrationGF7() { + GlassFishVersion version = GlassFishVersion.GF_7_0_11; + if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { + assertTrue("Success!", true); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_6)) { + fail("GF_6"); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) { + fail("GF_5_1_0"); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_5)) { + fail("GF_5"); + } else if (GlassFishVersion.ge(version, GlassFishVersion.GF_3_1)) { + fail("GF_3_1"); + } + } + @Test public void testRegistrationGF625() { GlassFishVersion version = GlassFishVersion.GF_6_2_5; diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java index cb66083ad4f3..eed7b79be86c 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/AppClientVersion.java @@ -81,6 +81,13 @@ public final class AppClientVersion extends J2EEBaseVersion { "10.0", 10000, // NOI18N "10.0", 10000 // NOI18N ); + + /** Represents application-client version 11.0 + */ + public static final AppClientVersion APP_CLIENT_11_0 = new AppClientVersion( + "11.0", 11000, // NOI18N + "11.0", 11000 // NOI18N + ); /** ----------------------------------------------------------------------- * Implementation */ @@ -122,6 +129,8 @@ public static AppClientVersion getAppClientVersion(String version) { result = APP_CLIENT_9_0; } else if(APP_CLIENT_10_0.toString().equals(version)) { result = APP_CLIENT_10_0; + } else if(APP_CLIENT_11_0.toString().equals(version)) { + result = APP_CLIENT_11_0; } return result; diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java index 382dc79a118d..61a37d8f3725 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ApplicationVersion.java @@ -81,6 +81,13 @@ public final class ApplicationVersion extends J2EEBaseVersion { "10.0", 10000, // NOI18N "10.0", 10000 // NOI18N ); + + /** Represents application version 11.0 + */ + public static final ApplicationVersion APPLICATION_11_0 = new ApplicationVersion( + "11.0", 11000, // NOI18N + "11.0", 11000 // NOI18N + ); /** ----------------------------------------------------------------------- * Implementation diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java index 0f279f1c5f99..53a8d2676fd9 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/EjbJarVersion.java @@ -81,6 +81,14 @@ public final class EjbJarVersion extends J2EEBaseVersion { "4.0", 4000, // NOI18N "9.0", 9000 // NOI18N ); + + /** + * Represents ejbjar version 4.0.1 + */ + public static final EjbJarVersion EJBJAR_4_0_1 = new EjbJarVersion( + "4.0.1", 4010, // NOI18N + "10.0", 10000 // NOI18N + ); /** ----------------------------------------------------------------------- * Implementation */ diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java index 9208f7eb3bfb..6a5230180e5b 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/GlassfishConfiguration.java @@ -70,7 +70,7 @@ import org.openide.util.RequestProcessor; /** - * Basic Java EE server configuration API support for V2, V3 and V4 plugins. + * Basic Java/Jakarta EE server configuration API support for V2-V8 plugins. *

* @author Peter Williams, Tomas Kraus */ @@ -85,7 +85,7 @@ public abstract class GlassfishConfiguration implements //////////////////////////////////////////////////////////////////////////// /** GlassFish Java EE common module Logger. */ - private static final Logger LOGGER = Logger.getLogger("glassfish-eecommon"); + private static final Logger LOGGER = Logger.getLogger(GlassfishConfiguration.class.getName()); /** GlassFish resource file suffix is {@code .xml}. */ private static final String RESOURCE_FILES_SUFFIX = ".xml"; @@ -136,19 +136,7 @@ private static int[] versionToResourceFilesIndexes( if (version == null) { return new int[]{0,1}; } - // glassfish-resources.xml for v7 - if (GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { - return new int[]{0}; - } - // glassfish-resources.xml for v6 - if (GlassFishVersion.ge(version, GlassFishVersion.GF_6) || GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) { - return new int[]{0}; - } - // glassfish-resources.xml for v5 - if (GlassFishVersion.ge(version, GlassFishVersion.GF_5) || GlassFishVersion.ge(version, GlassFishVersion.GF_5_1_0)) { - return new int[]{0}; - } - // glassfish-resources.xml for v4 + // glassfish-resources.xml for v4 and onwards if (GlassFishVersion.ge(version, GlassFishVersion.GF_4)) { return new int[]{0}; } @@ -515,7 +503,8 @@ void internalSetAppServerVersion(ASDDVersion asVersion) { "gfv510ee8", "gfv6ee9", "gfv610ee9", - "gfv700ee10" + "gfv700ee10", + "gfv800ee11" }; protected ASDDVersion getTargetAppServerVersion() { @@ -567,7 +556,13 @@ static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolde boolean geGF5 = false; boolean geGF6 = false; boolean geGF7 = false; + boolean geGF8 = false; if(schemaFolder.exists()){ + if(new File(schemaFolder, "jakartaee11.xsd").exists() && + new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){ + geGF8 = true; + return ASDDVersion.GLASSFISH_8; + } if(new File(schemaFolder, "jakartaee10.xsd").exists() && new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()){ geGF7 = true; @@ -584,7 +579,7 @@ static ASDDVersion getInstalledAppServerVersionFromDirectory(File asInstallFolde return ASDDVersion.GLASSFISH_5_1; } } - if (!geGF5 && !geGF6 && !geGF7 && dtdFolder.exists()) { + if (!geGF5 && !geGF6 && !geGF7 && !geGF8 && dtdFolder.exists()) { if (new File(dtdFolder, "glassfish-web-app_3_0-1.dtd").exists()) { return ASDDVersion.SUN_APPSERVER_10_1; } diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java index 26855cab1b32..dcd0dd32683b 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/J2eeModuleHelper.java @@ -202,6 +202,12 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa result = ASDDVersion.SUN_APPSERVER_10_0; } else if (ServletVersion.SERVLET_4_0.equals(servletVersion)) { result = ASDDVersion.GLASSFISH_5_1; + } else if (ServletVersion.SERVLET_5_0.equals(servletVersion)) { + result = ASDDVersion.GLASSFISH_6; + } else if (ServletVersion.SERVLET_6_0.equals(servletVersion)) { + result = ASDDVersion.GLASSFISH_7; + } else if (ServletVersion.SERVLET_6_1.equals(servletVersion)) { + result = ASDDVersion.GLASSFISH_8; } return result; } @@ -236,6 +242,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa result = ASDDVersion.GLASSFISH_6; } else if (ServletVersion.SERVLET_6_0.equals(servletVersion)) { result = ASDDVersion.GLASSFISH_7; + } else if (ServletVersion.SERVLET_6_1.equals(servletVersion)) { + result = ASDDVersion.GLASSFISH_8; } return result; } @@ -275,6 +283,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa result = ASDDVersion.GLASSFISH_5_1; } else if (EjbJarVersion.EJBJAR_4_0.equals(ejbJarVersion)) { result = ASDDVersion.GLASSFISH_7; + } else if (EjbJarVersion.EJBJAR_4_0_1.equals(ejbJarVersion)) { + result = ASDDVersion.GLASSFISH_8; } return result; } @@ -314,6 +324,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa result = ASDDVersion.GLASSFISH_6; } else if (ApplicationVersion.APPLICATION_10_0.equals(applicationVersion)) { result = ASDDVersion.GLASSFISH_7; + } else if (ApplicationVersion.APPLICATION_11_0.equals(applicationVersion)) { + result = ASDDVersion.GLASSFISH_8; } return result; } @@ -353,6 +365,8 @@ protected ASDDVersion getMinASVersion(String j2eeModuleVersion, ASDDVersion defa result = ASDDVersion.GLASSFISH_6; } else if (AppClientVersion.APP_CLIENT_10_0.equals(appClientVersion)) { result = ASDDVersion.GLASSFISH_7; + } else if (AppClientVersion.APP_CLIENT_11_0.equals(appClientVersion)) { + result = ASDDVersion.GLASSFISH_8; } return result; } diff --git a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java index e9b3ce87c064..e4db268c9fdf 100644 --- a/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java +++ b/enterprise/glassfish.eecommon/src/org/netbeans/modules/glassfish/eecommon/api/config/ServletVersion.java @@ -81,6 +81,13 @@ public final class ServletVersion extends J2EEBaseVersion { "6.0", 6000, // NOI18N "10.0", 10000 // NOI18N ); + + /** Represents servlet version 6.1 + */ + public static final ServletVersion SERVLET_6_1 = new ServletVersion( + "6.1", 6100, // NOI18N + "11.0", 11000 // NOI18N + ); /** ----------------------------------------------------------------------- * Implementation diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java index 05b729f23c50..0e4c91c26bd7 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/AbstractHk2ConfigurationFactory.java @@ -107,7 +107,10 @@ public ModuleConfiguration create(final @NonNull J2eeModule module, ? instance.getVersion() : null; try { Hk2DeploymentManager evaluatedDm = null; - if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { + if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) { + evaluatedDm = (Hk2DeploymentManager) Hk2DeploymentFactory.createJakartaEe11() + .getDisconnectedDeploymentManager(instanceUrl); + } else if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { evaluatedDm = (Hk2DeploymentManager) Hk2DeploymentFactory.createJakartaEe10() .getDisconnectedDeploymentManager(instanceUrl); } else if(version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_6_1_0)) { @@ -136,6 +139,10 @@ public ModuleConfiguration create(final @NonNull J2eeModule module, ? hk2dm : evaluatedDm; if (version != null + && GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0)) { + retVal = new ModuleConfigurationImpl( + module, new Hk2Configuration(module, version), dm); + } else if (version != null && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0)) { retVal = new ModuleConfigurationImpl( module, new Hk2Configuration(module, version), dm); diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties index 0733a43ca8cd..bbb293440dce 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Bundle.properties @@ -50,6 +50,7 @@ LBL_V6ServerLibraries=GlassFish Server 6 Libraries LBL_V610ServerLibraries=GlassFish Server 6.1 Libraries LBL_V620ServerLibraries=GlassFish Server 6.2 Libraries LBL_V700ServerLibraries=GlassFish Server 7.0.0 Libraries +LBL_V800ServerLibraries=GlassFish Server 8.0.0 Libraries MSG_V1ServerPlatform=Unsupported GlassFish Server 1 Platform MSG_V2ServerPlatform=Unsupported GlassFish Server 2 Platform @@ -61,6 +62,7 @@ MSG_V6ServerPlatform=GlassFish Server 6 Platform MSG_V610ServerPlatform=GlassFish Server 6.1 Platform MSG_V620ServerPlatform=GlassFish Server 6.2 Platform MSG_V700ServerPlatform=GlassFish Server 7.0.0 Platform +MSG_V800ServerPlatform=GlassFish Server 8.0.0 Platform LBL_V3RunTimeDDCatalog=GlassFish Server 3 Catalog DESC_V3RunTimeDDCatalog=List of all the runtime descriptors DTDs for GlassFish Server 3 diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java index ccb48cfe06b2..1b1b6e5214d2 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2DeploymentFactory.java @@ -42,6 +42,7 @@ public class Hk2DeploymentFactory implements DeploymentFactory { private static Hk2DeploymentFactory jakartaee9Instance; private static Hk2DeploymentFactory jakartaee91Instance; private static Hk2DeploymentFactory jakartaee10Instance; + private static Hk2DeploymentFactory jakartaee11Instance; private String[] uriFragments; private String version; private String displayName; @@ -168,6 +169,22 @@ public static synchronized DeploymentFactory createJakartaEe10() { } return jakartaee10Instance; } + + /** + * + * @return + */ + public static synchronized DeploymentFactory createJakartaEe11() { + // FIXME -- these strings should come from some constant place + if (jakartaee11Instance == null) { + ServerUtilities tmp = ServerUtilities.getJakartaEe11Utilities(); + jakartaee11Instance = new Hk2DeploymentFactory(new String[]{"deployer:gfv800ee11:", "deployer:gfv8"}, "0.9", // NOI18N + NbBundle.getMessage(Hk2DeploymentFactory.class, "TXT_FactoryDisplayName")); // NOI18N + DeploymentFactoryManager.getInstance().registerDeploymentFactory(jakartaee11Instance); + jakartaee11Instance.setServerUtilities(tmp); + } + return jakartaee11Instance; + } /** * diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java index 8034e694a478..7f40ea6230e8 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformFactory.java @@ -67,6 +67,9 @@ public class Hk2JavaEEPlatformFactory extends J2eePlatformFactory { /** GlassFish V7 JakartaEE platform lookup key. */ private static final String V7_LOOKUP_KEY = "J2EE/DeploymentPlugins/gfv700ee10/Lookup"; + + /** GlassFish V8 JakartaEE platform lookup key. */ + private static final String V8_LOOKUP_KEY = "J2EE/DeploymentPlugins/gfv800ee11/Lookup"; /** GlassFish JavaEE platform factory singleton object. */ private static volatile Hk2JavaEEPlatformFactory instance; @@ -94,15 +97,18 @@ public static Hk2JavaEEPlatformFactory getFactory() { } /** - * Get GlassFish JavaEE platform name from bundle properties for given - * GlassFish server version. + * Get GlassFish Java/Jakarta EE platform name from bundle properties + * for given GlassFish server version. *

* @param version GlassFish server version used to pick up display name. * @return GlassFish JavaEE platform name related to given server version. */ private static String getDisplayName(final GlassFishVersion version) { final int ord = version.ordinal(); - if(ord >= GlassFishVersion.GF_7_0_0.ordinal()) { + if(ord >= GlassFishVersion.GF_8_0_0.ordinal()) { + return NbBundle.getMessage( + Hk2JavaEEPlatformFactory.class, "MSG_V800ServerPlatform"); + } else if(ord >= GlassFishVersion.GF_7_0_0.ordinal()) { return NbBundle.getMessage( Hk2JavaEEPlatformFactory.class, "MSG_V700ServerPlatform"); } else if(ord >= GlassFishVersion.GF_6_2_0.ordinal()) { @@ -137,15 +143,18 @@ private static String getDisplayName(final GlassFishVersion version) { } /** - * Get GlassFish JavaEE library name from bundle properties for given - * GlassFish server version. + * Get GlassFish Java/Jakarta EE library name from bundle properties + * for given GlassFish server version. *

* @param version GlassFish server version used to pick up display name. * @return GlassFish JavaEE library name related to given server version. */ private static String getLibraryName(final GlassFishVersion version) { final int ord = version.ordinal(); - if (ord >= GlassFishVersion.GF_7_0_0.ordinal()) { + if (ord >= GlassFishVersion.GF_8_0_0.ordinal()) { + return NbBundle.getMessage( + Hk2JavaEEPlatformFactory.class, "LBL_V800ServerLibraries"); + } else if (ord >= GlassFishVersion.GF_7_0_0.ordinal()) { return NbBundle.getMessage( Hk2JavaEEPlatformFactory.class, "LBL_V700ServerLibraries"); } else if (ord >= GlassFishVersion.GF_6_2_0.ordinal()) { @@ -180,7 +189,7 @@ private static String getLibraryName(final GlassFishVersion version) { } /** - * Get GlassFish JavaEE platform lookup key for given GlassFish + * Get GlassFish Java/Jakarta EE platform lookup key for given GlassFish * server version. *

* @param version GlassFish server version used to pick up lookup key. @@ -188,7 +197,9 @@ private static String getLibraryName(final GlassFishVersion version) { */ private static String getLookupKey(final GlassFishVersion version) { final int ord = version.ordinal(); - if (ord >= GlassFishVersion.GF_7_0_0.ordinal()){ + if (ord >= GlassFishVersion.GF_8_0_0.ordinal()){ + return V8_LOOKUP_KEY; + } else if (ord >= GlassFishVersion.GF_7_0_0.ordinal()){ return V7_LOOKUP_KEY; } else if (ord >= GlassFishVersion.GF_6_1_0.ordinal()){ return V610_LOOKUP_KEY; diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java index d29747dbd459..8004397d7096 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JavaEEPlatformImpl.java @@ -210,6 +210,10 @@ public static Profile[] nbJavaEEProfiles( break; case v10_0_0: profiles[index++] = Profile.JAKARTA_EE_10_FULL; break; + case v11_0_0_web: profiles[index++] = Profile.JAKARTA_EE_11_WEB; + break; + case v11_0_0: profiles[index++] = Profile.JAKARTA_EE_11_FULL; + break; } } else { profiles = new Profile[0]; diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java index 7d71e63b5cf4..b07ff5ac8c7b 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JaxWsStack.java @@ -73,33 +73,21 @@ public JaxWs get() { @Override public WSStackVersion getVersion() { Set supportedProfiles = platform.getSupportedProfiles(); - if (supportedProfiles.contains(Profile.JAKARTA_EE_10_FULL) - || supportedProfiles.contains(Profile.JAKARTA_EE_10_WEB) - || supportedProfiles.contains(Profile.JAKARTA_EE_9_1_FULL) - || supportedProfiles.contains(Profile.JAKARTA_EE_9_1_WEB) - || supportedProfiles.contains(Profile.JAKARTA_EE_9_FULL) - || supportedProfiles.contains(Profile.JAKARTA_EE_9_WEB) - || supportedProfiles.contains(Profile.JAKARTA_EE_8_FULL) - || supportedProfiles.contains(Profile.JAKARTA_EE_8_WEB) - || supportedProfiles.contains(Profile.JAVA_EE_8_FULL) - || supportedProfiles.contains(Profile.JAVA_EE_8_WEB) - || supportedProfiles.contains(Profile.JAVA_EE_7_FULL) - || supportedProfiles.contains(Profile.JAVA_EE_7_WEB) - || supportedProfiles.contains(Profile.JAVA_EE_6_FULL) - || supportedProfiles.contains(Profile.JAVA_EE_6_WEB)) { - // gfv3ee6 GF id - if (isMetroInstalled()) { - return WSStackVersion.valueOf(2, 2, 0, 0); - } - return WSStackVersion.valueOf(2, 1, 4, 1); - } - else { - // gfv3 GF id - if (isMetroInstalled()) { + + for (Profile profile : supportedProfiles) { + if (profile.isAtLeast(Profile.JAVA_EE_6_WEB)) { + // gfv3ee6 GF id + if (isMetroInstalled()) { + return WSStackVersion.valueOf(2, 2, 0, 0); + } return WSStackVersion.valueOf(2, 1, 4, 1); } - return WSStackVersion.valueOf(2, 1, 3, 0); } + // gfv3 GF id + if (isMetroInstalled()) { + return WSStackVersion.valueOf(2, 1, 4, 1); + } + return WSStackVersion.valueOf(2, 1, 3, 0); } @Override diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java index cf0e55097954..9b0699d1e442 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2JpaSupportImpl.java @@ -51,16 +51,18 @@ private static class JpaSupportVector { * @param jpa_2_2 JPA 2.2 supported. * @param jpa_3_0 JPA 3.0 supported. * @param jpa_3_1 JPA 3.1 supported. + * @param jpa_3_2 JPA 3.2 supported. */ JpaSupportVector(boolean jpa_1_0, boolean jpa_2_0, boolean jpa_2_1, boolean jpa_2_2, - boolean jpa_3_0, boolean jpa_3_1) { + boolean jpa_3_0, boolean jpa_3_1, boolean jpa_3_2) { _1_0 = jpa_1_0; _2_0 = jpa_2_0; _2_1 = jpa_2_1; _2_2 = jpa_2_2; _3_0 = jpa_3_0; _3_1 = jpa_3_1; + _3_2 = jpa_3_2; } /** JPA 1.0 supported. */ @@ -80,6 +82,9 @@ private static class JpaSupportVector { /** JPA 3.1 supported. */ boolean _3_1; + + /** JPA 3.2 supported. */ + boolean _3_2; } //////////////////////////////////////////////////////////////////////////// @@ -95,14 +100,15 @@ private static class JpaSupportVector { /** * GlassFish JPA support matrix:

* - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
GlassFishJPA 1.0JPA 2.0JPA 2.1JPA 2.2JPA 3.0JPA 3.1
V1YESNONONONONO
V2YESNONONONONO
V3YESYESNONONONO
V4YESYESYESNONONO
V5YESYESYESYESNONO
V6NONONONOYESNO
V7NONONONOYESYES
JPA 2.2JPA 3.0JPA 3.1JPA 3.2
V1YESNONONONONONO
V2YESNONONONONONO
V3YESYESNONONONONO
V4YESYESYESNONONONO
V5YESYESYESYESNONONO
V6NONONONOYESNONO
V7NONONONOYESYESNO
V8NONONONOYESYESYES
*/ private static final JpaSupportVector jpaSupport[] @@ -117,7 +123,8 @@ private static class JpaSupportVector { GlassFishVersion.lt(version, GlassFishVersion.GF_6) && GlassFishVersion.ge(version, GlassFishVersion.GF_4), GlassFishVersion.lt(version, GlassFishVersion.GF_6) && GlassFishVersion.ge(version, GlassFishVersion.GF_5), GlassFishVersion.lt(version, GlassFishVersion.GF_7_0_0) && GlassFishVersion.ge(version, GlassFishVersion.GF_6), - GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0) + GlassFishVersion.lt(version, GlassFishVersion.GF_8_0_0) && GlassFishVersion.ge(version, GlassFishVersion.GF_7_0_0), + GlassFishVersion.ge(version, GlassFishVersion.GF_8_0_0) ); } } @@ -196,7 +203,8 @@ public JpaProvider getDefaultProvider() { instanceJpaSupport._2_1, instanceJpaSupport._2_2, instanceJpaSupport._3_0, - instanceJpaSupport._3_1); + instanceJpaSupport._3_1, + instanceJpaSupport._3_2); } } return defaultProvider; diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java index cddb782fcd35..8fb55ba79adf 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java @@ -103,6 +103,12 @@ public static Hk2OptionalFactory createJakartaEe10() { return null == t ? null : new Hk2OptionalFactory(Hk2DeploymentFactory.createJakartaEe10(), t, true); } + + public static Hk2OptionalFactory createJakartaEe11() { + ServerUtilities t = ServerUtilities.getJakartaEe11Utilities(); + return null == t ? null : new Hk2OptionalFactory(Hk2DeploymentFactory.createJakartaEe11(), + t, true); + } @Override public StartServer getStartServer(DeploymentManager dm) { diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java index ae15f4e28b14..3e77dc5538b5 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/JavaEEServerModuleFactory.java @@ -183,6 +183,7 @@ private static boolean ensureEclipseLinkSupport(String installRoot) { libraryList.add(ServerUtilities.fileToUrl(f)); } } + // TODO: add support for JPA 3.x File j2eeDoc = InstalledFileLocator.getDefault().locate( "docs/" + PERSISTENCE_JAVADOC, @@ -241,7 +242,8 @@ private static boolean ensureCometSupport(String installRoot) { {"jackson-asl", "jackson-core-asl", "jersey-bundle", "jersey-gf-bundle", "jersey-multipart", "jettison", "mimepull", "jsr311-api"}; //NOI18N private static final String[] JAXRS_LIBRARIES_31 = - {"jackson-core-asl", "jackson-jaxrs", "jackson-mapper-asl", "jersey-client", "jersey-core", JERSEY_GF_SERVER, "jersey-json", "jersey-multipart", "jettison", "mimepull"}; //NOI18N + {"jackson-core-asl", "jackson-jaxrs", "jackson-mapper-asl", "jersey-client", + "jersey-core", JERSEY_GF_SERVER, "jersey-json", "jersey-multipart", "jettison", "mimepull"}; //NOI18N private static final String JAVA_EE_6_LIB = "Java-EE-GlassFish-v3"; // NOI18N private static final String JAVA_EE_5_LIB = "Java-EE-GlassFish-v3-Prelude"; // NOI18N @@ -250,6 +252,7 @@ private static boolean ensureCometSupport(String installRoot) { private static final String JAKARTA_EE_8_JAVADOC = "jakartaee8-doc-api.jar"; // NOI18N private static final String JAKARTA_EE_9_JAVADOC = "jakartaee9-doc-api.jar"; // NOI18N private static final String JAKARTA_EE_10_JAVADOC = "jakartaee10-doc-api.jar"; // NOI18N + private static final String JAKARTA_EE_11_JAVADOC = "jakartaee11-doc-api.jar"; // NOI18N private static boolean ensureGlassFishApiSupport(GlassFishServer server) { String installRoot = server.getServerRoot(); @@ -263,7 +266,11 @@ private static boolean ensureGlassFishApiSupport(GlassFishServer server) { } File j2eeDoc; - if (GlassFishVersion.ge(server.getVersion(), GlassFishVersion.GF_7_0_0)) { + if (GlassFishVersion.ge(server.getVersion(), GlassFishVersion.GF_8_0_0)) { + j2eeDoc = InstalledFileLocator.getDefault().locate( + "docs/" + JAKARTA_EE_11_JAVADOC, + Hk2LibraryProvider.JAVAEE_DOC_CODE_BASE, false); + } else if (GlassFishVersion.ge(server.getVersion(), GlassFishVersion.GF_7_0_0)) { j2eeDoc = InstalledFileLocator.getDefault().locate( "docs/" + JAKARTA_EE_10_JAVADOC, Hk2LibraryProvider.JAVAEE_DOC_CODE_BASE, false); diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java index 5ae0f41df8e6..15f63d844e5a 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/RunTimeDDCatalog.java @@ -150,6 +150,8 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_9.xsd" , "application_9", "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application-client_10.xsd" , "application-client_10", "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_10.xsd" , "application_10", + "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application-client_11.xsd" , "application-client_11", + "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_11.xsd" , "application_11", "SCHEMA:http://java.sun.com/xml/ns/j2ee/jax-rpc-ri-config.xsd" , "jax-rpc-ri-config", "SCHEMA:http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" , "connector_1_5", "SCHEMA:http://java.sun.com/xml/ns/javaee/connector_1_6.xsd" , "connector_1_6", @@ -178,11 +180,13 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead "SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd" , "orm_2_2", "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_0.xsd" , "orm_3_0", "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_1.xsd" , "orm_3_1", + "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_2.xsd" , "orm_3_2", "SCHEMA:http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" , "persistence_1_0", "SCHEMA:http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" , "persistence_2_0", "SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" , "persistence_2_1", "SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd" , "persistence_2_2", "SCHEMA:https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd" , "persistence_3_0", + "SCHEMA:https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd" , "persistence_3_2", }; private static final String JavaEE6SchemaToURLMap[] = { @@ -501,6 +505,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String APP_10= JAKARTAEE_NS+"/"+APP_10_XSD; // NOI18N public static final String APP_10_ID = "SCHEMA:"+APP_10; // NOI18N + private static final String APP_11_XSD="application_11.xsd"; // NOI18N + private static final String APP_11= JAKARTAEE_NS+"/"+APP_11_XSD; // NOI18N + public static final String APP_11_ID = "SCHEMA:"+APP_11; // NOI18N + private static final String APPCLIENT_TAG="application-client"; //NOI18N private static final String APPCLIENT_1_4_XSD="application-client_1_4.xsd"; // NOI18N private static final String APPCLIENT_1_4= J2EE_NS+"/"+APPCLIENT_1_4_XSD; // NOI18N @@ -529,6 +537,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String APPCLIENT_10_XSD="application-client_10.xsd"; // NOI18N private static final String APPCLIENT_10= JAKARTAEE_NS+"/"+APPCLIENT_10_XSD; // NOI18N public static final String APPCLIENT_10_ID = "SCHEMA:"+APPCLIENT_10; // NOI18N + + private static final String APPCLIENT_11_XSD="application-client_11.xsd"; // NOI18N + private static final String APPCLIENT_11= JAKARTAEE_NS+"/"+APPCLIENT_11_XSD; // NOI18N + public static final String APPCLIENT_11_ID = "SCHEMA:"+APPCLIENT_11; // NOI18N private static final String WEBSERVICES_TAG="webservices"; //NOI18N private static final String WEBSERVICES_1_1_XSD="j2ee_web_services_1_1.xsd"; // NOI18N @@ -635,6 +647,18 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String WEBFRAGMENT_6_0_XSD="web-fragment_6_0.xsd"; // NOI18N private static final String WEBFRAGMENT_6_0 = JAKARTAEE_NS+"/"+WEBFRAGMENT_6_0_XSD; // NOI18N public static final String WEBFRAGMENT_6_0_ID = "SCHEMA:"+WEBFRAGMENT_6_0; // NOI18N + + private static final String WEBAPP_6_1_XSD="web-app_6_1.xsd"; // NOI18N + private static final String WEBAPP_6_1 = JAKARTAEE_NS+"/"+WEBAPP_6_1_XSD; // NOI18N + public static final String WEBAPP_6_1_ID = "SCHEMA:"+WEBAPP_6_1; // NOI18N + + private static final String WEBCOMMON_6_1_XSD="web-common_6_1.xsd"; // NOI18N + private static final String WEBCOMMON_6_1 = JAKARTAEE_NS+"/"+WEBCOMMON_6_1_XSD; // NOI18N + public static final String WEBCOMMON_6_1_ID = "SCHEMA:"+WEBCOMMON_6_1; // NOI18N + + private static final String WEBFRAGMENT_6_1_XSD="web-fragment_6_1.xsd"; // NOI18N + private static final String WEBFRAGMENT_6_1 = JAKARTAEE_NS+"/"+WEBFRAGMENT_6_1_XSD; // NOI18N + public static final String WEBFRAGMENT_6_1_ID = "SCHEMA:"+WEBFRAGMENT_6_1; // NOI18N public static final String PERSISTENCE_NS = "http://java.sun.com/xml/ns/persistence"; // NOI18N public static final String NEW_PERSISTENCE_NS = "http://xmlns.jcp.org/xml/ns/persistence"; // NOI18N @@ -666,6 +690,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String PERSISTENCE_3_1 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_1_XSD; // NOI18N public static final String PERSISTENCE_3_1_ID = "SCHEMA:"+PERSISTENCE_3_1; // NOI18N + private static final String PERSISTENCE_3_2_XSD="persistence_3_2.xsd"; // NOI18N + private static final String PERSISTENCE_3_2 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_2_XSD; // NOI18N + public static final String PERSISTENCE_3_2_ID = "SCHEMA:"+PERSISTENCE_3_2; // NOI18N + public static final String PERSISTENCEORM_NS = "http://java.sun.com/xml/ns/persistence/orm"; // NOI18N public static final String NEW_PERSISTENCEORM_NS = "http://xmlns.jcp.org/xml/ns/persistence/orm"; // NOI18N public static final String JAKARTA_PERSISTENCEORM_NS = "https://jakarta.ee/xml/ns/persistence/orm"; // NOI18N @@ -696,6 +724,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String PERSISTENCEORM_3_1 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_1_XSD; // NOI18N yes not ORM NS!!! public static final String PERSISTENCEORM_3_1_ID = "SCHEMA:"+PERSISTENCEORM_3_1; // NOI18N + private static final String PERSISTENCEORM_3_2_XSD="orm_3_2.xsd"; // NOI18N + private static final String PERSISTENCEORM_3_2 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_2_XSD; // NOI18N yes not ORM NS!!! + public static final String PERSISTENCEORM_3_2_ID = "SCHEMA:"+PERSISTENCEORM_3_2; // NOI18N + public String getFullURLFromSystemId(String systemId){ return null; @@ -776,6 +808,10 @@ else if ( systemId.endsWith(APP_1_4_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_10_XSD); } else if ( systemId.endsWith(APPCLIENT_10_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_10_XSD); + } else if ( systemId.endsWith(APP_11_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+APP_11_XSD); + } else if ( systemId.endsWith(APPCLIENT_11_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+APPCLIENT_11_XSD); } //web-app, web-common & web-fragment else if ( systemId.endsWith(WEBAPP_2_5_XSD)) { @@ -810,6 +846,12 @@ else if ( systemId.endsWith(WEBAPP_2_5_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_6_0_XSD); } else if ( systemId.endsWith(WEBCOMMON_6_0_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_6_0_XSD); + } else if ( systemId.endsWith(WEBAPP_6_1_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBAPP_6_1_XSD); + } else if ( systemId.endsWith(WEBFRAGMENT_6_1_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBFRAGMENT_6_1_XSD); + } else if ( systemId.endsWith(WEBCOMMON_6_1_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+WEBCOMMON_6_1_XSD); } //persistence & orm else if ( systemId.endsWith(PERSISTENCEORM_XSD)) { @@ -834,6 +876,12 @@ else if ( systemId.endsWith(PERSISTENCEORM_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_3_1_XSD); } else if ( systemId.endsWith(PERSISTENCE_3_0_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_3_0_XSD); + } else if ( systemId.endsWith(PERSISTENCEORM_3_2_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_3_2_XSD); + } else if ( systemId.endsWith(PERSISTENCEORM_3_2_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_3_2_XSD); + } else if ( systemId.endsWith(PERSISTENCE_3_2_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCE_3_2_XSD); } //webservice & webservice-client else if ( systemId.endsWith(WEBSERVICES_1_1_XSD)) { @@ -961,6 +1009,12 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-ejbjar2.1": // NOI18N inputSource = resolver.resolveEntity(EJBJAR_2_1_ID, ""); break; + case "text/x-dd-application11.0": // NOI18N + inputSource = resolver.resolveEntity(APP_11_ID, ""); + break; + case "text/x-dd-application10.0": // NOI18N + inputSource = resolver.resolveEntity(APP_10_ID, ""); + break; case "text/x-dd-application9.0": // NOI18N inputSource = resolver.resolveEntity(APP_9_ID, ""); break; @@ -979,6 +1033,12 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-application1.4": // NOI18N inputSource = resolver.resolveEntity(APP_1_4_ID, ""); break; + case "text/x-dd-client11.0": // NOI18N + inputSource = resolver.resolveEntity(APPCLIENT_11_ID, ""); + break; + case "text/x-dd-client10.0": // NOI18N + inputSource = resolver.resolveEntity(APPCLIENT_10_ID, ""); + break; case "text/x-dd-client9.0": // NOI18N inputSource = resolver.resolveEntity(APPCLIENT_9_ID, ""); break; @@ -997,6 +1057,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-client1.4": // NOI18N inputSource = resolver.resolveEntity(APPCLIENT_1_4_ID, ""); break; + case "text/x-dd-servlet6.1": // NOI18N + inputSource = resolver.resolveEntity(WEBAPP_6_1_ID, ""); + break; case "text/x-dd-servlet6.0": // NOI18N inputSource = resolver.resolveEntity(WEBAPP_6_0_ID, ""); break; @@ -1015,6 +1078,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-servlet2.5": // NOI18N inputSource = resolver.resolveEntity(WEBAPP_2_5_ID, ""); break; + case "text/x-dd-servlet-fragment6.1": // NOI18N + inputSource = resolver.resolveEntity(WEBFRAGMENT_6_1_ID, ""); + break; case "text/x-dd-servlet-fragment6.0": // NOI18N inputSource = resolver.resolveEntity(WEBFRAGMENT_6_0_ID, ""); break; @@ -1030,6 +1096,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-servlet-fragment3.0": // NOI18N inputSource = resolver.resolveEntity(WEBFRAGMENT_3_0_ID, ""); break; + case "text/x-persistence3.2": // NOI18N + inputSource = resolver.resolveEntity(PERSISTENCE_3_2_ID, ""); + break; case "text/x-persistence3.1": // NOI18N inputSource = resolver.resolveEntity(PERSISTENCE_3_1_ID, ""); break; @@ -1048,6 +1117,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-persistence1.0": // NOI18N inputSource = resolver.resolveEntity(PERSISTENCE_ID, ""); break; + case "text/x-orm3.2": // NOI18N + inputSource = resolver.resolveEntity(PERSISTENCEORM_3_2_ID, ""); + break; case "text/x-orm3.1": // NOI18N inputSource = resolver.resolveEntity(PERSISTENCEORM_3_1_ID, ""); break; diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml index 6cac2ce5dbc7..8e55afc6fcd9 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml @@ -407,13 +407,74 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -424,7 +485,7 @@ - + diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/nbdepjakartaee11.xml b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/nbdepjakartaee11.xml new file mode 100644 index 000000000000..a34755601895 --- /dev/null +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/nbdepjakartaee11.xml @@ -0,0 +1,54 @@ + + + + org/netbeans/modules/glassfish/common/resources/server + + + deployer:gfv800ee11 + + + + + / + contextRoot + + + diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java index c3e565544814..4a5c65f9fe21 100644 --- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java +++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java @@ -122,7 +122,9 @@ public enum GlassFishVersion { /** GlassFish 7.0.11 */ GF_7_0_11 ((short) 7, (short) 0, (short) 11, (short) 0, GlassFishVersion.GF_7_0_11_STR), /** GlassFish 7.0.12 */ - GF_7_0_12 ((short) 7, (short) 0, (short) 12, (short) 0, GlassFishVersion.GF_7_0_12_STR); + GF_7_0_12 ((short) 7, (short) 0, (short) 12, (short) 0, GlassFishVersion.GF_7_0_12_STR), + /** GlassFish 8.0.0 */ + GF_8_0_0 ((short) 8, (short) 0, (short) 0, (short) 0, GlassFishVersion.GF_8_0_0_STR); //////////////////////////////////////////////////////////////////////////// // Class attributes // //////////////////////////////////////////////////////////////////////////// @@ -338,6 +340,11 @@ public enum GlassFishVersion { /** Additional {@code String} representations of GF_7_0_12 value. */ static final String GF_7_0_12_STR_NEXT[] = {"7.0.12", "7.0.12.0"}; + /** A {@code String} representation of GF_8_0_0 value. */ + static final String GF_8_0_0_STR = "8.0.0"; + /** Additional {@code String} representations of GF_8_0_0 value. */ + static final String GF_8_0_0_STR_NEXT[] = {"8.0.0", "8.0.0.0"}; + /** * Stored String values for backward String * conversion. @@ -387,6 +394,7 @@ public enum GlassFishVersion { initStringValuesMapFromArray(GF_7_0_10, GF_7_0_10_STR_NEXT); initStringValuesMapFromArray(GF_7_0_11, GF_7_0_11_STR_NEXT); initStringValuesMapFromArray(GF_7_0_12, GF_7_0_12_STR_NEXT); + initStringValuesMapFromArray(GF_8_0_0, GF_8_0_0_STR_NEXT); } //////////////////////////////////////////////////////////////////////////// diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java index c5f273eaf522..0c219b68c0e8 100644 --- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java +++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/ConfigBuilderProvider.java @@ -179,6 +179,11 @@ public class ConfigBuilderProvider { = new Config.Next(GlassFishVersion.GF_7_0_12, ConfigBuilderProvider.class.getResource("GlassFishV7_0_9.xml")); + /** Library builder configuration since GlassFish 8.0.0. */ + private static final Config.Next CONFIG_V8_0_0 + = new Config.Next(GlassFishVersion.GF_8_0_0, + ConfigBuilderProvider.class.getResource("GlassFishV8_0_0.xml")); + /** Library builder configuration for GlassFish cloud. */ private static final Config config = new Config(CONFIG_V3, CONFIG_V4, CONFIG_V4_1, CONFIG_V5, @@ -189,7 +194,7 @@ public class ConfigBuilderProvider { CONFIG_V7_0_3, CONFIG_V7_0_4, CONFIG_V7_0_5, CONFIG_V7_0_6, CONFIG_V7_0_7, CONFIG_V7_0_8, CONFIG_V7_0_9, CONFIG_V7_0_10, CONFIG_V7_0_11, - CONFIG_V7_0_12); + CONFIG_V7_0_12, CONFIG_V8_0_0); /** Builders array for each server instance. */ private static final ConcurrentMap builders diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV8_0_0.xml b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV8_0_0.xml new file mode 100644 index 000000000000..02a55b5eef3e --- /dev/null +++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/GlassFishV8_0_0.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java index a9a6ad5e0037..b0b09be4e27f 100644 --- a/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java +++ b/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/server/config/JavaEEProfile.java @@ -84,7 +84,13 @@ public enum JavaEEProfile { v10_0_0_web(Version.v10_0_0, Type.WEB, "10.0.0-web"), /** JakartaEE 10 full profile. */ - v10_0_0(Version.v10_0_0, Type.FULL, "10.0.0"); + v10_0_0(Version.v10_0_0, Type.FULL, "10.0.0"), + + /** JakartaEE 11 web profile. */ + v11_0_0_web(Version.v11_0_0, Type.WEB, "11.0.0-web"), + + /** JakartaEE 11 full profile. */ + v11_0_0(Version.v11_0_0, Type.FULL, "11.0.0"); //////////////////////////////////////////////////////////////////////////// // Inner enums // @@ -144,7 +150,9 @@ public enum Version { /** JakartaEE 9.1. */ v9_1_0("9.1.0"), /** JakartaEE 10 */ - v10_0_0("10.0.0"); + v10_0_0("10.0.0"), + /** JakartaEE 11 */ + v11_0_0("11.0.0"); /** JavaEE profile type name. */ private final String name; diff --git a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java index 40cc86514e2b..b645fe348511 100644 --- a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java +++ b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/admin/AdminFactoryTest.java @@ -192,6 +192,32 @@ public void testGetInstanceforVersionGF7() { // Stored command entity should be the one we supplied. assertTrue(cmd.equals(runner.getCommand())); } + + /** + * Test factory functionality for GlassFish v. 8.0.0 + *

+ * Factory should initialize REST {@code Runner} and point it to + * provided {@code Command} instance. + */ + @Test + public void testGetInstanceforVersionGF8() { + GlassFishServerEntity srv = new GlassFishServerEntity(); + srv.setVersion(GlassFishVersion.GF_8_0_0); + AdminFactory af = AdminFactory.getInstance(srv.getVersion()); + assertTrue(af instanceof AdminFactoryRest); + Command cmd = new CommandVersion(); + Runner runner; + try { + runner = af.getRunner(srv, cmd); + } catch (GlassFishIdeException gfie) { + runner = null; + fail("Exception in Runner initialization: " + gfie.getMessage()); + } + // Returned runner should be REST interface. + assertTrue(runner instanceof RunnerRest); + // Stored command entity should be the one we supplied. + assertTrue(cmd.equals(runner.getCommand())); + } /** * Test factory functionality for GlassFish using REST administration diff --git a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java index 01e23d36ffc0..1fefda84c668 100644 --- a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java +++ b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersionTest.java @@ -123,6 +123,8 @@ public void testToValue() { GlassFishVersion.GF_7_0_11_STR_NEXT); verifyToValueFromAdditionalArray(GlassFishVersion.GF_7_0_12, GlassFishVersion.GF_7_0_12_STR_NEXT); + verifyToValueFromAdditionalArray(GlassFishVersion.GF_8_0_0, + GlassFishVersion.GF_8_0_0_STR_NEXT); } /** @@ -150,7 +152,7 @@ public void testToValueIncomplete() { GlassFishVersion.GF_7_0_6, GlassFishVersion.GF_7_0_7, GlassFishVersion.GF_7_0_8, GlassFishVersion.GF_7_0_9, GlassFishVersion.GF_7_0_10, GlassFishVersion.GF_7_0_11, - GlassFishVersion.GF_7_0_12 + GlassFishVersion.GF_7_0_12, GlassFishVersion.GF_8_0_0 }; String strings[] = { "1.0.1.4", "2.0.1.5", "2.1.0.3", "2.1.1.7", @@ -162,7 +164,7 @@ public void testToValueIncomplete() { "6.2.4.0", "6.2.5.0", "7.0.0.0", "7.0.1.0", "7.0.2.0", "7.0.3.0", "7.0.4.0", "7.0.5.0", "7.0.6.0", "7.0.7.0", "7.0.8.0", "7.0.9.0", - "7.0.10.0", "7.0.11.0", "7.0.12.0" + "7.0.10.0", "7.0.11.0", "7.0.12.0", "8.0.0.0" }; for (int i = 0; i < versions.length; i++) { GlassFishVersion version = GlassFishVersion.toValue(strings[i]); diff --git a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java index e293442659a6..31f01fba4235 100644 --- a/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java +++ b/enterprise/glassfish.tooling/test/unit/src/org/netbeans/modules/glassfish/tooling/utils/EnumUtilsTest.java @@ -22,6 +22,7 @@ import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_4; import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_6_2_5; import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_7_0_12; +import static org.netbeans.modules.glassfish.tooling.data.GlassFishVersion.GF_8_0_0; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; import org.testng.annotations.Test; @@ -47,6 +48,8 @@ public class EnumUtilsTest { */ @Test public void testEq() { + assertFalse(EnumUtils.eq(GF_8_0_0, GF_7_0_12), "Equals for a > b shall be false."); + assertTrue(EnumUtils.eq(GF_8_0_0, GF_8_0_0), "Equals for a == b shall be true."); assertFalse(EnumUtils.eq(GF_7_0_12, GF_6_2_5), "Equals for a > b shall be false."); assertTrue(EnumUtils.eq(GF_7_0_12, GF_7_0_12), "Equals for a == b shall be true."); assertFalse(EnumUtils.eq(GF_4, GF_3), "Equals for a > b shall be false."); @@ -69,6 +72,8 @@ public void testEq() { */ @Test public void testNe() { + assertTrue(EnumUtils.ne(GF_8_0_0, GF_7_0_12), "Not equals for a > b shall be true."); + assertFalse(EnumUtils.ne(GF_8_0_0, GF_8_0_0), "Not equals for a == b shall be false."); assertTrue(EnumUtils.ne(GF_7_0_12, GF_6_2_5), "Not equals for a > b shall be true."); assertFalse(EnumUtils.ne(GF_7_0_12, GF_7_0_12), "Not equals for a == b shall be false."); assertTrue(EnumUtils.ne(GF_4, GF_3), "Not equals for a > b shall be true."); @@ -91,6 +96,8 @@ public void testNe() { */ @Test public void testLt() { + assertFalse(EnumUtils.lt(GF_8_0_0, GF_7_0_12), "Less than for a > b shall be false."); + assertFalse(EnumUtils.lt(GF_8_0_0, GF_8_0_0), "Less than for a == b shall be false."); assertFalse(EnumUtils.lt(GF_7_0_12, GF_6_2_5), "Less than for a > b shall be false."); assertFalse(EnumUtils.lt(GF_7_0_12, GF_7_0_12), "Less than for a == b shall be false."); assertFalse(EnumUtils.lt(GF_4, GF_3), "Less than for a > b shall be false."); @@ -113,6 +120,8 @@ public void testLt() { */ @Test public void testLe() { + assertFalse(EnumUtils.le(GF_8_0_0, GF_7_0_12), "Less than or equal for a > b shall be false."); + assertTrue(EnumUtils.le(GF_8_0_0, GF_8_0_0), "Less than or equal for a == b shall be true."); assertFalse(EnumUtils.le(GF_7_0_12, GF_6_2_5), "Less than or equal for a > b shall be false."); assertTrue(EnumUtils.le(GF_7_0_12, GF_7_0_12), "Less than or equal for a == b shall be true."); assertFalse(EnumUtils.le(GF_4, GF_3), "Less than or equal for a > b shall be false."); @@ -135,6 +144,8 @@ public void testLe() { */ @Test public void testGt() { + assertTrue(EnumUtils.gt(GF_8_0_0, GF_7_0_12), "Greater than for a > b shall be true."); + assertFalse(EnumUtils.gt(GF_8_0_0, GF_8_0_0), "Greater than for a == b shall be false."); assertTrue(EnumUtils.gt(GF_7_0_12, GF_6_2_5), "Greater than for a > b shall be true."); assertFalse(EnumUtils.gt(GF_7_0_12, GF_7_0_12), "Greater than for a == b shall be false."); assertTrue(EnumUtils.gt(GF_4, GF_3), "Greater than for a > b shall be true."); @@ -157,6 +168,8 @@ public void testGt() { */ @Test public void testGe() { + assertTrue(EnumUtils.ge(GF_8_0_0, GF_7_0_12), "Greater than or equal for a > b shall be true."); + assertTrue(EnumUtils.ge(GF_8_0_0, GF_8_0_0), "Greater than or equal for a == b shall be true."); assertTrue(EnumUtils.ge(GF_7_0_12, GF_6_2_5), "Greater than or equal for a > b shall be true."); assertTrue(EnumUtils.ge(GF_7_0_12, GF_7_0_12), "Greater than or equal for a == b shall be true."); assertTrue(EnumUtils.ge(GF_4, GF_3), "Greater than or equal for a > b shall be true."); diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java index 5ed63c58b0e3..fc9c65609541 100644 --- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java +++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java @@ -55,12 +55,14 @@ public class GradleJavaEEProjectSettings implements JavaEEProjectSettingsImpleme static final Map PROFILE_DEPENDENCIES = new LinkedHashMap<>(); static { - PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:10.*", JAKARTA_EE_10_FULL); - PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:10.*", JAKARTA_EE_10_WEB); - PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:9.*", JAKARTA_EE_9_FULL); - PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:9.*", JAKARTA_EE_9_WEB); - PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:8.*", JAKARTA_EE_8_FULL); - PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:8.*", JAKARTA_EE_8_WEB); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:11.*", JAKARTA_EE_11_FULL); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:11.*", JAKARTA_EE_11_WEB); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:10.*", JAKARTA_EE_10_FULL); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:10.*", JAKARTA_EE_10_WEB); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:9.*", JAKARTA_EE_9_FULL); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:9.*", JAKARTA_EE_9_WEB); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-api:8.*", JAKARTA_EE_8_FULL); + PROFILE_DEPENDENCIES.put("jakarta.platform:jakarta.jakartaee-web-api:8.*", JAKARTA_EE_8_WEB); PROFILE_DEPENDENCIES.put("javax:javaee-api:8.*", JAVA_EE_8_FULL); PROFILE_DEPENDENCIES.put("javax:javaee-web-api:8.*", JAVA_EE_8_WEB); PROFILE_DEPENDENCIES.put("javax:javaee-api:7.*", JAVA_EE_7_FULL); diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java index d16a78ca615b..ecbfba272074 100644 --- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java +++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java @@ -157,14 +157,14 @@ private void cbServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS if (profile == Profile.JAVA_EE_6_FULL || profile == Profile.JAVA_EE_7_FULL || profile == Profile.JAVA_EE_8_FULL || profile == Profile.JAKARTA_EE_8_FULL || profile == Profile.JAKARTA_EE_9_FULL || profile == Profile.JAKARTA_EE_9_1_FULL - || profile == Profile.JAKARTA_EE_10_FULL) { + || profile == Profile.JAKARTA_EE_10_FULL || profile == Profile.JAKARTA_EE_11_FULL) { continue; } } else { if (profile == Profile.JAVA_EE_6_WEB || profile == Profile.JAVA_EE_7_WEB || profile == Profile.JAVA_EE_8_WEB || profile == Profile.JAKARTA_EE_8_WEB || profile == Profile.JAKARTA_EE_9_WEB || profile == Profile.JAKARTA_EE_9_1_WEB - || profile == Profile.JAKARTA_EE_10_WEB) { + || profile == Profile.JAKARTA_EE_10_WEB || profile == Profile.JAKARTA_EE_11_WEB) { continue; } } diff --git a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java index 040515721bb4..c02263e1cad2 100644 --- a/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java +++ b/enterprise/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java @@ -109,6 +109,12 @@ public String getLicensePath() { private static List webDependencies(String profileId) { Profile profile = Profile.fromPropertiesString(profileId); List ret = new LinkedList<>(); + if (profile == Profile.JAKARTA_EE_11_WEB) { + ret.add("providedCompile 'jakarta.platform:jakarta.jakartaee-web-api:11.0.0'"); + } + if (profile == Profile.JAKARTA_EE_11_FULL) { + ret.add("providedCompile 'jakarta.platform:jakarta.jakartaee-api:11.0.0'"); + } if (profile == Profile.JAKARTA_EE_10_WEB) { ret.add("providedCompile 'jakarta.platform:jakarta.jakartaee-web-api:10.0.0'"); } diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java index 16aabf4f5afc..2aea1b1edc1f 100644 --- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java +++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/AppClientProvider.java @@ -351,24 +351,32 @@ public String getModuleVersion() { if (p == null) { return AppClient.VERSION_6_0; } - if (Profile.JAKARTA_EE_10_FULL.equals(p) || Profile.JAKARTA_EE_10_WEB.equals(p)) { - return AppClient.VERSION_10_0; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(p) || Profile.JAKARTA_EE_9_1_WEB.equals(p)) { - return AppClient.VERSION_9_0; - } else if (Profile.JAKARTA_EE_9_FULL.equals(p) || Profile.JAKARTA_EE_9_WEB.equals(p)) { - return AppClient.VERSION_9_0; - } else if (Profile.JAKARTA_EE_8_FULL.equals(p) || Profile.JAKARTA_EE_8_FULL.equals(p)) { - return AppClient.VERSION_8_0; - } else if (Profile.JAVA_EE_8_FULL.equals(p) || Profile.JAVA_EE_8_WEB.equals(p)) { - return AppClient.VERSION_8_0; - } else if (Profile.JAVA_EE_7_FULL.equals(p) || Profile.JAVA_EE_7_WEB.equals(p)) { - return AppClient.VERSION_7_0; - } else if (Profile.JAVA_EE_5.equals(p)) { - return AppClient.VERSION_5_0; - } else if (Profile.J2EE_14.equals(p)) { - return AppClient.VERSION_1_4; - } else { - return AppClient.VERSION_6_0; + switch (p) { + case JAKARTA_EE_11_FULL: + case JAKARTA_EE_11_WEB: + return AppClient.VERSION_11_0; + case JAKARTA_EE_10_FULL: + case JAKARTA_EE_10_WEB: + return AppClient.VERSION_10_0; + case JAKARTA_EE_9_1_FULL: + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_FULL: + case JAKARTA_EE_9_WEB: + return AppClient.VERSION_9_0; + case JAKARTA_EE_8_FULL: + case JAKARTA_EE_8_WEB: + case JAVA_EE_8_FULL: + case JAVA_EE_8_WEB: + return AppClient.VERSION_8_0; + case JAVA_EE_7_FULL: + case JAVA_EE_7_WEB: + return AppClient.VERSION_7_0; + case JAVA_EE_5: + return AppClient.VERSION_5_0; + case J2EE_14: + return AppClient.VERSION_1_4; + default: + return AppClient.VERSION_6_0; } } diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java index 3db60b9f55e6..ccebb909b204 100644 --- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java +++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/api/AppClientProjectGenerator.java @@ -160,26 +160,44 @@ private static AntProjectHelper createProjectImpl(final AppClientProjectCreateDa // create application-client.xml String resource; - if(j2eeProfile == null) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_10_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_10_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_1_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_9_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_8_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_8_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N - } else if (Profile.JAVA_EE_8_FULL.equals(j2eeProfile) || Profile.JAVA_EE_8_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N - } else if (Profile.JAVA_EE_7_FULL.equals(j2eeProfile) || Profile.JAVA_EE_7_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N - } else if (Profile.JAVA_EE_5.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N - } else if (Profile.J2EE_14.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N - } else { + if(null == j2eeProfile) { resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N + } else { + switch (j2eeProfile) { + case JAKARTA_EE_11_FULL: + case JAKARTA_EE_11_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-11.xml"; // NOI18N + break; + case JAKARTA_EE_10_FULL: + case JAKARTA_EE_10_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N + break; + case JAKARTA_EE_9_1_FULL: + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_FULL: + case JAKARTA_EE_9_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N + break; + case JAKARTA_EE_8_FULL: + case JAKARTA_EE_8_WEB: + case JAVA_EE_8_FULL: + case JAVA_EE_8_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N + break; + case JAVA_EE_7_FULL: + case JAVA_EE_7_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N + break; + case JAVA_EE_5: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N + break; + case J2EE_14: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N + break; + default: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N + break; + } } FileObject foSource = FileUtil.getConfigFile(resource); FileObject ddFile = FileUtil.copyFile(foSource, confRoot, "application-client"); //NOI18N @@ -389,26 +407,44 @@ public Void run() throws Exception { } else { // XXX just temporary, since now the import would fail due to another bug String resource; - if (j2eeProfile == null) { + if (null == j2eeProfile) { resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_10_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_10_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_1_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_9_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_9_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N - } else if (Profile.JAKARTA_EE_8_FULL.equals(j2eeProfile) || Profile.JAKARTA_EE_8_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N - } else if (Profile.JAVA_EE_8_FULL.equals(j2eeProfile) || Profile.JAVA_EE_8_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N - } else if (Profile.JAVA_EE_7_FULL.equals(j2eeProfile) || Profile.JAVA_EE_7_WEB.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N - } else if (Profile.JAVA_EE_5.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N - } else if (Profile.J2EE_14.equals(j2eeProfile)) { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N } else { - resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N + switch (j2eeProfile) { + case JAKARTA_EE_11_FULL: + case JAKARTA_EE_11_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-11.xml"; // NOI18N + break; + case JAKARTA_EE_10_FULL: + case JAKARTA_EE_10_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-10.xml"; // NOI18N + break; + case JAKARTA_EE_9_1_FULL: + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_FULL: + case JAKARTA_EE_9_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-9.xml"; // NOI18N + break; + case JAKARTA_EE_8_FULL: + case JAKARTA_EE_8_WEB: + case JAVA_EE_8_FULL: + case JAVA_EE_8_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-8.xml"; // NOI18N + break; + case JAVA_EE_7_FULL: + case JAVA_EE_7_WEB: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-7.xml"; // NOI18N + break; + case JAVA_EE_5: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-5.xml"; // NOI18N + break; + case J2EE_14: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-1.4.xml"; // NOI18N + break; + default: + resource = "org-netbeans-modules-j2ee-clientproject/application-client-6.xml"; // NOI18N + break; + } } FileUtil.copyFile(FileUtil.getConfigFile(resource), confFolderFO, "application-client"); //NOI18N diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java index 1a726e094bcb..026e3ea28c5a 100644 --- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java +++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/customizer/AppClientProjectProperties.java @@ -323,16 +323,30 @@ private void init() { PLATFORM_LIST_RENDERER = PlatformUiSupport.createPlatformListCellRenderer(); SpecificationVersion minimalSourceLevel = null; Profile profile = Profile.fromPropertiesString(evaluator.getProperty(J2EE_PLATFORM)); - if (Profile.JAKARTA_EE_9_1_FULL.equals(profile) || Profile.JAKARTA_EE_10_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("11"); - } else if (Profile.JAKARTA_EE_8_FULL.equals(profile) || Profile.JAVA_EE_8_FULL.equals(profile) || Profile.JAKARTA_EE_9_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.8"); - } else if (Profile.JAVA_EE_7_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.7"); - } else if (Profile.JAVA_EE_6_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.6"); - } else if (Profile.JAVA_EE_5.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.5"); + switch (profile) { + case JAKARTA_EE_11_FULL: + minimalSourceLevel = new SpecificationVersion("21"); + break; + case JAKARTA_EE_9_1_FULL: + case JAKARTA_EE_10_FULL: + minimalSourceLevel = new SpecificationVersion("11"); + break; + case JAKARTA_EE_8_FULL: + case JAVA_EE_8_FULL: + case JAKARTA_EE_9_FULL: + minimalSourceLevel = new SpecificationVersion("1.8"); + break; + case JAVA_EE_7_FULL: + minimalSourceLevel = new SpecificationVersion("1.7"); + break; + case JAVA_EE_6_FULL: + minimalSourceLevel = new SpecificationVersion("1.6"); + break; + case JAVA_EE_5: + minimalSourceLevel = new SpecificationVersion("1.5"); + break; + default: + break; } JAVAC_SOURCE_MODEL = PlatformUiSupport.createSourceLevelComboBoxModel(PLATFORM_MODEL, evaluator.getProperty(JAVAC_SOURCE), evaluator.getProperty(JAVAC_TARGET), minimalSourceLevel); JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer (); diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java index 84e1b584ec60..6a09706ecd45 100644 --- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java +++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/wsclient/AppClientProjectJAXWSClientSupport.java @@ -90,36 +90,35 @@ protected FileObject getXmlArtifactsRoot() { protected String getProjectJavaEEVersion() { Car j2eeClientModule = Car.getCar(project.getProjectDirectory()); if (j2eeClientModule != null) { - if (Profile.JAVA_EE_6_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_6_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_7_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_7_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_8_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAVA_EE_8_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAKARTA_EE_8_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_8_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_9_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_1_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_10_WEB.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAKARTA_EE_10_FULL.equals(j2eeClientModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAVA_EE_5.equals(j2eeClientModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_15; + switch (j2eeClientModule.getJ2eeProfile()) { + case JAVA_EE_6_WEB: + case JAVA_EE_6_FULL: + return JAVA_EE_VERSION_16; + case JAVA_EE_7_WEB: + case JAVA_EE_7_FULL: + return JAVA_EE_VERSION_17; + case JAVA_EE_8_WEB: + case JAVA_EE_8_FULL: + return JAVA_EE_VERSION_18; + case JAKARTA_EE_8_WEB: + case JAKARTA_EE_8_FULL: + return JAKARTA_EE_VERSION_8; + case JAKARTA_EE_9_WEB: + case JAKARTA_EE_9_FULL: + return JAKARTA_EE_VERSION_9; + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_1_FULL: + return JAKARTA_EE_VERSION_91; + case JAKARTA_EE_10_WEB: + case JAKARTA_EE_10_FULL: + return JAKARTA_EE_VERSION_10; + case JAKARTA_EE_11_WEB: + case JAKARTA_EE_11_FULL: + return JAKARTA_EE_VERSION_11; + case JAVA_EE_5: + return JAVA_EE_VERSION_15; + default: + break; } } return JAVA_EE_VERSION_NONE; diff --git a/enterprise/j2ee.common/licenseinfo.xml b/enterprise/j2ee.common/licenseinfo.xml index b42331580466..60333ee39d25 100644 --- a/enterprise/j2ee.common/licenseinfo.xml +++ b/enterprise/j2ee.common/licenseinfo.xml @@ -28,10 +28,12 @@ src/org/netbeans/modules/j2ee/common/dd/resources/beans-2.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/beans-3.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.0.xml + src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/constraint.xml src/org/netbeans/modules/j2ee/common/dd/resources/constraint-1.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/constraint-2.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.0.xml + src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/ear-1.3.xml src/org/netbeans/modules/j2ee/common/dd/resources/ear-1.4.xml src/org/netbeans/modules/j2ee/common/dd/resources/ear-5.xml @@ -40,10 +42,12 @@ src/org/netbeans/modules/j2ee/common/dd/resources/ear-8.xml src/org/netbeans/modules/j2ee/common/dd/resources/ear-9.xml src/org/netbeans/modules/j2ee/common/dd/resources/ear-10.xml + src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml src/org/netbeans/modules/j2ee/common/dd/resources/validation.xml src/org/netbeans/modules/j2ee/common/dd/resources/validation-1.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/validation-2.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.0.xml + src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-2.3.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-2.4.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-2.5.xml @@ -52,11 +56,13 @@ src/org/netbeans/modules/j2ee/common/dd/resources/web-4.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-5.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-6.0.xml + src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-3.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-3.1.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-4.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-5.0.xml src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.0.xml + src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml test/unit/src/templates/Class.template test/unit/src/templates/Interface.template diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java index 9949940624ff..6fdcfd672e2d 100644 --- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilities.java @@ -35,7 +35,8 @@ import org.netbeans.modules.web.api.webmodule.WebModule; /** - * Facade allowing queries for certain capabilities provided by Java EE runtime. + * Facade allowing queries for certain capabilities provided by + * Java/Jakarta EE runtime. * * @author Petr Hejl * @since 1.58 @@ -91,86 +92,92 @@ public static J2eeProjectCapabilities forProject(@NonNull Project project) { /** * EJB 3.0 functionality is supported in EjbJar project which is targeting - * Java EE 5 or Java EE 6 platform. + * from Java EE 5 to Jakarta EE 8 platform. */ public boolean isEjb30Supported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean eeOk = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_5) || - ejbJarProfile.equals(Profile.JAVA_EE_6_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_7_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_8_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_FULL)); + boolean eeOk = ejbJarProfile != null && ejbJarProfile.isFullProfile() && + ejbJarProfile.isAtLeast(Profile.JAVA_EE_5) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_FULL); return J2eeModule.Type.EJB.equals(moduleType) && eeOk; } /** * EJB 3.1 functionality is supported in EjbJar and Web project which is targeting - * full Java EE 6 platform. + * full platform profiles from Java EE 6 to Jakarta EE 8 platform. * @return {@code true} if the project is targeting full Java EE 6 or newer platform */ public boolean isEjb31Supported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean ee6or7 = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_6_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_7_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_8_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_FULL)); + boolean ee6or7 = ejbJarProfile != null && ejbJarProfile.isFullProfile() && + ejbJarProfile.isAtLeast(Profile.JAVA_EE_6_FULL) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_FULL); return ee6or7 && (J2eeModule.Type.EJB.equals(moduleType) || J2eeModule.Type.WAR.equals(moduleType)); } /** - * EJB 3.1 Lite functionality is supported in Web project targeting Java EE 6 - * web profile or newer and wherever full EJB 3.1 is supported. + * EJB 3.1 Lite functionality is supported in Web projects targeting from + * Java EE 6 to Jakarta EE 8 web profile, and wherever full EJB 3.1 is supported. */ public boolean isEjb31LiteSupported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean ee6or7Web = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_6_WEB) || ejbJarProfile.equals(Profile.JAVA_EE_7_WEB) || ejbJarProfile.equals(Profile.JAVA_EE_8_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_WEB)); + boolean ee6or7Web = ejbJarProfile != null && + ejbJarProfile.isAtLeast(Profile.JAVA_EE_6_WEB) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_WEB); return isEjb31Supported() || (J2eeModule.Type.WAR.equals(moduleType) && ee6or7Web); } /** * EJB 3.2 functionality is supported in EjbJar and Web project which is targeting - * full Java EE or newer platform. + * full platform profiles from Java EE 7 to Jakarta EE 8 platform. * * @return {@code true} if the project is targeting full Java EE 7 or newer platform * @since 1.76 */ public boolean isEjb32Supported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean ee7 = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_7_FULL) || ejbJarProfile.equals(Profile.JAVA_EE_8_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_FULL)); + boolean ee7 = ejbJarProfile != null && ejbJarProfile.isFullProfile() && + ejbJarProfile.isAtLeast(Profile.JAVA_EE_7_FULL) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_FULL); return ee7 && (J2eeModule.Type.EJB.equals(moduleType) || J2eeModule.Type.WAR.equals(moduleType)); } /** - * EJB 3.2 Lite functionality is supported in Web project targeting Java EE 7 - * web profile and wherever full EJB 3.2 is supported. + * EJB 3.2 Lite functionality is supported in Web projects targeting from + * Java EE 7 to Jakarta EE 8 web profile, and wherever full EJB 3.2 is supported. * * @return {@code true} if the project is targeting full or web profile Java EE 7 or newer platform * @since 1.76 */ public boolean isEjb32LiteSupported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean ee7Web = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAVA_EE_7_WEB) || ejbJarProfile.equals(Profile.JAVA_EE_8_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_8_WEB)); + boolean ee7Web = ejbJarProfile != null && + ejbJarProfile.isAtLeast(Profile.JAVA_EE_7_WEB) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_8_WEB); return isEjb32Supported() || (J2eeModule.Type.WAR.equals(moduleType) && ee7Web); } /** * EJB 4.0 functionality is supported in EjbJar and Web project which is targeting - * full Jakarta EE 9/9.1 platform. + * full platform profiles from Jakarta EE 9 to Jakarta EE 11 platform. * * @return {@code true} if the project is targeting full Jakarta EE 9/9.1 or newer platform * @since 1.76 */ public boolean isEjb40Supported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean ee9 = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAKARTA_EE_9_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_9_1_FULL) || ejbJarProfile.equals(Profile.JAKARTA_EE_10_FULL)); + boolean ee9 = ejbJarProfile != null && ejbJarProfile.isFullProfile() && + ejbJarProfile.isAtLeast(Profile.JAKARTA_EE_9_FULL) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_11_FULL); return ee9 && (J2eeModule.Type.EJB.equals(moduleType) || J2eeModule.Type.WAR.equals(moduleType)); } /** - * EJB 4.0 Lite functionality is supported in Web project targeting Jakarta EE 9/9.1 - * web profile and wherever full EJB 4.0 is supported. + * EJB 4.0 Lite functionality is supported in Web projects targeting from + * Jakarta EE 9 to Jakarta EE 11 web profile, and wherever full EJB 4.0 is supported. * * @return {@code true} if the project is targeting full or web profile Jakarta EE 9/9.1 or newer platform * @since 1.76 */ public boolean isEjb40LiteSupported() { J2eeModule.Type moduleType = provider.getJ2eeModule().getType(); - boolean ee9Web = ejbJarProfile != null && (ejbJarProfile.equals(Profile.JAKARTA_EE_9_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_9_1_WEB) || ejbJarProfile.equals(Profile.JAKARTA_EE_10_WEB)); + boolean ee9Web = ejbJarProfile != null && + ejbJarProfile.isAtLeast(Profile.JAKARTA_EE_9_WEB) && ejbJarProfile.isAtMost(Profile.JAKARTA_EE_11_WEB); return isEjb40Supported() || (J2eeModule.Type.WAR.equals(moduleType) && ee9Web); } @@ -182,7 +189,7 @@ public boolean isEjb40LiteSupported() { public boolean isCdi10Supported() { return Profile.JAVA_EE_6_FULL.equals(ejbJarProfile) || Profile.JAVA_EE_6_WEB.equals(webProfile) || - Profile.JAVA_EE_6_FULL.equals(ejbJarProfile); + Profile.JAVA_EE_6_FULL.equals(carProfile); } /** @@ -242,6 +249,18 @@ public boolean isCdi40Supported() { || Profile.JAKARTA_EE_10_WEB.equals(webProfile) || Profile.JAKARTA_EE_10_FULL.equals(carProfile); } + + /** + * Is CDI 4.1 supported in this project? + * + * @return {@code true} if the project targets Jakarta EE 11 profile, + * {@code false} otherwise + */ + public boolean isCdi41Supported() { + return Profile.JAKARTA_EE_11_FULL.equals(ejbJarProfile) + || Profile.JAKARTA_EE_11_WEB.equals(webProfile) + || Profile.JAKARTA_EE_11_FULL.equals(carProfile); + } /** * Returns true if the server used by project supports EJB lite. diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java index ec0298a273be..c59d22b16300 100644 --- a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/DDHelper.java @@ -66,7 +66,9 @@ public static FileObject createWebXml(Profile j2eeProfile, FileObject dir) throw */ public static FileObject createWebXml(Profile j2eeProfile, boolean webXmlRequired, FileObject dir) throws IOException { String template = null; - if ((Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) && webXmlRequired) { + if ((Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) && webXmlRequired) { + template = "web-6.1.xml"; //NOI18N + } else if ((Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) && webXmlRequired) { template = "web-6.0.xml"; //NOI18N } else if ((Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile || Profile.JAKARTA_EE_9_FULL == j2eeProfile || Profile.JAKARTA_EE_9_WEB == j2eeProfile) && webXmlRequired) { @@ -105,7 +107,9 @@ public static FileObject createWebXml(Profile j2eeProfile, boolean webXmlRequire */ public static FileObject createWebFragmentXml(Profile j2eeProfile, FileObject dir) throws IOException { String template = null; - if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) { + if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) { + template = "web-fragment-6.1.xml"; //NOI18N + } else if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) { template = "web-fragment-6.0.xml"; //NOI18N } else if (Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile || Profile.JAKARTA_EE_9_FULL == j2eeProfile || Profile.JAKARTA_EE_9_WEB == j2eeProfile) { @@ -152,7 +156,9 @@ public static FileObject createBeansXml(Profile j2eeProfile, FileObject dir) thr */ public static FileObject createBeansXml(Profile j2eeProfile, FileObject dir, String name) throws IOException { String template = null; - if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) { + if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) { + template = "beans-4.1.xml"; //NOI18N + } else if (Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) { template = "beans-4.0.xml"; //NOI18N } else if (Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile || Profile.JAKARTA_EE_9_FULL == j2eeProfile || Profile.JAKARTA_EE_9_WEB == j2eeProfile) { @@ -211,6 +217,8 @@ public static FileObject createValidationXml(Profile j2eeProfile, FileObject dir || Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile || Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) { template = "validation-3.0.xml"; //NOI18N + } else if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) { + template = "validation-3.1.xml"; //NOI18N } if (template == null) return null; @@ -257,6 +265,8 @@ public static FileObject createConstraintXml(Profile j2eeProfile, FileObject dir || Profile.JAKARTA_EE_9_1_FULL == j2eeProfile || Profile.JAKARTA_EE_9_1_WEB == j2eeProfile || Profile.JAKARTA_EE_10_FULL == j2eeProfile || Profile.JAKARTA_EE_10_WEB == j2eeProfile) { template = "constraint-3.0.xml"; //NOI18N + } else if (Profile.JAKARTA_EE_11_FULL == j2eeProfile || Profile.JAKARTA_EE_11_WEB == j2eeProfile) { + template = "constraint-3.1.xml"; //NOI18N } if (template == null) return null; @@ -285,7 +295,9 @@ public static FileObject createApplicationXml(final Profile profile, final FileO boolean forceCreation) throws IOException { String template = null; - if (profile != null && profile.equals(Profile.JAKARTA_EE_10_FULL) && forceCreation) { + if (profile != null && profile.equals(Profile.JAKARTA_EE_11_FULL) && forceCreation) { + template = "ear-11.xml"; // NOI18N + } else if (profile != null && profile.equals(Profile.JAKARTA_EE_10_FULL) && forceCreation) { template = "ear-10.xml"; // NOI18N } else if (profile != null && (profile.equals(Profile.JAKARTA_EE_9_FULL) || profile.equals(Profile.JAKARTA_EE_9_1_FULL)) && forceCreation) { template = "ear-9.xml"; // NOI18N diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml new file mode 100644 index 000000000000..5c5e6fe0231d --- /dev/null +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/beans-4.1.xml @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml new file mode 100644 index 000000000000..5145f6849044 --- /dev/null +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/constraint-3.1.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml new file mode 100644 index 000000000000..6fadd79c3997 --- /dev/null +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/ear-11.xml @@ -0,0 +1,7 @@ + + + + diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml new file mode 100644 index 000000000000..834da5a7137b --- /dev/null +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/validation-3.1.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml new file mode 100644 index 000000000000..20d6dbbc30c9 --- /dev/null +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-6.1.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml new file mode 100644 index 000000000000..22db23644db4 --- /dev/null +++ b/enterprise/j2ee.common/src/org/netbeans/modules/j2ee/common/dd/resources/web-fragment-6.1.xml @@ -0,0 +1,8 @@ + + + + + diff --git a/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java b/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java index 768cd24506da..eedb3c6bf08d 100644 --- a/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java +++ b/enterprise/j2ee.common/test/unit/src/org/netbeans/modules/j2ee/common/J2eeProjectCapabilitiesTest.java @@ -201,6 +201,26 @@ public void testIsEjbSupported() throws Exception { assertFalse(cap.isEjb40Supported()); // assertTrue(cap.isEjb40LiteSupported()); + p = createProject(Profile.JAKARTA_EE_11_FULL, Type.EJB); + cap = J2eeProjectCapabilities.forProject(p); + assertFalse(cap.isEjb30Supported()); + assertFalse(cap.isEjb31Supported()); + assertFalse(cap.isEjb31LiteSupported()); + assertFalse(cap.isEjb32Supported()); + assertFalse(cap.isEjb32LiteSupported()); + assertTrue(cap.isEjb40Supported()); + assertTrue(cap.isEjb40LiteSupported()); + + p = createProject(Profile.JAKARTA_EE_11_WEB, Type.EJB); + cap = J2eeProjectCapabilities.forProject(p); + assertFalse(cap.isEjb30Supported()); + assertFalse(cap.isEjb31Supported()); + assertFalse(cap.isEjb31LiteSupported()); + assertFalse(cap.isEjb32Supported()); + assertFalse(cap.isEjb32LiteSupported()); + assertFalse(cap.isEjb40Supported()); +// assertTrue(cap.isEjb40LiteSupported()); + p = createProject(Profile.JAVA_EE_5, Type.WAR); cap = J2eeProjectCapabilities.forProject(p); assertFalse(cap.isEjb30Supported()); @@ -351,6 +371,26 @@ public void testIsEjbSupported() throws Exception { assertFalse(cap.isEjb40Supported()); assertTrue(cap.isEjb40LiteSupported()); + p = createProject(Profile.JAKARTA_EE_11_FULL, Type.WAR); + cap = J2eeProjectCapabilities.forProject(p); + assertFalse(cap.isEjb30Supported()); + assertFalse(cap.isEjb31Supported()); + assertFalse(cap.isEjb31LiteSupported()); + assertFalse(cap.isEjb32Supported()); + assertFalse(cap.isEjb32LiteSupported()); + assertTrue(cap.isEjb40Supported()); + assertTrue(cap.isEjb40LiteSupported()); + + p = createProject(Profile.JAKARTA_EE_11_WEB, Type.WAR); + cap = J2eeProjectCapabilities.forProject(p); + assertFalse(cap.isEjb30Supported()); + assertFalse(cap.isEjb31Supported()); + assertFalse(cap.isEjb31LiteSupported()); + assertFalse(cap.isEjb32Supported()); + assertFalse(cap.isEjb32LiteSupported()); + assertFalse(cap.isEjb40Supported()); + assertTrue(cap.isEjb40LiteSupported()); + } private Project createProject(final Profile profile, final Type type) throws IOException { diff --git a/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java b/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java index 743eb3eb2241..b8b4d65ef557 100644 --- a/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java +++ b/enterprise/j2ee.core/src/org/netbeans/api/j2ee/core/Profile.java @@ -86,7 +86,13 @@ public enum Profile { JAKARTA_EE_10_WEB("10", "web"), @Messages("JAKARTA_EE_10_FULL.displayName=Jakarta EE 10") - JAKARTA_EE_10_FULL("10"); + JAKARTA_EE_10_FULL("10"), + + @Messages("JAKARTA_EE_11_WEB.displayName=Jakarta EE 11 Web") + JAKARTA_EE_11_WEB("11", "web"), + + @Messages("JAKARTA_EE_11_FULL.displayName=Jakarta EE 11") + JAKARTA_EE_11_FULL("11"); // !!! ATTENTION: BE AWARE OF THE ENUM ORDER! It controls compatibility and UI position. public static final Comparator UI_COMPARATOR = (Profile o1, Profile o2) -> -(o1.ordinal() - o2.ordinal()); @@ -116,6 +122,28 @@ public String getDisplayName() { public String toPropertiesString() { return propertiesString; } + + /** + * Find out if this profile is a Web profile Platform. + * + * @return true if this is a Java/Jakarta EE Web profile, false if is a Full + * Platform + */ + @NonNull + public boolean isWebProfile() { + return propertiesString.endsWith("web"); + } + + /** + * Find out if this profile is a Full profile Platform. + * + * @return true if this is a Java/Jakarta EE Full profile, false if is a Web + * profile Platform + */ + @NonNull + public boolean isFullProfile() { + return !propertiesString.endsWith("web"); + } /** * Find out if the version of the profile is equal or higher to given profile. @@ -123,12 +151,12 @@ public String toPropertiesString() { * Please be aware of the following rules: *

* - * 1) Each Java EE X version is considered as lower than Java EE X+1 version + * 1) Each Java/Jakarta EE X version is considered as lower than Java EE X+1 version * (this applies regardless on Web/Full specification and in reality it means * that even Java EE 6 Full version is considered as lower than Java EE 7 Web) *

* - * 2) Each Java EE X Web version is considered as lower than Java EE X Full + * 2) Each Java/Jakarta EE X Web version is considered as lower than Java/Jakarta EE X Full *
* * @param profile profile to compare against @@ -139,6 +167,29 @@ public String toPropertiesString() { public boolean isAtLeast(@NonNull Profile profile) { return this.ordinal() >= profile.ordinal(); } + + /** + * Find out if the version of the profile is equal or lower to given profile. + * + * Please be aware of the following rules: + *

+ * + * 1) Each Java/Jakarta EE X version is considered as lower than Java/Jakarta EE X+1 version + * (this applies regardless on Web/Full specification and in reality it means + * that even Java EE 6 Full version is considered as lower than Java EE 7 Web) + *

+ * + * 2) Each Java/Jakarta EE X Web version is considered as lower than Java/Jakarta EE X Full + *
+ * + * @param profile profile to compare against + * @return true if this profile is equal or lower to given one, + * false otherwise + * @since 1.19 + */ + public boolean isAtMost(@NonNull Profile profile) { + return this.ordinal() <= profile.ordinal(); + } @Override public String toString() { diff --git a/enterprise/j2ee.core/test/unit/src/org/netbeans/api/j2ee/core/ProfileTest.java b/enterprise/j2ee.core/test/unit/src/org/netbeans/api/j2ee/core/ProfileTest.java index 5535d2d633ea..65ec47ed7e6d 100644 --- a/enterprise/j2ee.core/test/unit/src/org/netbeans/api/j2ee/core/ProfileTest.java +++ b/enterprise/j2ee.core/test/unit/src/org/netbeans/api/j2ee/core/ProfileTest.java @@ -63,6 +63,10 @@ public void testFromPropertiesString() { assertEquals(Profile.JAKARTA_EE_10_FULL, Profile.fromPropertiesString("JAKARTA_EE_10_FULL")); assertEquals(Profile.JAKARTA_EE_10_WEB, Profile.fromPropertiesString("10-web")); assertEquals(Profile.JAKARTA_EE_10_WEB, Profile.fromPropertiesString("JAKARTA_EE_10_WEB")); + assertEquals(Profile.JAKARTA_EE_11_FULL, Profile.fromPropertiesString("11")); + assertEquals(Profile.JAKARTA_EE_11_FULL, Profile.fromPropertiesString("JAKARTA_EE_11_FULL")); + assertEquals(Profile.JAKARTA_EE_11_WEB, Profile.fromPropertiesString("11-web")); + assertEquals(Profile.JAKARTA_EE_11_WEB, Profile.fromPropertiesString("JAKARTA_EE_11_WEB")); assertNull(Profile.fromPropertiesString("something")); assertNull(Profile.fromPropertiesString(null)); } @@ -86,6 +90,8 @@ public void testIsHigherJavaEEVersionJavaEE5() { assertTrue(Profile.JAKARTA_EE_9_1_WEB.isAtLeast(Profile.JAVA_EE_5)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAVA_EE_5)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAVA_EE_5)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAVA_EE_5)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAVA_EE_5)); } public void testIsHigherJavaEEVersionJavaEE6full() { @@ -107,6 +113,8 @@ public void testIsHigherJavaEEVersionJavaEE6full() { assertTrue(Profile.JAKARTA_EE_9_1_WEB.isAtLeast(Profile.JAVA_EE_6_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAVA_EE_6_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAVA_EE_6_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAVA_EE_6_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAVA_EE_6_WEB)); } public void testIsHigherJavaEEVersionJavaEE7full() { @@ -128,6 +136,8 @@ public void testIsHigherJavaEEVersionJavaEE7full() { assertTrue(Profile.JAKARTA_EE_9_1_WEB.isAtLeast(Profile.JAVA_EE_7_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAVA_EE_7_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAVA_EE_7_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAVA_EE_7_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAVA_EE_7_WEB)); } public void testIsHigherJavaEEVersionJavaEE8full() { @@ -149,6 +159,8 @@ public void testIsHigherJavaEEVersionJavaEE8full() { assertTrue(Profile.JAKARTA_EE_9_1_WEB.isAtLeast(Profile.JAVA_EE_8_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAVA_EE_8_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAVA_EE_8_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAVA_EE_8_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAVA_EE_8_WEB)); } public void testIsHigherJavaEEVersionJakartaEE8full() { @@ -170,6 +182,8 @@ public void testIsHigherJavaEEVersionJakartaEE8full() { assertTrue(Profile.JAKARTA_EE_9_1_WEB.isAtLeast(Profile.JAKARTA_EE_8_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAKARTA_EE_8_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAKARTA_EE_8_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAKARTA_EE_8_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAKARTA_EE_8_WEB)); } public void testIsHigherJavaEEVersionJakartaEE9full() { @@ -191,6 +205,8 @@ public void testIsHigherJavaEEVersionJakartaEE9full() { assertTrue(Profile.JAKARTA_EE_9_1_FULL.isAtLeast(Profile.JAKARTA_EE_9_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAKARTA_EE_9_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAKARTA_EE_9_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAKARTA_EE_9_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAKARTA_EE_9_WEB)); } public void testIsHigherJavaEEVersionJakartaEE91full() { @@ -212,6 +228,8 @@ public void testIsHigherJavaEEVersionJakartaEE91full() { assertTrue(Profile.JAKARTA_EE_9_1_FULL.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)); } public void testIsHigherJavaEEVersionJakartaEE10full() { @@ -233,6 +251,8 @@ public void testIsHigherJavaEEVersionJakartaEE10full() { assertFalse(Profile.JAKARTA_EE_9_1_FULL.isAtLeast(Profile.JAKARTA_EE_10_WEB)); assertTrue(Profile.JAKARTA_EE_10_WEB.isAtLeast(Profile.JAKARTA_EE_10_WEB)); assertTrue(Profile.JAKARTA_EE_10_FULL.isAtLeast(Profile.JAKARTA_EE_10_WEB)); + assertTrue(Profile.JAKARTA_EE_11_WEB.isAtLeast(Profile.JAKARTA_EE_10_WEB)); + assertTrue(Profile.JAKARTA_EE_11_FULL.isAtLeast(Profile.JAKARTA_EE_10_WEB)); } public void testAllEnumsHaveDisplayNames() { diff --git a/enterprise/j2ee.dd/.gitignore b/enterprise/j2ee.dd/.gitignore index 33e900917b5d..1c791390b00f 100644 --- a/enterprise/j2ee.dd/.gitignore +++ b/enterprise/j2ee.dd/.gitignore @@ -6,6 +6,7 @@ src/org/netbeans/modules/j2ee/dd/impl/application/model_7/* src/org/netbeans/modules/j2ee/dd/impl/application/model_8/* src/org/netbeans/modules/j2ee/dd/impl/application/model_9/* src/org/netbeans/modules/j2ee/dd/impl/application/model_10/* +src/org/netbeans/modules/j2ee/dd/impl/application/model_11/* src/org/netbeans/modules/j2ee/dd/impl/client/model_1_4/* src/org/netbeans/modules/j2ee/dd/impl/client/model_5_0/* src/org/netbeans/modules/j2ee/dd/impl/client/model_6_0/* @@ -13,6 +14,7 @@ src/org/netbeans/modules/j2ee/dd/impl/client/model_7_0/* src/org/netbeans/modules/j2ee/dd/impl/client/model_8_0/* src/org/netbeans/modules/j2ee/dd/impl/client/model_9_0/* src/org/netbeans/modules/j2ee/dd/impl/client/model_10_0/* +src/org/netbeans/modules/j2ee/dd/impl/client/model_11_0/* src/org/netbeans/modules/j2ee/dd/impl/ejb/model_2_1/* src/org/netbeans/modules/j2ee/dd/impl/ejb/model_3_0/* src/org/netbeans/modules/j2ee/dd/impl/ejb/model_3_1/* @@ -29,4 +31,6 @@ src/org/netbeans/modules/j2ee/dd/impl/web/model_4_0_frag/* src/org/netbeans/modules/j2ee/dd/impl/web/model_5_0/* src/org/netbeans/modules/j2ee/dd/impl/web/model_5_0_frag/* src/org/netbeans/modules/j2ee/dd/impl/web/model_6_0/* -src/org/netbeans/modules/j2ee/dd/impl/web/model_6_0_frag/* \ No newline at end of file +src/org/netbeans/modules/j2ee/dd/impl/web/model_6_0_frag/* +src/org/netbeans/modules/j2ee/dd/impl/web/model_6_1/* +src/org/netbeans/modules/j2ee/dd/impl/web/model_6_1_frag/* \ No newline at end of file diff --git a/enterprise/j2ee.dd/build.xml b/enterprise/j2ee.dd/build.xml index 1f54393a7314..709c27a90f93 100644 --- a/enterprise/j2ee.dd/build.xml +++ b/enterprise/j2ee.dd/build.xml @@ -31,11 +31,13 @@ + + @@ -48,6 +50,7 @@ + @@ -56,6 +59,7 @@ + @@ -203,6 +207,28 @@ rootDir="src" java5="true"/> @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.web.model_6_0_frag; + + @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.web.model_6_1; + + @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.web.model_6_1_frag; org.netbeans.modules.j2ee.dd.api.web.ServletMapping25 @@ -542,6 +568,66 @@ public void setServletName(java.lang.String[] value) { public void setServletNames(java.lang.String[] value) { + + public java.lang.String[] getUrlPattern() { + public java.lang.String[] getUrlPatterns() { + + + public void setUrlPattern(java.lang.String[] value) { + public void setUrlPatterns(java.lang.String[] value) { + + + org.netbeans.modules.j2ee.dd.api.web.ServletMapping25 + org.netbeans.modules.j2ee.dd.api.web.ServletMapping + + + + public java.lang.String[] getUrlPattern() { + public java.lang.String[] getUrlPatterns() { + + + public void setUrlPattern(java.lang.String[] value) { + public void setUrlPatterns(java.lang.String[] value) { + + + public java.lang.String[] getServletName() { + public java.lang.String[] getServletNames() { + + + public void setServletName(java.lang.String[] value) { + public void setServletNames(java.lang.String[] value) { + + + + org.netbeans.modules.j2ee.dd.api.web.ServletMapping25 + org.netbeans.modules.j2ee.dd.api.web.ServletMapping + + + + public java.lang.String[] getUrlPattern() { + public java.lang.String[] getUrlPatterns() { + + + public void setUrlPattern(java.lang.String[] value) { + public void setUrlPatterns(java.lang.String[] value) { + + + + public java.lang.String[] getUrlPattern() { + public java.lang.String[] getUrlPatterns() { + + + public void setUrlPattern(java.lang.String[] value) { + public void setUrlPatterns(java.lang.String[] value) { + + + public java.lang.String[] getServletName() { + public java.lang.String[] getServletNames() { + + + public void setServletName(java.lang.String[] value) { + public void setServletNames(java.lang.String[] value) { + setDescription(null); setDisplayName(null); @@ -873,6 +959,72 @@ setLocaleEncodingMappingList(null); setDistributable(null); + setDescription(null); + setDisplayName(null); + setIcon(null); + setName(null); + setContextParam(null); + setFilter(null); + setFilterMapping(null); + setListener(null); + setServlet(null); + setServletMapping(null); + setSessionConfig(null); + setMimeMapping(null); + setWelcomeFileList(null); + setErrorPage(null); + setJspConfig(null); + setSecurityConstraint(null); + setLoginConfig(null); + setSecurityRole(null); + setEnvEntry(null); + setEjbRef(null); + setEjbLocalRef(null); + setServiceRef(null); + setResourceRef(null); + setResourceEnvRef(null); + setMessageDestinationRef(null); + setPersistenceContextRef(null); + setPersistenceUnitRef(null); + setPostConstruct(null); + setPreDestroy(null); + setMessageDestination(null); + setLocaleEncodingMappingList(null); + setDistributable(null); + + setDescription(null); + setDisplayName(null); + setIcon(null); + setName(null); + setContextParam(null); + setFilter(null); + setFilterMapping(null); + setListener(null); + setServlet(null); + setServletMapping(null); + setSessionConfig(null); + setMimeMapping(null); + setWelcomeFileList(null); + setErrorPage(null); + setJspConfig(null); + setSecurityConstraint(null); + setLoginConfig(null); + setSecurityRole(null); + setEnvEntry(null); + setEjbRef(null); + setEjbLocalRef(null); + setServiceRef(null); + setResourceRef(null); + setResourceEnvRef(null); + setMessageDestinationRef(null); + setPersistenceContextRef(null); + setPersistenceUnitRef(null); + setPostConstruct(null); + setPreDestroy(null); + setMessageDestination(null); + setLocaleEncodingMappingList(null); + setDistributable(null); + @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.application.model_10; + + @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.application.model_11; public java.lang.String getVersion() { @@ -1168,6 +1331,22 @@ setVersion("10"); setVersionString("10"); + + public java.lang.String getVersion() { + public java.lang.String getVersionString() { + + + public void setVersion(java.lang.String value) { + public void setVersionString(java.lang.String value) { + + + (getVersion() + (getVersionString() + + + setVersion("11"); + setVersionString("11"); + @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.client.model_10_0; + + @org.netbeans.api.annotations.common.SuppressWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE") // justification="Generated implementation classes"${line.separator}package org.netbeans.modules.j2ee.dd.impl.client.model_11_0; public java.lang.String getVersion() { @@ -1327,6 +1517,22 @@ setVersion("10"); setVersionString("10"); + + public java.lang.String getVersion() { + public java.lang.String getVersionString() { + + + public void setVersion(java.lang.String value) { + public void setVersionString(java.lang.String value) { + + + (getVersion() + (getVersionString() + + + setVersion("11"); + setVersionString("11"); + @@ -1346,6 +1552,8 @@ + + @@ -1358,6 +1566,7 @@ + @@ -1365,6 +1574,7 @@ + @@ -1439,6 +1649,18 @@ + + + + + + + + + + + + @@ -1513,6 +1735,12 @@ + + + + + + @@ -1556,6 +1784,12 @@ + + + + + + diff --git a/enterprise/j2ee.dd/licenseinfo.xml b/enterprise/j2ee.dd/licenseinfo.xml index 8abafdce5d82..1afb7a12332f 100755 --- a/enterprise/j2ee.dd/licenseinfo.xml +++ b/enterprise/j2ee.dd/licenseinfo.xml @@ -125,16 +125,24 @@ src/org/netbeans/modules/j2ee/dd/impl/resources/application_10.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_10.mdd src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_10.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd + src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd + src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_0.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/ejb-jar_4_0.mdd src/org/netbeans/modules/j2ee/dd/impl/resources/ejb-jar_4_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_9.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_10.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_web_services_2_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_web_services_client_2_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_3_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_3_1.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_9.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_5_0.mdd src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_5_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_5_0.xsd @@ -145,6 +153,11 @@ src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_0.xsd src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_0.mdd src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_0.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd + src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd + src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd + src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java index b8f758945219..7efc0715a889 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/Application.java @@ -38,24 +38,28 @@ public interface Application extends org.netbeans.modules.j2ee.dd.api.common.Roo public static final String VERSION_6="6"; //NOI18N /** - * application.xml DD version for JavaEE7 + * application.xml DD version for Java EE 7 * @since 1.29 */ public static final String VERSION_7 = "7"; //NOI18N /** - * application.xml DD version for JavaEE8/JakartaEE8 + * application.xml DD version for Java EE 8/Jakarta EE 8 * @since 2 */ public static final String VERSION_8 = "8"; //NOI18N /** - * application.xml DD version for JakartaEE9/JakartaEE9.1 + * application.xml DD version for Jakarta EE 9/Jakarta EE 9.1 * @since 2 */ public static final String VERSION_9 = "9"; //NOI18N /** - * application.xml DD version for JakartaEE10 + * application.xml DD version for Jakarta EE 10 */ public static final String VERSION_10 = "10"; //NOI18N + /** + * application.xml DD version for Jakarta EE 11 + */ + public static final String VERSION_11 = "11"; //NOI18N public static final int STATE_VALID=0; public static final int STATE_INVALID_PARSABLE=1; public static final int STATE_INVALID_UNPARSABLE=2; diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java index e25401db687f..89ba3f2e4610 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/application/DDProvider.java @@ -246,8 +246,10 @@ private static Application createApplication(DDParse parse) { return new org.netbeans.modules.j2ee.dd.impl.application.model_8.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES); } else if (Application.VERSION_9.equals(version)) { return new org.netbeans.modules.j2ee.dd.impl.application.model_9.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES); - }else if (Application.VERSION_10.equals(version)) { + } else if (Application.VERSION_10.equals(version)) { return new org.netbeans.modules.j2ee.dd.impl.application.model_10.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES); + } else if (Application.VERSION_11.equals(version)) { + return new org.netbeans.modules.j2ee.dd.impl.application.model_11.Application(parse.getDocument(), Common.USE_DEFAULT_VALUES); } return jar; } @@ -274,6 +276,10 @@ public InputSource resolveEntity (String publicId, String systemId) { return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_8.xsd"); //NOI18N } else if ("https://jakarta.ee/xml/ns/jakartaee/application_9.xsd".equals(systemId)) { return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_9.xsd"); //NOI18N + } else if ("https://jakarta.ee/xml/ns/jakartaee/application_10.xsd".equals(systemId)) { + return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_10.xsd"); //NOI18N + } else if ("https://jakarta.ee/xml/ns/jakartaee/application_11.xsd".equals(systemId)) { + return new InputSource("nbres:/org/netbeans/modules/javaee/dd/impl/resources/application_11.xsd"); //NOI18N } else { // use the default behaviour return null; @@ -390,7 +396,11 @@ private void extractVersion () { Node vNode = attrs.getNamedItem("version");//NOI18N if(vNode != null) { String versionValue = vNode.getNodeValue(); - if (Application.VERSION_9.equals(versionValue)) { + if (Application.VERSION_11.equals(versionValue)) { + version = Application.VERSION_11; + } else if (Application.VERSION_10.equals(versionValue)) { + version = Application.VERSION_10; + } else if (Application.VERSION_9.equals(versionValue)) { version = Application.VERSION_9; } else if (Application.VERSION_8.equals(versionValue)) { version = Application.VERSION_8; diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java index f77703239167..61175e205c27 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/client/AppClient.java @@ -46,6 +46,7 @@ public interface AppClient extends RootInterface { public static final String VERSION_8_0 = "8"; //NOI18N public static final String VERSION_9_0 = "9"; //NOI18N public static final String VERSION_10_0 = "10"; //NOI18N + public static final String VERSION_11_0 = "11"; //NOI18N public static final int STATE_VALID=0; public static final int STATE_INVALID_PARSABLE=1; public static final int STATE_INVALID_UNPARSABLE=2; diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java index 098a331e7315..f1095478b304 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebApp.java @@ -65,6 +65,10 @@ public interface WebApp extends org.netbeans.modules.j2ee.dd.api.common.RootInte * web.xml, web-fragment.xml DD version for JakartaEE10 */ static final String VERSION_6_0 = "6.0"; //NOI18N + /** + * web.xml, web-fragment.xml DD version for Jakarta EE 11 + */ + static final String VERSION_6_1 = "6.1"; //NOI18N static final int STATE_VALID = 0; static final int STATE_INVALID_PARSABLE = 1; static final int STATE_INVALID_UNPARSABLE = 2; diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java index de00d64f8820..3b5feac01988 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/api/web/WebFragmentProvider.java @@ -79,7 +79,12 @@ public WebFragment getWebFragmentRoot(FileObject fo) throws IOException, FileNot private WebFragment createWebFragment(FileObject fo, String version) throws IOException, SAXException { try { - if (WebFragment.VERSION_6_0.equals(version)) { + if (WebFragment.VERSION_6_1.equals(version)) { + try (InputStream inputStream = fo.getInputStream()) { + return org.netbeans.modules.j2ee.dd.impl.web.model_6_1_frag.WebFragment.createGraph(inputStream); + } + } else + if (WebFragment.VERSION_6_0.equals(version)) { try (InputStream inputStream = fo.getInputStream()) { return org.netbeans.modules.j2ee.dd.impl.web.model_6_0_frag.WebFragment.createGraph(inputStream); } diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java index 0913f6eca722..5a74cbfc8d1d 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/common/DDUtils.java @@ -125,6 +125,8 @@ public static WebApp createWebApp(InputStream is, String version) throws IOExcep return org.netbeans.modules.j2ee.dd.impl.web.model_5_0.WebApp.createGraph(is); } else if (WebApp.VERSION_6_0.equals(version)) { return org.netbeans.modules.j2ee.dd.impl.web.model_6_0.WebApp.createGraph(is); + } else if (WebApp.VERSION_6_1.equals(version)) { + return org.netbeans.modules.j2ee.dd.impl.web.model_6_1.WebApp.createGraph(is); } else { return null; } @@ -155,6 +157,8 @@ public static AppClient createAppClient(InputStream is, String version) throws I return org.netbeans.modules.j2ee.dd.impl.client.model_9_0.ApplicationClient.createGraph(is); } else if (AppClient.VERSION_10_0.equals(version)) { return org.netbeans.modules.j2ee.dd.impl.client.model_10_0.ApplicationClient.createGraph(is); + } else if (AppClient.VERSION_11_0.equals(version)) { + return org.netbeans.modules.j2ee.dd.impl.client.model_11_0.ApplicationClient.createGraph(is); } } catch (RuntimeException ex) { throw new SAXException(ex); diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd new file mode 100644 index 000000000000..48b4353d4987 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.mdd @@ -0,0 +1,385 @@ + + + + + application-client + https://jakarta.ee/xml/ns/jakartaee + ApplicationClient + org.netbeans.modules.j2ee.dd.api.client.AppClient + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + public org.xml.sax.SAXParseException getError() { + return null; + } + public int getStatus() { + return STATE_VALID; + } + public void setVersion(java.math.BigDecimal value) { + setAttributeValue(VERSION, value.toString()); + } + public java.math.BigDecimal getVersion() { + return new java.math.BigDecimal(getAttributeValue(VERSION)); + } + + + + env-entryType + https://jakarta.ee/xml/ns/jakartaee + EnvEntry + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EnvEntry, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EnvEntryName"; } + + + + ejb-refType + https://jakarta.ee/xml/ns/jakartaee + EjbRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EjbRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EjbRefName"; } + + + + resource-refType + https://jakarta.ee/xml/ns/jakartaee + ResourceRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ResourceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ResRefName"; } + + + + resource-env-refType + https://jakarta.ee/xml/ns/jakartaee + ResourceEnvRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ResourceEnvRefName"; } + + + + message-destination-refType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "MessageDestinationRefName"; } + + + + persistence-context-refType + https://jakarta.ee/xml/ns/jakartaee + PersistenceContextRefType + + + persistence-unit-refType + https://jakarta.ee/xml/ns/jakartaee + PersistenceUnitRefType + + + lifecycle-callbackType + https://jakarta.ee/xml/ns/jakartaee + LifecycleCallbackType + + + fully-qualified-classType + https://jakarta.ee/xml/ns/jakartaee + FullyQualifiedClass + java.lang.String + + + message-destinationType + https://jakarta.ee/xml/ns/jakartaee + MessageDestination + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.MessageDestination, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "MessageDestinationName"; } + + + + string + https://jakarta.ee/xml/ns/jakartaee + String + java.lang.String + + + xsdStringType + https://jakarta.ee/xml/ns/jakartaee + XsdStringType + java.lang.String + + + descriptionType + https://jakarta.ee/xml/ns/jakartaee + DescriptionType + java.lang.String + + + display-nameType + https://jakarta.ee/xml/ns/jakartaee + DisplayNameType + java.lang.String + + + iconType + https://jakarta.ee/xml/ns/jakartaee + Icon + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.common.Icon + + + + pathType + https://jakarta.ee/xml/ns/jakartaee + PathType + java.lang.String + + + java-identifierType + https://jakarta.ee/xml/ns/jakartaee + JavaIdentifierType + java.lang.String + + + jndi-nameType + https://jakarta.ee/xml/ns/jakartaee + JndiNameType + java.lang.String + + + injection-targetType + https://jakarta.ee/xml/ns/jakartaee + InjectionTarget + org.netbeans.modules.j2ee.dd.api.common.InjectionTarget + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + + persistence-context-typeType + https://jakarta.ee/xml/ns/jakartaee + PersistenceContextTypeType + java.lang.String + + + message-destination-typeType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationTypeType + java.lang.String + + + message-destination-usageType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationUsageType + java.lang.String + + + message-destination-linkType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationLinkType + java.lang.String + + + res-authType + https://jakarta.ee/xml/ns/jakartaee + ResAuthType + java.lang.String + + + res-sharing-scopeType + https://jakarta.ee/xml/ns/jakartaee + ResSharingScopeType + java.lang.String + + + service-refType + https://jakarta.ee/xml/ns/jakartaee + ServiceRef + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ServiceRefName"; } + + + + xsdAnyURIType + https://jakarta.ee/xml/ns/jakartaee + XsdAnyURIType + java.net.URI + + + xsdQNameType + https://jakarta.ee/xml/ns/jakartaee + XsdQNameType + java.lang.String + + + port-component-refType + https://jakarta.ee/xml/ns/jakartaee + PortComponentRef + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.common.PortComponentRef + + + + service-ref_handlerType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandler + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "HandlerName"; } + + + + service-ref_handler-chainsType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChains + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains + + + service-ref_handler-chainType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChainType + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain + + + service-ref_qname-pattern + https://jakarta.ee/xml/ns/jakartaee + ServiceRefQnamePattern + java.lang.String + + + service-ref_protocol-bindingListType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefProtocolBindingListType + String + + + param-valueType + https://jakarta.ee/xml/ns/jakartaee + InitParam + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.InitParam, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ParamName"; } + + + + true-falseType + https://jakarta.ee/xml/ns/jakartaee + TrueFalseType + boolean + + + ejb-ref-nameType + https://jakarta.ee/xml/ns/jakartaee + EjbRefNameType + java.lang.String + + + ejb-ref-typeType + https://jakarta.ee/xml/ns/jakartaee + EjbRefTypeType + java.lang.String + + + homeType + https://jakarta.ee/xml/ns/jakartaee + HomeType + java.lang.String + + + remoteType + https://jakarta.ee/xml/ns/jakartaee + RemoteType + java.lang.String + + + ejb-linkType + https://jakarta.ee/xml/ns/jakartaee + EjbLinkType + java.lang.String + + + env-entry-type-valuesType + https://jakarta.ee/xml/ns/jakartaee + EnvEntryTypeValuesType + java.lang.String + + + + + + handlerType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandler + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "HandlerName"; } + + + + handler-chainsType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChains + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains + + + handler-chainType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChainType + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain + + + dewey-versionType + https://jakarta.ee/xml/ns/jakartaee + version + java.math.BigDecimal + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd new file mode 100644 index 000000000000..538258a1d104 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_11.xsd @@ -0,0 +1,252 @@ + + + + + + Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/application-client_11.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + The application-client element is the root element of an + application client deployment descriptor. The application + client deployment descriptor describes the enterprise bean + components and external resources referenced by the + application client. + + + + + + + + The env-entry-name element contains the name of an + application client's environment entry. The name is a JNDI + name relative to the java:comp/env context. The name must + be unique within an application client. + + + + + + + + + + + The ejb-ref-name element contains the name of an enterprise bean + reference. The enterprise bean reference is an entry + in the application client's environment and is relative to the + java:comp/env context. The name must be unique within the + application client. + + It is recommended that name is prefixed with "ejb/". + + + + + + + + + + + The res-ref-name element specifies the name of a + resource manager connection factory reference.The name + is a JNDI name relative to the java:comp/env context. + The name must be unique within an application client. + + + + + + + + + + + The resource-env-ref-name element specifies the name of + a resource environment reference; its value is the + environment entry name used in the application client + code. The name is a JNDI name relative to the + java:comp/env context and must be unique within an + application client. + + + + + + + + + + + The message-destination-ref-name element specifies the + name of a message destination reference; its value is + the message destination reference name used in the + application client code. The name is a JNDI name + relative to the java:comp/env context and must be unique + within an application client. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The callback-handler element names a class provided by + the application. The class must have a no args + constructor and must implement the + jakarta.security.auth.callback.CallbackHandler + interface. The class will be instantiated by the + application client container and used by the container + to collect authentication information from the user. + + + + + + + + + + + + + + + + + The required value for the version is 11. + + + + + + + + + The metadata-complete attribute defines whether this + deployment descriptor and other related deployment + descriptors for this module (e.g., web service + descriptors) are complete, or whether the class + files available to this module and packaged with + this application should be examined for annotations + that specify deployment information. + + If metadata-complete is set to "true", the deployment + tool must ignore any annotations that specify deployment + information, which might be present in the class files + of the application. + + If metadata-complete is not specified or is set to + "false", the deployment tool must examine the class + files of the application for annotations, as + specified by the specifications. + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd new file mode 100644 index 000000000000..3f904a644a8d --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.mdd @@ -0,0 +1,111 @@ + + + + + application + https://jakarta.ee/xml/ns/jakartaee + Application + org.netbeans.modules.j2ee.dd.api.application.Application + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + public org.xml.sax.SAXParseException getError() { + return null; + } + public int getStatus() { + return STATE_VALID; + } + public void setVersion(java.math.BigDecimal value) { + setAttributeValue(VERSION, value.toString()); + } + public java.math.BigDecimal getVersion() { + return new java.math.BigDecimal(getAttributeValue(VERSION)); + } + + + + moduleType + https://jakarta.ee/xml/ns/jakartaee + Module + org.netbeans.modules.j2ee.dd.api.application.Module + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + + security-roleType + https://jakarta.ee/xml/ns/jakartaee + SecurityRole + org.netbeans.modules.j2ee.dd.api.common.SecurityRole + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + + pathType + https://jakarta.ee/xml/ns/jakartaee + Path + java.lang.String + + + descriptionType + https://jakarta.ee/xml/ns/jakartaee + Description + java.lang.String + + + xsdStringType + https://jakarta.ee/xml/ns/jakartaee + XsdString + java.lang.String + + + role-nameType + https://jakarta.ee/xml/ns/jakartaee + RoleName + java.lang.String + + + webType + https://jakarta.ee/xml/ns/jakartaee + Web + org.netbeans.modules.j2ee.dd.api.application.Web + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + public String getWebUriId() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(org.netbeans.modules.j2ee.dd.api.application.Application.VERSION_11); + } + public void setWebUriId(String value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(org.netbeans.modules.j2ee.dd.api.application.Application.VERSION_11); + } + + + + string + https://jakarta.ee/xml/ns/jakartaee + String + java.lang.String + + + display-nameType + https://jakarta.ee/xml/ns/jakartaee + DisplayName + java.lang.String + + + iconType + https://jakarta.ee/xml/ns/jakartaee + Icon + org.netbeans.modules.j2ee.dd.api.common.Icon + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd new file mode 100644 index 000000000000..f45bf73a859a --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/application_11.xsd @@ -0,0 +1,390 @@ + + + + + + + Copyright (c) 2009, 2023 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/application_11.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + + The application element is the root element of a Jakarta EE + application deployment descriptor. + + + + + + + + + The context-root element content must be unique + in the ear. + + + + + + + + + + + + The security-role-name element content + must be unique in the ear. + + + + + + + + + + + + + + + + The applicationType defines the structure of the + application. + + + + + + + + + + + If initialize-in-order is true, modules must be initialized + in the order they're listed in this deployment descriptor, + with the exception of application client modules, which can + be initialized in any order. + If initialize-in-order is not set or set to false, the order + of initialization is unspecified and may be product-dependent. + + + + + + + + The application deployment descriptor must have one + module element for each Jakarta EE module in the + application package. A module element is defined + by moduleType definition. + + + + + + + + + + The library-directory element specifies the pathname + of a directory within the application package, relative + to the top level of the application package. All files + named "*.jar" in this directory must be made available + in the class path of all components included in this + application package. If this element isn't specified, + the directory named "lib" is searched. An empty element + may be used to disable searching. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The required value for the version is 11. + + + + + + + + + + + + + + + The moduleType defines a single Jakarta EE module and contains a + connector, ejb, java, or web element, which indicates the + module type and contains a path to the module file, and an + optional alt-dd element, which specifies an optional URI to + the post-assembly version of the deployment descriptor. + + + + + + + + + + + The connector element specifies the URI of a + resource adapter archive file, relative to the + top level of the application package. + + + + + + + + + The ejb element specifies the URI of an ejb-jar, + relative to the top level of the application + package. + + + + + + + + + The java element specifies the URI of a java + application client module, relative to the top + level of the application package. + + + + + + + + + + + The alt-dd element specifies an optional URI to the + post-assembly version of the deployment descriptor + file for a particular Jakarta EE module. The URI must + specify the full pathname of the deployment + descriptor file relative to the application's root + directory. If alt-dd is not specified, the deployer + must read the deployment descriptor from the default + location and file name required by the respective + component specification. + + + + + + + + + + + + + + + The webType defines the web-uri and context-root of + a web application module. + + + + + + + + + The web-uri element specifies the URI of a web + application file, relative to the top level of the + application package. + + + + + + + + + + The context-root element specifies the context root + of a web application. + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_0.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_0.xsd new file mode 100644 index 000000000000..71ae3d744356 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_0.xsd @@ -0,0 +1,372 @@ + + + + + + + + + + ... + + + The deployment descriptor may indicate the published version of + the schema using the xsi:schemaLocation attribute for the Java EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd + + ]]> + + + + + + + Bean classes of enabled beans must be + deployed in bean archives. A library jar, EJB jar, + application client jar or rar archive is a bean archive if + it has a file named beans.xml in the META-INF directory. The + WEB-INF/classes directory of a war is a bean archive if + there is a file named beans.xml in the WEB-INF directory of + the war. A directory in the JVM classpath is a bean archive + if it has a file named beans.xml in the META-INF directory. + + When running in a CDI Lite environment, the bean-discovery-mode + attribute is the only configuration value read from a beans.xml file. + + + + + + + + + + + + + + The version of CDI this beans.xml is for. If the version is "4.0" (or + later), then the attribute bean-discovery-mode must be added. + + + + + + + + + + + + It is strongly recommended you use "annotated". This is now the default and it + is also the default as of 4.0 when an empty beans.xml file is seen. When running + in a CDI Lite environment, this is the only aspect of the beans.xml file that + is used. + + If the bean discovery mode is "all", then all types in this + archive will be considered. If the bean discovery mode is + "annotated", then only those types with bean defining annotations will be + considered. If the bean discovery mode is "none", then no + types will be considered. + + + + + + + + Only those types with bean defining annotations will be + considered. + + + + + + + All types in this archive will be considered. + + + + + + + This archive will be ignored. + + + + + + + + + + + + + element allows exclusion of classes and packages from consideration. Various filters may be applied, and may be conditionally activated.]]> + + + + + + + + would exclude all classes and subpackages of com.acme.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + would exclude all classes and subpackages of com.acme.]]> + + + + + + + + + + + + + + + + + + By default, a bean archive has no enabled + interceptors bound via interceptor bindings. An interceptor + must be explicitly enabled by listing its class under the + <interceptors> element of the beans.xml file of the + bean archive. The order of the interceptor declarations + determines the interceptor ordering. Interceptors which + occur earlier in the list are called first. If the same + class is listed twice under the <interceptors> + element, the container automatically detects the problem and + treats it as a deployment problem. + + + + + + + + Each child <class> element + must specify the name of an interceptor class. If + there is no class with the specified name, or if + the class with the specified name is not an + interceptor class, the container automatically + detects the problem and treats it as a deployment + problem. + + + + + + + + + + + By default, a bean archive has no enabled + decorators. A decorator must be explicitly enabled by + listing its bean class under the <decorators> element + of the beans.xml file of the bean archive. The order of the + decorator declarations determines the decorator ordering. + Decorators which occur earlier in the list are called first. + If the same class is listed twice under the + <decorators> element, the container automatically + detects the problem and treats it as a deployment problem. + + + + + + + + Each child <class> element + must specify the name of a decorator class. If + there is no class with the specified name, or if + the class with the specified name is not a + decorator class, the container automatically + detects the problem and treats it as a deployment + problem. + + + + + + + + + + + An alternative is a bean that must be + explicitly declared in the beans.xml file if it should be + available for lookup, injection or EL resolution. By + default, a bean archive has no selected alternatives. An + alternative must be explicitly declared using the + <alternatives> element of the beans.xml file of the + bean archive. The <alternatives> element contains a + list of bean classes and stereotypes. An alternative is + selected for the bean archive if either: the alternative is + a managed bean or session bean and the bean class of the + bean is listed, or the alternative is a producer method, + field or resource, and the bean class that declares the + method or field is listed, or any @Alternative stereotype of + the alternative is listed. + + + + + + + + Each child <class> element + must specify the name of an alternative bean class. + If there is no class with the specified name, or if + the class with the specified name is not an + alternative bean class, the container automatically + detects the problem and treats it as a deployment + problem. If the same class is listed twice under + the <alternatives> element, the container + automatically detects the problem and treats it as + a deployment problem. + + + + + + + + Each child <stereotype> + element must specify the name of an @Alternative + stereotype annotation. If there is no annotation + with the specified name, or the annotation is not + an @Alternative stereotype, the container + automatically detects the problem and treats it as + a deployment problem. If the same stereotype is + listed twice under the <alternatives> + element, the container automatically detects the + problem and treats it as a deployment problem. + + + + + + + + + + If an explicit bean archive contains the <trim/< element in its beans.xml file, types that don’t have + either a bean defining annotation (as defined in Bean defining annotations) or any scope annotation, + are removed from the set of discovered types. + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_1.xsd new file mode 100644 index 000000000000..f5e05e80a87c --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/beans_4_1.xsd @@ -0,0 +1,372 @@ + + + + + + + + + + ... + + + The deployment descriptor may indicate the published version of + the schema using the xsi:schemaLocation attribute for the Java EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/beans_4_1.xsd + + ]]> + + + + + + + Bean classes of enabled beans must be + deployed in bean archives. A library jar, EJB jar, + application client jar or rar archive is a bean archive if + it has a file named beans.xml in the META-INF directory. The + WEB-INF/classes directory of a war is a bean archive if + there is a file named beans.xml in the WEB-INF directory of + the war. A directory in the JVM classpath is a bean archive + if it has a file named beans.xml in the META-INF directory. + + When running in a CDI Lite environment, the bean-discovery-mode + attribute is the only configuration value read from a beans.xml file. + + + + + + + + + + + + + + The version of CDI this beans.xml is for. If the version is "4.1" (or + later), then the attribute bean-discovery-mode must be added. + + + + + + + + + + + + It is strongly recommended you use "annotated". This is now the default and it + is also the default as of 4.1 when an empty beans.xml file is seen. When running + in a CDI Lite environment, this is the only aspect of the beans.xml file that + is used. + + If the bean discovery mode is "all", then all types in this + archive will be considered. If the bean discovery mode is + "annotated", then only those types with bean defining annotations will be + considered. If the bean discovery mode is "none", then no + types will be considered. + + + + + + + + Only those types with bean defining annotations will be + considered. + + + + + + + All types in this archive will be considered. + + + + + + + This archive will be ignored. + + + + + + + + + + + + + element allows exclusion of classes and packages from consideration. Various filters may be applied, and may be conditionally activated.]]> + + + + + + + + would exclude all classes and subpackages of com.acme.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + would exclude all classes and subpackages of com.acme.]]> + + + + + + + + + + + + + + + + + + By default, a bean archive has no enabled + interceptors bound via interceptor bindings. An interceptor + must be explicitly enabled by listing its class under the + <interceptors> element of the beans.xml file of the + bean archive. The order of the interceptor declarations + determines the interceptor ordering. Interceptors which + occur earlier in the list are called first. If the same + class is listed twice under the <interceptors> + element, the container automatically detects the problem and + treats it as a deployment problem. + + + + + + + + Each child <class> element + must specify the name of an interceptor class. If + there is no class with the specified name, or if + the class with the specified name is not an + interceptor class, the container automatically + detects the problem and treats it as a deployment + problem. + + + + + + + + + + + By default, a bean archive has no enabled + decorators. A decorator must be explicitly enabled by + listing its bean class under the <decorators> element + of the beans.xml file of the bean archive. The order of the + decorator declarations determines the decorator ordering. + Decorators which occur earlier in the list are called first. + If the same class is listed twice under the + <decorators> element, the container automatically + detects the problem and treats it as a deployment problem. + + + + + + + + Each child <class> element + must specify the name of a decorator class. If + there is no class with the specified name, or if + the class with the specified name is not a + decorator class, the container automatically + detects the problem and treats it as a deployment + problem. + + + + + + + + + + + An alternative is a bean that must be + explicitly declared in the beans.xml file if it should be + available for lookup, injection or EL resolution. By + default, a bean archive has no selected alternatives. An + alternative must be explicitly declared using the + <alternatives> element of the beans.xml file of the + bean archive. The <alternatives> element contains a + list of bean classes and stereotypes. An alternative is + selected for the bean archive if either: the alternative is + a managed bean or session bean and the bean class of the + bean is listed, or the alternative is a producer method, + field or resource, and the bean class that declares the + method or field is listed, or any @Alternative stereotype of + the alternative is listed. + + + + + + + + Each child <class> element + must specify the name of an alternative bean class. + If there is no class with the specified name, or if + the class with the specified name is not an + alternative bean class, the container automatically + detects the problem and treats it as a deployment + problem. If the same class is listed twice under + the <alternatives> element, the container + automatically detects the problem and treats it as + a deployment problem. + + + + + + + + Each child <stereotype> + element must specify the name of an @Alternative + stereotype annotation. If there is no annotation + with the specified name, or the annotation is not + an @Alternative stereotype, the container + automatically detects the problem and treats it as + a deployment problem. If the same stereotype is + listed twice under the <alternatives> + element, the container automatically detects the + problem and treats it as a deployment problem. + + + + + + + + + + If an explicit bean archive contains the <trim/< element in its beans.xml file, types that don’t have + either a bean defining annotation (as defined in Bean defining annotations) or any scope annotation, + are removed from the set of discovered types. + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd new file mode 100644 index 000000000000..e0ac46d5f1ab --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/connector_2_1.xsd @@ -0,0 +1,1165 @@ + + + + + + Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/connector_2_1.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + The connector element is the root element of the deployment + descriptor for the resource adapter. This element includes + general information - vendor name, resource adapter version, + icon - about the resource adapter module. It also includes + information specific to the implementation of the resource + adapter library as specified through the element + resourceadapter. + + + + + + + + + + + + + The activationspecType specifies an activation + specification. The information includes fully qualified + Java class name of an activation specification and a set of + required configuration property names. + + + + + + + + com.wombat.ActivationSpecImpl + + + ]]> + + + + + + + + The required-config-property element is deprecated since + Connectors 1.6 specification. The resource adapter + implementation is recommended to use the @NotNull + Bean Validation annotation or its XML validation + descriptor equivalent to indicate that a configuration + property is required to be specified by the deployer. + See the Jakarta Connectors specification for more information. + + + + + + + + + + + + + + + + + The adminobjectType specifies information about an + administered object. Administered objects are specific to a + messaging style or message provider. This contains + information on the Java type of the interface implemented by + an administered object, its Java class name and its + configuration properties. + + + + + + + + jakarta.jms.Destination + + + ]]> + + + + + + + com.wombat.DestinationImpl + + + ]]> + + + + + + + + + + + + + + + + The authentication-mechanismType specifies an authentication + mechanism supported by the resource adapter. Note that this + support is for the resource adapter and not for the + underlying EIS instance. The optional description specifies + any resource adapter specific requirement for the support of + security contract and authentication mechanism. + + Note that BasicPassword mechanism type should support the + jakarta.resource.spi.security.PasswordCredential interface. + The Kerbv5 mechanism type should support the + org.ietf.jgss.GSSCredential interface or the deprecated + jakarta.resource.spi.security.GenericCredential interface. + + + + + + + + + BasicPassword + + + Kerbv5 + + + Any additional security mechanisms are outside the + scope of the Jakarta Connectors architecture specification. + + ]]> + + + + + + + + + + + + + + + ServerName + + ]]> + + + + + + + + + + + + + + java.lang.String + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + The config-propertyType contains a declaration of a single + configuration property that may be used for providing + configuration information. + + The declaration consists of an optional description, name, + type and an optional value of the configuration property. If + the resource adapter provider does not specify a value than + the deployer is responsible for providing a valid value for + a configuration property. + + Any bounds or well-defined values of properties should be + described in the description element. + + + + + + + + + + + WombatServer + + ]]> + + + + + + + + The element config-property-ignore is used to specify + whether the configuration tools must ignore considering the + configuration property during auto-discovery of + Configuration properties. See the Jakarta Connectors specification for + more details. If unspecified, the container must not ignore + the configuration property during auto-discovery. + This element must be one of the following, "true" or "false". + + + + + + + + + The element config-property-supports-dynamic-updates is used to specify + whether the configuration property allows its value to be updated, by + application server's configuration tools, during the lifetime of + the JavaBean instance. See the Jakarta Connectors specification for + more details. If unspecified, the container must not dynamically + reconfigure the property. + This element must be one of the following, "true" or "false". + + + + + + + + + The element config-property-confidential is used to specify + whether the configuration property is confidential and + recommends application server's configuration tools to use special + visual aids for editing them. See the Jakarta Connectors specification for + more details. If unspecified, the container must not treat the + property as confidential. + This element must be one of the following, "true" or "false". + + + + + + + + + + + + + + + + The connection-definitionType defines a set of connection + interfaces and classes pertaining to a particular connection + type. This also includes configurable properties for + ManagedConnectionFactory instances that may be produced out + of this set. + + + + + + + + + com.wombat.ManagedConnectionFactoryImpl + + + ]]> + + + + + + + + com.wombat.ConnectionFactory + + + OR + + jakarta.resource.cci.ConnectionFactory + + + ]]> + + + + + + + com.wombat.ConnectionFactoryImpl + + + ]]> + + + + + + + jakarta.resource.cci.Connection + + + ]]> + + + + + + + com.wombat.ConnectionImpl + + + ]]> + + + + + + + + + + + + + + + The connectorType defines a resource adapter. + + + + + + + + + The element module-name specifies the name of the + resource adapter. + + If there is no module-name specified, the module-name + is determined as defined in Section EE.8.1.1 and EE.8.1.2 + of the Java Platform, Enterprise Edition (Jakarta EE) + Specification, version 6. + + + + + + + + + + The element vendor-name specifies the name of + resource adapter provider vendor. + + If there is no vendor-name specified, the application + server must consider the default "" (empty string) as + the name of the resource adapter provider vendor. + + + + + + + + + The element eis-type contains information about the + type of the EIS. For example, the type of an EIS can + be product name of EIS independent of any version + info. + + This helps in identifying EIS instances that can be + used with this resource adapter. + + If there is no eis-type specified, the application + server must consider the default "" (empty string) as + the type of the EIS. + + + + + + + + + The element resourceadapter-version specifies a string-based version + of the resource adapter from the resource adapter + provider. + + If there is no resourceadapter-version specified, the application + server must consider the default "" (empty string) as + the version of the resource adapter. + + + + + + + + + + + + The element required-work-context specifies a fully qualified class + name that implements WorkContext interface, that the resource adapter + requires the application server to support. + + + + + + + + + + The version indicates the version of the schema to be used by the + deployment tool. This element doesn't have a default, and the resource adapter + developer/deployer is required to specify it. The element allows the deployment + tool to choose which schema to validate the descriptor against. + + + + + + + + + + The metadata-complete attribute defines whether the deployment + descriptor for the resource adapter module is complete, or whether + the class files available to the module and packaged with the resource + adapter should be examined for annotations that specify deployment + information. + + If metadata-complete is set to "true", the deployment tool of the + application server must ignore any annotations that specify deployment + information, which might be present in the class files of the + application.If metadata-complete is not specified or is set to "false", + the deployment tool must examine the class files of the application for + annotations, as specified by this specification. If the + deployment descriptor is not included or is included but not marked + metadata-complete, the deployment tool will process annotations. + + Application servers must assume that metadata-complete is true for + resource adapter modules with deployment descriptor version + lower than 1.6. + + + + + + + + + + + + + + + The credential-interfaceType specifies the + interface that the resource adapter implementation + supports for the representation of the + credentials. This element(s) that use this type, + i.e. credential-interface, should be used by + application server to find out the Credential + interface it should use as part of the security + contract. + + The possible values are: + + jakarta.resource.spi.security.PasswordCredential + org.ietf.jgss.GSSCredential + jakarta.resource.spi.security.GenericCredential + + + + + + + + + + + + + + + + + + + + The inbound-resourceadapterType specifies information + about an inbound resource adapter. This contains information + specific to the implementation of the resource adapter + library as specified through the messageadapter element. + + + + + + + + + + The messagelistener-type element content must be + unique in the messageadapter. Several messagelisteners + can not use the same messagelistener-type. + + + + + + + + + + + + + + + + + + + The licenseType specifies licensing requirements for the + resource adapter module. This type specifies whether a + license is required to deploy and use this resource adapter, + and an optional description of the licensing terms + (examples: duration of license, number of connection + restrictions). It is used by the license element. + + + + + + + + + + The element license-required specifies whether a + license is required to deploy and use the + resource adapter. This element must be one of + the following, "true" or "false". + + + + + + + + + + + + + + + + The messageadapterType specifies information about the + messaging capabilities of the resource adapter. This + contains information specific to the implementation of the + resource adapter library as specified through the + messagelistener element. + + + + + + + + + + + + + + + + + The messagelistenerType specifies information about a + specific message listener supported by the messaging + resource adapter. It contains information on the Java type + of the message listener interface and an activation + specification. + + + + + + + + jakarta.jms.MessageListener + + + ]]> + + + + + + + + + + + + + + + + The outbound-resourceadapterType specifies information about + an outbound resource adapter. The information includes fully + qualified names of classes/interfaces required as part of + the connector architecture specified contracts for + connection management, level of transaction support + provided, one or more authentication mechanisms supported + and additional required security permissions. + + If any of the outbound resource adapter elements (transaction-support, + authentication-mechanism, reauthentication-support) is specified through + this element or metadata annotations, and no connection-definition is + specified as part of this element or through annotations, the + application server must consider this an error and fail deployment. + + If there is no authentication-mechanism specified as part of + this element or metadata annotations, then the resource adapter does + not support any standard security authentication mechanisms as + part of security contract. The application server ignores the security + part of the system contracts in this case. + + If there is no transaction-support specified as part of this element + or metadata annotation, then the application server must consider that + the resource adapter does not support either the resource manager local + or Jakarta Transactions transactions and must consider the transaction support as + NoTransaction. Note that resource adapters may specify the level of + transaction support to be used at runtime for a ManagedConnectionFactory + through the TransactionSupport interface. + + If there is no reauthentication-support specified as part of + this element or metadata annotation, then the application server must consider + that the resource adapter does not support re-authentication of + ManagedConnections. + + + + + + + + + + + + The element reauthentication-support specifies + whether the resource adapter implementation supports + re-authentication of existing Managed- Connection + instance. Note that this information is for the + resource adapter implementation and not for the + underlying EIS instance. This element must have + either a "true" or "false" value. + + + + + + + + + + + + + + + + + Destination + + + ]]> + + + + + + + + + + + + + + + + + The resourceadapterType specifies information about the + resource adapter. The information includes fully qualified + resource adapter Java class name, configuration properties, + information specific to the implementation of the resource + adapter library as specified through the + outbound-resourceadapter and inbound-resourceadapter + elements, and an optional set of administered objects. + + + + + + + + + The element resourceadapter-class specifies the + fully qualified name of a Java class that implements + the jakarta.resource.spi.ResourceAdapter + interface. This Java class is provided as part of + resource adapter's implementation of connector + architecture specified contracts. The implementation + of this class is required to be a JavaBean. + + + + + + + + + + + The connectionfactory-interface element content + must be unique in the outbound-resourceadapter. + Multiple connection-definitions can not use the + same connectionfactory-type. + + + + + + + + + + + + + + The adminobject-interface and adminobject-class element content must be + unique in the resourceadapterType. Several admin objects + can not use the same adminobject-interface and adminobject-class. + + + + + + + + + + + + + + + + + + + + + The security-permissionType specifies a security + permission that is required by the resource adapter code. + + The security permission listed in the deployment descriptor + are ones that are different from those required by the + default permission set as specified in the connector + specification. The optional description can mention specific + reason that resource adapter requires a given security + permission. + + + + + + + + + + The element security-permission-spec specifies a security + permission based on the Security policy file + syntax. Refer to the following URL for Sun's + implementation of the security permission + specification: + + http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html + + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd new file mode 100644 index 000000000000..4f8e7c01a084 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jakartaee_11.xsd @@ -0,0 +1,3631 @@ + + + + + + + Copyright (c) 2009, 2023 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + The following definitions that appear in the common + shareable schema(s) of Jakarta EE deployment descriptors should be + interpreted with respect to the context they are included: + + + Deployment Component may indicate one of the following: + Jakarta EE application; + application client; + web application; + enterprise bean; + resource adapter; + + Deployment File may indicate one of the following: + ear file; + war file; + jar file; + rar file; + + + + + + + + + + + + + + + This group keeps the usage of the contained description related + elements consistent across Jakarta EE deployment descriptors. + + All elements may occur multiple times with different languages, + to support localization of the content. + + + + + + + + + + + + + + + + + This group keeps the usage of the contained JNDI environment + reference elements consistent across Jakarta EE deployment descriptors. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This group collects elements that are common to most + JNDI resource elements. + + + + + + + + + + + + The JNDI name to be looked up to resolve a resource reference. + + + + + + + + + + + + + + + This group collects elements that are common to all the + JNDI resource elements. It does not include the lookup-name + element, that is only applicable to some resource elements. + + + + + + + + + + + + + + + + + + + + + + + + Configuration of an administered object. + + + + + + + + + Description of this administered object. + + + + + + + + + The name element specifies the JNDI name of the + administered object being defined. + + + + + + + + + The administered object's interface type. + + + + + + + + + The administered object's class name. + + + + + + + + + Resource adapter name. + + + + + + + + + Property of the administered object property. This may be a + vendor-specific property. + + + + + + + + + + + + + + + Configuration of a Connector Connection Factory resource. + + + + + + + + + Description of this resource. + + + + + + + + + The name element specifies the JNDI name of the + resource being defined. + + + + + + + + + The fully qualified class name of the connection factory + interface. + + + + + + + + + + Resource adapter name. + + + + + + + + + Maximum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + Minimum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + The level of transaction support the connection factory + needs to support. + + + + + + + + + Resource property. This may be a vendor-specific + property. + + + + + + + + + + + + + + + Configuration of a ContextService. + + + + + + + + + Description of this ContextService. + + + + + + + + + JNDI name of the ContextService instance being defined. + The JNDI name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + + + + + + + + + A ContextService injection point annotated with these qualifier annotations + injects a bean that is produced by this context-service element. + Applications can define their own Producers for ContextService injection points + as long as the qualifier annotations on the producer do not conflict with the + non-empty qualifier list of a context-service. + + You can specify a single qualifier element with no value to indicate an + empty list of qualifier annotation classes. + + + + + + + + + Types of context to clear whenever a thread runs a + contextual task or action. The thread's previous context + is restored afterward. Context types that are defined by + the Jakarta EE Concurrency specification include: + Application, Security, Transaction, + and Remaining, which means all available thread context + types that are not specified elsewhere. You can also specify + vendor-specific context types. Absent other configuration, + cleared context defaults to Transaction. You can specify + a single cleared element with no value to indicate an + empty list of context types to clear. If neither + propagated nor unchanged specify (or default to) Remaining, + then Remaining is automatically appended to the list of + cleared context types. + + + + + + + + + Types of context to capture from the requesting thread + and propagate to a thread that runs a contextual task + or action. The captured context is re-established + when threads run the contextual task or action, + with the respective thread's previous context being + restored afterward. Context types that are defined by + the Jakarta EE Concurrency specification include: + Application, Security, + and Remaining, which means all available thread context + types that are not specified elsewhere. You can also specify + vendor-specific context types. Absent other configuration, + propagated context defaults to Remaining. You can specify + a single propagated element with no value to indicate that + no context types should be propagated. + + + + + + + + + Types of context that are left alone when a thread runs a + contextual task or action. Context types that are defined + by the Jakarta EE Concurrency specification include: + Application, Security, Transaction, + and Remaining, which means all available thread context + types that are not specified elsewhere. You can also specify + vendor-specific context types. Absent other configuration, + unchanged context defaults to empty. You can specify + a single unchanged element with no value to indicate that + no context types should be left unchanged. + + + + + + + + + Vendor-specific property. + + + + + + + + + + + + + + + + Configuration of a DataSource. + + + + + + + + + Description of this DataSource. + + + + + + + + + The name element specifies the JNDI name of the + data source being defined. + + + + + + + + + + DataSource, XADataSource or ConnectionPoolDataSource + implementation class. + + + + + + + + + Database server name. + + + + + + + + + Port number where a server is listening for requests. + + + + + + + + + Name of a database on a server. + + + + + + + + url property is specified + along with other standard DataSource properties + such as serverName, databaseName + and portNumber, the more specific properties will + take precedence and url will be ignored. + + ]]> + + + + + + + + User name to use for connection authentication. + + + + + + + + + Password to use for connection authentication. + + + + + + + + + JDBC DataSource property. This may be a vendor-specific + property or a less commonly used DataSource property. + + + + + + + + + Sets the maximum time in seconds that this data source + will wait while attempting to connect to a database. + + + + + + + + + Set to false if connections should not participate in + transactions. + + + + + + + + + Isolation level for connections. + + + + + + + + + Number of connections that should be created when a + connection pool is initialized. + + + + + + + + + Maximum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + Minimum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + The number of seconds that a physical connection should + remain unused in the pool before the connection is + closed for a connection pool. + + + + + + + + + The total number of statements that a connection pool + should keep open. + + + + + + + + + + + + + + + + The description type is used by a description element to + provide text describing the parent element. The elements + that use this type should include any information that the + Deployment Component's Deployment File file producer wants + to provide to the consumer of the Deployment Component's + Deployment File (i.e., to the Deployer). Typically, the + tools used by such a Deployment File consumer will display + the description when processing the parent element that + contains the description. + + The lang attribute defines the language that the + description is provided in. The default value is "en" (English). + + + + + + + + + + + + + + + + + This type defines a dewey decimal that is used + to describe versions of documents. + + + + + + + + + + + + + + + + Employee Self Service + + + The value of the xml:lang attribute is "en" (English) by default. + + ]]> + + + + + + + + + + + + + + + EmployeeRecord + + ../products/product.jar#ProductEJB + + ]]> + + + + + + + + + + + + + + The ejb-local-refType is used by ejb-local-ref elements for + the declaration of a reference to an enterprise bean's local + home or to the local business interface of a 3.0 bean. + The declaration consists of: + + - an optional description + - the enterprise bean's reference name used in the code of the + Deployment Component that's referencing the enterprise bean. + - the optional expected type of the referenced enterprise bean + - the optional expected local interface of the referenced + enterprise bean or the local business interface of the + referenced enterprise bean. + - the optional expected local home interface of the referenced + enterprise bean. Not applicable if this ejb-local-ref refers + to the local business interface of a 3.0 bean. + - optional ejb-link information, used to specify the + referenced enterprise bean + - optional elements to define injection of the named enterprise + bean into a component field or property. + + + + + + + + + + + + + + + + + + + + + + ejb/Payroll + + ]]> + + + + + + + + + + + + + + The ejb-refType is used by ejb-ref elements for the + declaration of a reference to an enterprise bean's home or + to the remote business interface of a 3.0 bean. + The declaration consists of: + + - an optional description + - the enterprise bean's reference name used in the code of + the Deployment Component that's referencing the enterprise + bean. + - the optional expected type of the referenced enterprise bean + - the optional remote interface of the referenced enterprise bean + or the remote business interface of the referenced enterprise + bean + - the optional expected home interface of the referenced + enterprise bean. Not applicable if this ejb-ref + refers to the remote business interface of a 3.0 bean. + - optional ejb-link information, used to specify the + referenced enterprise bean + - optional elements to define injection of the named enterprise + bean into a component field or property + + + + + + + + + + + + + + + + + + + + + + + + The ejb-ref-typeType contains the expected type of the + referenced enterprise bean. + + The ejb-ref-type designates a value + that must be one of the following: + + Entity + Session + + + + + + + + + + + + + + + + + + This type is used to designate an empty + element when used. + + + + + + + + + + + + + The env-entryType is used to declare an application's + environment entry. The declaration consists of an optional + description, the name of the environment entry, a type + (optional if the value is injected, otherwise required), and + an optional value. + + It also includes optional elements to define injection of + the named resource into fields or JavaBeans properties. + + If a value is not specified and injection is requested, + no injection will occur and no entry of the specified name + will be created. This allows an initial value to be + specified in the source code without being incorrectly + changed when no override has been specified. + + If a value is not specified and no injection is requested, + a value must be supplied during deployment. + + This type is used by env-entry elements. + + + + + + + + + + minAmount + + ]]> + + + + + + + + java.lang.Integer + + ]]> + + + + + + + + 100.00 + + ]]> + + + + + + + + + + + + + + + + java.lang.Boolean + java.lang.Class + com.example.Color + + ]]> + + + + + + + + + + + + + + The elements that use this type designate the name of a + Java class or interface. The name is in the form of a + "binary name", as defined in the JLS. This is the form + of name used in Class.forName(). Tools that need the + canonical name (the name used in source code) will need + to convert this binary name to the canonical name. + + + + + + + + + + + + + + + This type defines four different values which can designate + boolean values. This includes values yes and no which are + not designated by xsd:boolean + + + + + + + + + + + + + + + + + + + + The icon type contains small-icon and large-icon elements + that specify the file names for small and large GIF, JPEG, + or PNG icon images used to represent the parent element in a + GUI tool. + + The xml:lang attribute defines the language that the + icon file names are provided in. Its value is "en" (English) + by default. + + + + + + + + + employee-service-icon16x16.jpg + + ]]> + + + + + + + employee-service-icon32x32.jpg + + ]]> + + + + + + + + + + + + + + + + + + An injection target specifies a class and a name within + that class into which a resource should be injected. + + The injection target class specifies the fully qualified + class name that is the target of the injection. The + Jakarta EE specifications describe which classes can be an + injection target. + + The injection target name specifies the target within + the specified class. The target is first looked for as a + JavaBeans property name. If not found, the target is + looked for as a field name. + + The specified resource will be injected into the target + during initialization of the class by either calling the + set method for the target property or by setting a value + into the named field. + + + + + + + + + + + + + + + + The following transaction isolation levels are allowed + (see documentation for the java.sql.Connection interface): + TRANSACTION_READ_UNCOMMITTED + TRANSACTION_READ_COMMITTED + TRANSACTION_REPEATABLE_READ + TRANSACTION_SERIALIZABLE + + + + + + + + + + + + + + + + + + The java-identifierType defines a Java identifier. + The users of this type should further verify that + the content does not contain Java reserved keywords. + + + + + + + + + + + + + + + + + This is a generic type that designates a Java primitive + type or a fully qualified name of a Java interface/type, + or an array of such types. + + + + + + + + + + + + + + + + : + + Example: + + jdbc:mysql://localhost:3307/testdb + + ]]> + + + + + + + + + + + + + + + + Configuration of a Messaging Connection Factory. + + + + + + + + + Description of this Messaging Connection Factory. + + + + + + + + + The name element specifies the JNDI name of the + messaging connection factory being defined. + + + + + + + + + Fully-qualified name of the messaging connection factory + interface. Permitted values are jakarta.jms.ConnectionFactory, + jakarta.jms.QueueConnectionFactory, or + jakarta.jms.TopicConnectionFactory. If not specified, + jakarta.jms.ConnectionFactory will be used. + + + + + + + + + Fully-qualified name of the messaging connection factory + implementation class. Ignored if a resource adapter + is used. + + + + + + + + + Resource adapter name. If not specified, the application + server will define the default behavior, which may or may + not involve the use of a resource adapter. + + + + + + + + + User name to use for connection authentication. + + + + + + + + + Password to use for connection authentication. + + + + + + + + + Client id to use for connection. + + + + + + + + + Messaging Connection Factory property. This may be a vendor-specific + property or a less commonly used ConnectionFactory property. + + + + + + + + + Set to false if connections should not participate in + transactions. + + + + + + + + + Maximum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + Minimum number of connections that should be concurrently + allocated for a connection pool. + + + + + + + + + + + + + + + + Configuration of a Messaging Destination. + + + + + + + + + Description of this Messaging Destination. + + + + + + + + + The name element specifies the JNDI name of the + messaging destination being defined. + + + + + + + + + Fully-qualified name of the messaging destination interface. + Permitted values are jakarta.jms.Queue and jakarta.jms.Topic + + + + + + + + + Fully-qualified name of the messaging destination implementation + class. Ignored if a resource adapter is used unless the + resource adapter defines more than one destination implementation + class for the specified interface. + + + + + + + + + Resource adapter name. If not specified, the application + server will define the default behavior, which may or may + not involve the use of a resource adapter. + + + + + + + + + Name of the queue or topic. + + + + + + + + + Messaging Destination property. This may be a vendor-specific + property or a less commonly used Destination property. + + + + + + + + + + + + + + + + + The jndi-nameType type designates a JNDI name in the + Deployment Component's environment and is relative to the + java:comp/env context. A JNDI name must be unique within the + Deployment Component. + + + + + + + + + + + + + + com.aardvark.payroll.PayrollHome + + ]]> + + + + + + + + + + + + + + + The lifecycle-callback type specifies a method on a + class to be called when a lifecycle event occurs. + Note that each class may have only one lifecycle callback + method for any given event and that the method may not + be overloaded. + + If the lifefycle-callback-class element is missing then + the class defining the callback is assumed to be the + component class in scope at the place in the descriptor + in which the callback definition appears. + + + + + + + + + + + + + + + + The listenerType indicates the deployment properties for a web + application listener bean. + + + + + + + + + + + The listener-class element declares a class in the + application must be registered as a web + application listener bean. The value is the fully + qualified classname of the listener class. + + + + + + + + + + + + + + + The localType defines the fully-qualified name of an + enterprise bean's local interface. + + + + + + + + + + + + + + + The local-homeType defines the fully-qualified + name of an enterprise bean's local home interface. + + + + + + + + + + + + + + + Configuration of a Mail Session resource. + + + + + + + + + Description of this Mail Session resource. + + + + + + + + + The name element specifies the JNDI name of the + Mail Session resource being defined. + + + + + + + + + Storage protocol. + + + + + + + + + Service provider store protocol implementation class + + + + + + + + + Transport protocol. + + + + + + + + + Service provider transport protocol implementation class + + + + + + + + + Mail server host name. + + + + + + + + + Mail server user name. + + + + + + + + + Password. + + + + + + + + + Email address to indicate the message sender. + + + + + + + + + Mail server property. This may be a vendor-specific + property. + + + + + + + + + + + + + + + + Configuration of a ManagedExecutorService. + + + + + + + + + Description of this ManagedExecutorService. + + + + + + + + + JNDI name of the ManagedExecutorService instance being defined. + The JNDI name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + + + + + + + + + Refers to the name of a ContextServiceDefinition or + context-service deployment descriptor element, + which determines how context is applied to tasks and actions + that run on this executor. + The name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + In the absence of a configured value, + java:comp/DefaultContextService is used. + + + + + + + + + A ManagedExecutorService injection point annotated with these qualifier annotations + injects a bean that is produced by this managed-executor element. + Applications can define their own Producers for ManagedExecutorService injection points + as long as the qualifier annotations on the producer do not conflict with the + non-empty qualifier list of a managed-executor. + + You can specify a single qualifier element with no value to indicate an + empty list of qualifier annotation classes. + + + + + + + + + Upper bound on contextual tasks and actions that this executor + will simultaneously execute asynchronously. This constraint does + not apply to tasks and actions that the executor runs inline, + such as when a thread requests CompletableFuture.join and the + action runs inline if it has not yet started. + The default is unbounded, although still subject to + resource constraints of the system. + + + + + + + + + The amount of time in milliseconds that a task or action + can execute before it is considered hung. + + + + + + + + + Indicates whether this executor is requested to + create virtual threads for tasks that do not run inline. + When true, the executor can create + virtual threads if it is capable of doing so + and if the request is not overridden by vendor-specific + configuration that restricts the use of virtual threads. + + + + + + + + + Vendor-specific property. + + + + + + + + + + + + + + + + Configuration of a ManagedScheduledExecutorService. + + + + + + + + + Description of this ManagedScheduledExecutorService. + + + + + + + + + JNDI name of the ManagedScheduledExecutorService instance + being defined. + The JNDI name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + + + + + + + + + Refers to the name of a ContextServiceDefinition or + context-service deployment descriptor element, + which determines how context is applied to tasks and actions + that run on this executor. + The name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + In the absence of a configured value, + java:comp/DefaultContextService is used. + + + + + + + + + A ManagedScheduledExecutorService injection point annotated with these qualifier annotations + injects a bean that is produced by this managed-scheduled-executor element. + Applications can define their own Producers for ManagedScheduledExecutorService injection points + as long as the qualifier annotations on the producer do not conflict with the + non-empty qualifier list of a managed-scheduled-executor. + + You can specify a single qualifier element with no value to indicate an + empty list of qualifier annotation classes. + + + + + + + + + Upper bound on contextual tasks and actions that this executor + will simultaneously execute asynchronously. This constraint does + not apply to tasks and actions that the executor runs inline, + such as when a thread requests CompletableFuture.join and the + action runs inline if it has not yet started. This constraint also + does not apply to tasks that are scheduled via the schedule methods. + The default is unbounded, although still subject to + resource constraints of the system. + + + + + + + + + The amount of time in milliseconds that a task or action + can execute before it is considered hung. + + + + + + + + + Indicates whether this executor is requested to + create virtual threads for tasks that do not run inline. + When true, the executor can create + virtual threads if it is capable of doing so + and if the request is not overridden by vendor-specific + configuration that restricts the use of virtual threads. + + + + + + + + + Vendor-specific property. + + + + + + + + + + + + + + + + Configuration of a ManagedThreadFactory. + + + + + + + + + Description of this ManagedThreadFactory. + + + + + + + + + JNDI name of the ManagedThreadFactory instance being defined. + The JNDI name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + + + + + + + + + Refers to the name of a ContextServiceDefinition or + context-service deployment descriptor element, + which determines how context is applied to threads + from this thread factory. + The name must be in a valid Jakarta EE namespace, + such as java:comp, java:module, java:app, or java:global. + In the absence of a configured value, + java:comp/DefaultContextService is used. + + + + + + + + + A ManagedThreadFactory injection point annotated with these qualifier annotations + injects a bean that is produced by this managed-thread-factory element. + Applications can define their own Producers for ManagedThreadFactory injection points + as long as the qualifier annotations on the producer do not conflict with the + non-empty qualifier list of a managed-thread-factory. + + You can specify a single qualifier element with no value to indicate an + empty list of qualifier annotation classes. + + + + + + + + + Priority for threads created by this thread factory. + The default is 5 (java.lang.Thread.NORM_PRIORITY). + + + + + + + + + Indicates whether this executor is requested to + create virtual threads for tasks that do not run inline. + When true, the executor can create + virtual threads if it is capable of doing so + and if the request is not overridden by vendor-specific + configuration that restricts the use of virtual threads. + + + + + + + + + Vendor-specific property. + + + + + + + + + + + + + + + + This type is a general type that can be used to declare + parameter/value lists. + + + + + + + + + + + The param-name element contains the name of a + parameter. + + + + + + + + + + The param-value element contains the value of a + parameter. + + + + + + + + + + + + + + + The elements that use this type designate either a relative + path or an absolute path starting with a "/". + + In elements that specify a pathname to a file within the + same Deployment File, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the Deployment File's namespace. Absolute filenames (i.e., + those starting with "/") also specify names in the root of + the Deployment File's namespace. In general, relative names + are preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + myPersistenceContext + + + + + myPersistenceContext + + PersistenceUnit1 + + Extended + + + ]]> + + + + + + + + + The persistence-context-ref-name element specifies + the name of a persistence context reference; its + value is the environment entry name used in + Deployment Component code. The name is a JNDI name + relative to the java:comp/env context. + + + + + + + + + The Application Assembler(or BeanProvider) may use the + following syntax to avoid the need to rename persistence + units to have unique names within a Jakarta EE application. + + The Application Assembler specifies the pathname of the + root of the persistence.xml file for the referenced + persistence unit and appends the name of the persistence + unit separated from the pathname by #. The pathname is + relative to the referencing application component jar file. + In this manner, multiple persistence units with the same + persistence unit name may be uniquely identified when the + Application Assembler cannot change persistence unit names. + + + + + + + + + + + + + + Used to specify properties for the container or persistence + provider. Vendor-specific properties may be included in + the set of properties. Properties that are not recognized + by a vendor must be ignored. Entries that make use of the + namespace jakarta.persistence and its subnamespaces must not + be used for vendor-specific properties. The namespace + jakarta.persistence is reserved for use by the specification. + + + + + + + + + + + + + + + + + + + The persistence-context-synchronizationType specifies + whether a container-managed persistence context is automatically + synchronized with the current transaction. + + The value of the persistence-context-synchronization element + must be one of the following: + Synchronized + Unsynchronized + + + + + + + + + + + + + + + + + The persistence-context-typeType specifies the transactional + nature of a persistence context reference. + + The value of the persistence-context-type element must be + one of the following: + Transaction + Extended + + + + + + + + + + + + + + + + + + Specifies a thread priority value in the range of + 1 (java.lang.Thread.MIN_PRIORITY) to 10 (java.lang.Thread.MAX_PRIORITY). + + + + + + + + + + + + + + + + + Specifies a name/value pair. + + + + + + + + + + + + + + + + + + + + myPersistenceUnit + + + + + myPersistenceUnit + + PersistenceUnit1 + + + + ]]> + + + + + + + + + The persistence-unit-ref-name element specifies + the name of a persistence unit reference; its + value is the environment entry name used in + Deployment Component code. The name is a JNDI name + relative to the java:comp/env context. + + + + + + + + + The Application Assembler(or BeanProvider) may use the + following syntax to avoid the need to rename persistence + units to have unique names within a Jakarta EE application. + + The Application Assembler specifies the pathname of the + root of the persistence.xml file for the referenced + persistence unit and appends the name of the persistence + unit separated from the pathname by #. The pathname is + relative to the referencing application component jar file. + In this manner, multiple persistence units with the same + persistence unit name may be uniquely identified when the + Application Assembler cannot change persistence unit names. + + + + + + + + + + + + + + + + + + com.wombat.empl.EmployeeService + + ]]> + + + + + + + + + + + + + + jms/StockQueue + + jakarta.jms.Queue + + + + ]]> + + + + + + + + + + The resource-env-ref-name element specifies the name + of a resource environment reference; its value is + the environment entry name used in + the Deployment Component code. The name is a JNDI + name relative to the java:comp/env context and must + be unique within a Deployment Component. + + + + + + + + + + The resource-env-ref-type element specifies the type + of a resource environment reference. It is the + fully qualified name of a Java language class or + interface. + + + + + + + + + + + + + + + + + + jdbc/EmployeeAppDB + javax.sql.DataSource + Container + Shareable + + + ]]> + + + + + + + + + + The res-ref-name element specifies the name of a + resource manager connection factory reference. + The name is a JNDI name relative to the + java:comp/env context. + The name must be unique within a Deployment File. + + + + + + + + + + The res-type element specifies the type of the data + source. The type is specified by the fully qualified + Java language class or interface + expected to be implemented by the data source. + + + + + + + + + + + + + + + + + + + + + + The res-authType specifies whether the Deployment Component + code signs on programmatically to the resource manager, or + whether the Container will sign on to the resource manager + on behalf of the Deployment Component. In the latter case, + the Container uses information that is supplied by the + Deployer. + + The value must be one of the two following: + + Application + Container + + + + + + + + + + + + + + + + + + The res-sharing-scope type specifies whether connections + obtained through the given resource manager connection + factory reference can be shared. The value, if specified, + must be one of the two following: + + Shareable + Unshareable + + The default value is Shareable. + + + + + + + + + + + + + + + + + + The run-asType specifies the run-as identity to be + used for the execution of a component. It contains an + optional description, and the name of a security role. + + + + + + + + + + + + + + + + + + The role-nameType designates the name of a security role. + + The name must conform to the lexical rules for a token. + + + + + + + + + + + + + + + + + This role includes all employees who are authorized + to access the employee service application. + + employee + + + ]]> + + + + + + + + + + + + + + + + + The security-role-refType contains the declaration of a + security role reference in a component's or a + Deployment Component's code. The declaration consists of an + optional description, the security role name used in the + code, and an optional link to a security role. If the + security role is not specified, the Deployer must choose an + appropriate security role. + + + + + + + + + + + The value of the role-name element must be the String used + as the parameter to the + EJBContext.isCallerInRole(String roleName) method or the + HttpServletRequest.isUserInRole(String role) method. + + + + + + + + + + The role-link element is a reference to a defined + security role. The role-link element must contain + the name of one of the security roles defined in the + security-role elements. + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:QName. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:boolean. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:NMTOKEN. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:anyURI. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:integer. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:positiveInteger. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:nonNegativeInteger. + + + + + + + + + + + + + + + + + This type adds an "id" attribute to xsd:string. + + + + + + + + + + + + + + + + + This is a special string datatype that is defined by Jakarta EE as + a base type for defining collapsed strings. When schemas + require trailing/leading space elimination as well as + collapsing the existing whitespace, this base type may be + used. + + + + + + + + + + + + + + + + + This simple type designates a boolean with only two + permissible values + + - true + - false + + + + + + + + + + + + + + + + + The url-patternType contains the url pattern of the mapping. + It must follow the rules specified in Section 11.2 of the + Servlet API Specification. This pattern is assumed to be in + URL-decoded form and must not contain CR(#xD) or LF(#xA). + If it contains those characters, the container must inform + the developer with a descriptive error message. + The container must preserve all characters including whitespaces. + + + + + + + + + + + + + + + CorporateStocks + + + + ]]> + + + + + + + + + The message-destination-name element specifies a + name for a message destination. This name must be + unique among the names of message destinations + within the Deployment File. + + + + + + + + + + + + + + + + + The JNDI name to be looked up to resolve the message destination. + + + + + + + + + + + + + + + + jms/StockQueue + + jakarta.jms.Queue + + Consumes + + CorporateStocks + + + + ]]> + + + + + + + + + The message-destination-ref-name element specifies + the name of a message destination reference; its + value is the environment entry name used in + Deployment Component code. + + + + + + + + + + + + + + + + + + + + + + The message-destination-usageType specifies the use of the + message destination indicated by the reference. The value + indicates whether messages are consumed from the message + destination, produced for the destination, or both. The + Assembler makes use of this information in linking producers + of a destination with its consumers. + + The value of the message-destination-usage element must be + one of the following: + Consumes + Produces + ConsumesProduces + + + + + + + + + + + + + + + + + + jakarta.jms.Queue + + + ]]> + + + + + + + + + + + + + + The message-destination-linkType is used to link a message + destination reference or message-driven bean to a message + destination. + + The Assembler sets the value to reflect the flow of messages + between producers and consumers in the application. + + The value must be the message-destination-name of a message + destination in the same Deployment File or in another + Deployment File in the same Jakarta EE application unit. + + Alternatively, the value may be composed of a path name + specifying a Deployment File containing the referenced + message destination with the message-destination-name of the + destination appended and separated from the path name by + "#". The path name is relative to the Deployment File + containing Deployment Component that is referencing the + message destination. This allows multiple message + destinations with the same name to be uniquely identified. + + + + + + + + + + + + + + + The transaction-supportType specifies the level of + transaction support provided by the resource adapter. It is + used by transaction-support elements. + + The value must be one of the following: + + NoTransaction + LocalTransaction + XATransaction + + + + + + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd new file mode 100644 index 000000000000..3a8dae9d6c89 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/jsp_4_0.xsd @@ -0,0 +1,380 @@ + + + + + + Copyright (c) 2009, 2023 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + This is the XML Schema for the JSP 4.0 deployment descriptor + types. The JSP 4.0 schema contains all the special + structures and datatypes that are necessary to use JSP files + from a web application. + + The contents of this schema is used by the web-common_6_1.xsd + file to define JSP specific content. + + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + The jsp-configType is used to provide global configuration + information for the JSP files in a web application. It has + two subelements, taglib and jsp-property-group. + + + + + + + + + + + + + + + + + + The jsp-file element contains the full path to a JSP file + within the web application beginning with a `/'. + + + + + + + + + + + + + + + + The jsp-property-groupType is used to group a number of + files so they can be given global property information. + All files so described are deemed to be JSP files. The + following additional properties can be described: + + - Control whether EL is ignored. + - Control whether scripting elements are invalid. + - Indicate pageEncoding information. + - Indicate that a resource is a JSP document (XML). + - Prelude and Coda automatic includes. + - Control whether the character sequence #{ is allowed + when used as a String literal. + - Control whether template text containing only + whitespaces must be removed from the response output. + - Indicate the default contentType information. + - Indicate the default buffering model for JspWriter + - Control whether error should be raised for the use of + undeclared namespaces in a JSP page. + + + + + + + + + + + + Can be used to easily set the isELIgnored + property of a group of JSP pages. By default, the + EL evaluation is enabled for Web Applications using + a Servlet 2.4 or greater web.xml, and disabled + otherwise. + + + + + + + + + Can be used to easily set the errorOnELNotFound + property of a group of JSP pages. By default, this + property is false. + + + + + + + + + The valid values of page-encoding are those of the + pageEncoding page directive. It is a + translation-time error to name different encodings + in the pageEncoding attribute of the page directive + of a JSP page and in a JSP configuration element + matching the page. It is also a translation-time + error to name different encodings in the prolog + or text declaration of a document in XML syntax and + in a JSP configuration element matching the document. + It is legal to name the same encoding through + mulitple mechanisms. + + + + + + + + + Can be used to easily disable scripting in a + group of JSP pages. By default, scripting is + enabled. + + + + + + + + + If true, denotes that the group of resources + that match the URL pattern are JSP documents, + and thus must be interpreted as XML documents. + If false, the resources are assumed to not + be JSP documents, unless there is another + property group that indicates otherwise. + + + + + + + + + The include-prelude element is a context-relative + path that must correspond to an element in the + Web Application. When the element is present, + the given path will be automatically included (as + in an include directive) at the beginning of each + JSP page in this jsp-property-group. + + + + + + + + + The include-coda element is a context-relative + path that must correspond to an element in the + Web Application. When the element is present, + the given path will be automatically included (as + in an include directive) at the end of each + JSP page in this jsp-property-group. + + + + + + + + + The character sequence #{ is reserved for EL expressions. + Consequently, a translation error occurs if the #{ + character sequence is used as a String literal, unless + this element is enabled (true). Disabled (false) by + default. + + + + + + + + + Indicates that template text containing only whitespaces + must be removed from the response output. It has no + effect on JSP documents (XML syntax). Disabled (false) + by default. + + + + + + + + + The valid values of default-content-type are those of the + contentType page directive. It specifies the default + response contentType if the page directive does not include + a contentType attribute. + + + + + + + + + The valid values of buffer are those of the + buffer page directive. It specifies if buffering should be + used for the output to response, and if so, the size of the + buffer to use. + + + + + + + + + The default behavior when a tag with unknown namespace is used + in a JSP page (regular syntax) is to silently ignore it. If + set to true, then an error must be raised during the translation + time when an undeclared tag is used in a JSP page. Disabled + (false) by default. + + + + + + + + + + + + + + + The taglibType defines the syntax for declaring in + the deployment descriptor that a tag library is + available to the application. This can be done + to override implicit map entries from TLD files and + from the container. + + + + + + + + + + A taglib-uri element describes a URI identifying a + tag library used in the web application. The body + of the taglib-uri element may be either an + absolute URI specification, or a relative URI. + There should be no entries in web.xml with the + same taglib-uri value. + + + + + + + + + + the taglib-location element contains the location + (as a resource relative to the root of the web + application) where to find the Tag Library + Description file for the tag library. + + + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd new file mode 100644 index 000000000000..fdb3c9d6d5e6 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/permissions_10.xsd @@ -0,0 +1,151 @@ + + + + + + Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/permissions_10.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + The permissions element is the root element in a + declared permissions file. The declared permissions file + declares the code based permissions granted to classes and libraries + packaged in the application archive, or in a module if the module is + deployed standalone. + + + + + + + + + + + + + Each permission element declares a permission. If no permission + elements are declared, the application or module needs no special + permissions, and the Jakarta EE product may deploy it with no + permissions beyond those necessary for the operation of the + container. + + For details on the definition of the 'name' and 'actions' + elements, refer to the Java API documentation for the class + java.security.Permission, and its derived classes. + + + + + + + + + + + + + + + + + + + + The required value for the version is 10. + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd new file mode 100644 index 000000000000..a16828a162fc --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.mdd @@ -0,0 +1,856 @@ + + + + + web-app + https://jakarta.ee/xml/ns/jakartaee + WebApp + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.WebApp + + + public org.xml.sax.SAXParseException getError() { + return null; + } + public int getStatus() { + return STATE_VALID; + } + public void setJspConfig(org.netbeans.modules.j2ee.dd.api.web.JspConfig value) { + if (value==null) setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{}); + else setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.JspConfig getSingleJspConfig() { + org.netbeans.modules.j2ee.dd.api.web.JspConfig[] values = getJspConfig(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setWelcomeFileList(org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList value) { + if (value==null) setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{}); + setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList getSingleWelcomeFileList() { + org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[] values = getWelcomeFileList(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setSessionConfig(org.netbeans.modules.j2ee.dd.api.web.SessionConfig value) { + if (value==null) setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{}); + else setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.SessionConfig getSingleSessionConfig() { + org.netbeans.modules.j2ee.dd.api.web.SessionConfig[] values = getSessionConfig(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setLoginConfig(org.netbeans.modules.j2ee.dd.api.web.LoginConfig value) { + if (value==null) setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{}); + else setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.LoginConfig getSingleLoginConfig() { + org.netbeans.modules.j2ee.dd.api.web.LoginConfig[] values = getLoginConfig(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setDistributable(boolean value) { + if (value) setDistributable(new EmptyType[]{new EmptyType()}); + else setDistributable(new EmptyType[]{}); + } + public boolean isDistributable() { + EmptyType[] values = getDistributable(); + if (values==null || values.length==0) return false; + else return true; + } + public void setLocaleEncodingMappingList(org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList value) { + if (value==null) setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{}); + else setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList getSingleLocaleEncodingMappingList() { + org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[] values = getLocaleEncodingMappingList(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setName(String[] value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(WebApp.VERSION_6_1); + } + public String[] getName() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(WebApp.VERSION_6_1); + } + + + + emptyType + https://jakarta.ee/xml/ns/jakartaee + EmptyType + + + param-valueType + https://jakarta.ee/xml/ns/jakartaee + InitParam + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.InitParam, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ParamName"; } + + + + filterType + https://jakarta.ee/xml/ns/jakartaee + Filter + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.Filter, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "FilterName"; } + + + + filter-mappingType + https://jakarta.ee/xml/ns/jakartaee + FilterMapping + + org.netbeans.modules.j2ee.dd.api.web.FilterMapping + + + public String getServletName() { + return this.sizeServletName() > 0 ? (String)this.getValue(SERVLET_NAME, 0) : null; + } + + public void setServletName(String value) { + setServletNames(value != null ? new String[]{value} : new String[]{}); + } + + public String getUrlPattern() { + return this.sizeUrlPattern() > 0 ? (String)this.getValue(URL_PATTERN, 0) : null; + } + + public void setUrlPattern(String value) { + setUrlPatterns(value != null ? new String[]{value} : new String[]{}); + } + + + + listenerType + https://jakarta.ee/xml/ns/jakartaee + Listener + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.Listener + + + + servletType + https://jakarta.ee/xml/ns/jakartaee + Servlet + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.Servlet, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ServletName"; } + + + + servlet-mappingType + https://jakarta.ee/xml/ns/jakartaee + ServletMapping + + org.netbeans.modules.j2ee.dd.api.web.ServletMapping25, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "UrlPattern"; } + + public void setUrlPattern(String value) { + setUrlPatterns(new String[] {value}); + } + + public String getUrlPattern() { + String[] urlPatterns = getUrlPatterns(); + if (urlPatterns != null && urlPatterns.length > 0) { + return urlPatterns[0]; + } + return null; + } + + + + + session-configType + https://jakarta.ee/xml/ns/jakartaee + SessionConfig + org.netbeans.modules.j2ee.dd.impl.common.Comparator + + org.netbeans.modules.j2ee.dd.api.web.SessionConfig + + + + mime-mappingType + https://jakarta.ee/xml/ns/jakartaee + MimeMapping + + org.netbeans.modules.j2ee.dd.api.web.MimeMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "Extension"; } + + + + welcome-file-listType + https://jakarta.ee/xml/ns/jakartaee + WelcomeFileList + + org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList + + + + error-pageType + https://jakarta.ee/xml/ns/jakartaee + ErrorPage + org.netbeans.modules.j2ee.dd.impl.common.Comparator + + org.netbeans.modules.j2ee.dd.api.web.ErrorPage, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ErrorCode"; } + + + + jsp-configType + https://jakarta.ee/xml/ns/jakartaee + JspConfig + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.web.JspConfig + + + + security-constraintType + https://jakarta.ee/xml/ns/jakartaee + SecurityConstraint + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.SecurityConstraint + + + + login-configType + https://jakarta.ee/xml/ns/jakartaee + LoginConfig + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.web.LoginConfig + + + + security-roleType + https://jakarta.ee/xml/ns/jakartaee + SecurityRole + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.SecurityRole, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "RoleName"; } + + + + message-destinationType + https://jakarta.ee/xml/ns/jakartaee + MessageDestination + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.MessageDestination, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "MessageDestinationName"; } + + + + locale-encoding-mapping-listType + https://jakarta.ee/xml/ns/jakartaee + LocaleEncodingMappingList + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList + + + + locale-encoding-mappingType + https://jakarta.ee/xml/ns/jakartaee + LocaleEncodingMapping + + org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "Locale"; } + + + + localeType + https://jakarta.ee/xml/ns/jakartaee + LocaleType + java.lang.String + + + encodingType + https://jakarta.ee/xml/ns/jakartaee + EncodingType + java.lang.String + + + string + https://jakarta.ee/xml/ns/jakartaee + String + java.lang.String + + + descriptionType + https://jakarta.ee/xml/ns/jakartaee + DescriptionType + java.lang.String + + + xsdStringType + https://jakarta.ee/xml/ns/jakartaee + XsdStringType + java.lang.String + + + display-nameType + https://jakarta.ee/xml/ns/jakartaee + DisplayNameType + java.lang.String + + + iconType + https://jakarta.ee/xml/ns/jakartaee + Icon + + org.netbeans.modules.j2ee.dd.api.common.Icon + + + + pathType + https://jakarta.ee/xml/ns/jakartaee + PathType + java.lang.String + + + env-entryType + https://jakarta.ee/xml/ns/jakartaee + EnvEntry + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EnvEntry, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EnvEntryName"; } + + + + ejb-refType + https://jakarta.ee/xml/ns/jakartaee + EjbRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EjbRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EjbRefName"; } + + + + ejb-local-refType + https://jakarta.ee/xml/ns/jakartaee + EjbLocalRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EjbRefName"; } + + + + resource-refType + https://jakarta.ee/xml/ns/jakartaee + ResourceRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ResourceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ResRefName"; } + + + + resource-env-refType + https://jakarta.ee/xml/ns/jakartaee + ResourceEnvRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ResourceEnvRefName"; } + + + + message-destination-refType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "MessageDestinationRefName"; } + + + + persistence-context-refType + https://jakarta.ee/xml/ns/jakartaee + PersistenceContextRefType + + + persistence-unit-refType + https://jakarta.ee/xml/ns/jakartaee + PersistenceUnitRefType + + + lifecycle-callbackType + https://jakarta.ee/xml/ns/jakartaee + LifecycleCallbackType + + + fully-qualified-classType + https://jakarta.ee/xml/ns/jakartaee + FullyQualifiedClassType + java.lang.String + + + java-identifierType + https://jakarta.ee/xml/ns/jakartaee + JavaIdentifierType + java.lang.String + + + jndi-nameType + https://jakarta.ee/xml/ns/jakartaee + JndiNameType + java.lang.String + + + persistence-context-typeType + https://jakarta.ee/xml/ns/jakartaee + PersistenceContextTypeType + java.lang.String + + + propertyType + https://jakarta.ee/xml/ns/jakartaee + PropertyType + + + message-destination-typeType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationTypeType + java.lang.String + + + message-destination-usageType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationUsageType + java.lang.String + + + message-destination-linkType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationLinkType + java.lang.String + + + injection-targetType + https://jakarta.ee/xml/ns/jakartaee + InjectionTarget + org.netbeans.modules.j2ee.dd.api.common.InjectionTarget + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + + res-authType + https://jakarta.ee/xml/ns/jakartaee + ResAuthType + java.lang.String + + + res-sharing-scopeType + https://jakarta.ee/xml/ns/jakartaee + ResSharingScopeType + java.lang.String + + + service-refType + https://jakarta.ee/xml/ns/jakartaee + ServiceRef + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ServiceRefName"; } + + + + xsdAnyURIType + https://jakarta.ee/xml/ns/jakartaee + XsdAnyURIType + java.net.URI + + + xsdQNameType + https://jakarta.ee/xml/ns/jakartaee + XsdQNameType + java.lang.String + + + port-component-refType + https://jakarta.ee/xml/ns/jakartaee + PortComponentRef + + org.netbeans.modules.j2ee.dd.api.common.PortComponentRef + + + + service-ref_handlerType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandler + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "HandlerName"; } + + + + service-ref_handler-chainsType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChains + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains + + + service-ref_handler-chainType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChain + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain + + + service-ref_qname-pattern + https://jakarta.ee/xml/ns/jakartaee + ServiceRefQnamePattern + java.lang.String + + + service-ref_protocol-bindingListType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefProtocolBindingListType + String + + + ejb-ref-nameType + https://jakarta.ee/xml/ns/jakartaee + EjbRefNameType + java.lang.String + + + ejb-ref-typeType + https://jakarta.ee/xml/ns/jakartaee + EjbRefTypeType + java.lang.String + + + local-homeType + https://jakarta.ee/xml/ns/jakartaee + LocalHomeType + java.lang.String + + + localType + https://jakarta.ee/xml/ns/jakartaee + LocalType + java.lang.String + + + ejb-linkType + https://jakarta.ee/xml/ns/jakartaee + EjbLinkType + java.lang.String + + + homeType + https://jakarta.ee/xml/ns/jakartaee + HomeType + java.lang.String + + + remoteType + https://jakarta.ee/xml/ns/jakartaee + RemoteType + java.lang.String + + + env-entry-type-valuesType + https://jakarta.ee/xml/ns/jakartaee + EnvEntryTypeValuesType + java.lang.String + + + role-nameType + https://jakarta.ee/xml/ns/jakartaee + RoleNameType + java.lang.String + + + auth-methodType + https://jakarta.ee/xml/ns/jakartaee + AuthMethodType + java.lang.String + + + form-login-configType + https://jakarta.ee/xml/ns/jakartaee + FormLoginConfig + + org.netbeans.modules.j2ee.dd.api.web.FormLoginConfig + + + + war-pathType + https://jakarta.ee/xml/ns/jakartaee + WarPathType + java.lang.String + + + web-resource-collectionType + https://jakarta.ee/xml/ns/jakartaee + WebResourceCollection + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.WebResourceCollection, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "WebResourceName"; } + + + + auth-constraintType + https://jakarta.ee/xml/ns/jakartaee + AuthConstraint + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.AuthConstraint + + + + user-data-constraintType + https://jakarta.ee/xml/ns/jakartaee + UserDataConstraint + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.UserDataConstraint + + + + transport-guaranteeType + https://jakarta.ee/xml/ns/jakartaee + TransportGuaranteeType + java.lang.String + + + url-patternType + https://jakarta.ee/xml/ns/jakartaee + UrlPatternType + java.lang.String + + + http-methodType + https://jakarta.ee/xml/ns/jakartaee + HttpMethodType + java.lang.String + + + taglibType + https://jakarta.ee/xml/ns/jakartaee + Taglib + + org.netbeans.modules.j2ee.dd.api.web.Taglib, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "TaglibUri"; } + + + + jsp-property-groupType + https://jakarta.ee/xml/ns/jakartaee + JspPropertyGroup + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.JspPropertyGroup + + + + true-falseType + https://jakarta.ee/xml/ns/jakartaee + TrueFalseType + boolean + + + error-codeType + https://jakarta.ee/xml/ns/jakartaee + ErrorCodeType + Integer + + + string + http://www.w3.org/2001/XMLSchema + String + java.lang.String + + + mime-typeType + https://jakarta.ee/xml/ns/jakartaee + MimeTypeType + java.lang.String + + + xsdIntegerType + https://jakarta.ee/xml/ns/jakartaee + XsdIntegerType + java.math.BigInteger + + + servlet-nameType + https://jakarta.ee/xml/ns/jakartaee + ServletNameType + java.lang.String + + + nonEmptyStringType + https://jakarta.ee/xml/ns/jakartaee + NonEmptyStringType + java.lang.String + + + load-on-startupType + https://jakarta.ee/xml/ns/jakartaee + LoadOnStartupType + java.math.BigInteger + + + run-asType + https://jakarta.ee/xml/ns/jakartaee + RunAs + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.RunAs + + + + security-role-refType + https://jakarta.ee/xml/ns/jakartaee + SecurityRoleRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.SecurityRoleRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "RoleName"; } + + + + jsp-fileType + https://jakarta.ee/xml/ns/jakartaee + JspFileType + java.lang.String + + + filter-nameType + https://jakarta.ee/xml/ns/jakartaee + FilterNameType + java.lang.String + + + dispatcherType + https://jakarta.ee/xml/ns/jakartaee + DispatcherType + java.lang.String + + + absoluteOrderingType + https://jakarta.ee/xml/ns/jakartaee + AbsoluteOrdering + + org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering + + + + + + + handlerType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandler + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "HandlerName"; } + + + + handler-chainsType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChains + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains + + + handler-chainType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChainType + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain + + + dewey-versionType + https://jakarta.ee/xml/ns/jakartaee + version + java.math.BigDecimal + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd new file mode 100644 index 000000000000..9a4cc4f3b7cc --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_6_1.xsd @@ -0,0 +1,351 @@ + + + + + + + Copyright (c) 2009, 2023 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + The web-app element is the root of the deployment + descriptor for a web application. Note that the sub-elements + of this element can be in the arbitrary order. Because of + that, the multiplicity of the elements of distributable, + session-config, welcome-file-list, jsp-config, login-config, + and locale-encoding-mapping-list was changed from "?" to "*" + in this schema. However, the deployment descriptor instance + file must not contain multiple elements of session-config, + jsp-config, and login-config. When there are multiple elements of + welcome-file-list or locale-encoding-mapping-list, the container + must concatenate the element contents. The multiple occurence + of the element distributable is redundant and the container + treats that case exactly in the same way when there is only + one distributable. + + + + + + + + + The servlet element contains the name of a servlet. + The name must be unique within the web application. + + + + + + + + + + + + The filter element contains the name of a filter. + The name must be unique within the web application. + + + + + + + + + + + + The ejb-local-ref-name element contains the name of an + enterprise bean reference. The enterprise + bean reference is an entry in the web + application's environment and is relative to the + java:comp/env context. The name must be unique within + the web application. + + It is recommended that name is prefixed with "ejb/". + + + + + + + + + + + + The ejb-ref-name element contains the name of an + enterprise bean reference. The enterprise bean + reference is an entry in the web application's environment + and is relative to the java:comp/env context. + The name must be unique within the web application. + + It is recommended that name is prefixed with "ejb/". + + + + + + + + + + + + The resource-env-ref-name element specifies the name of + a resource environment reference; its value is the + environment entry name used in the web application code. + The name is a JNDI name relative to the java:comp/env + context and must be unique within a web application. + + + + + + + + + + + + The message-destination-ref-name element specifies the name of + a message destination reference; its value is the + environment entry name used in the web application code. + The name is a JNDI name relative to the java:comp/env + context and must be unique within a web application. + + + + + + + + + + + + + The res-ref-name element specifies the name of a + resource manager connection factory reference. The name + is a JNDI name relative to the java:comp/env context. + The name must be unique within a web application. + + + + + + + + + + + + The env-entry-name element contains the name of a web + application's environment entry. The name is a JNDI + name relative to the java:comp/env context. The name + must be unique within a web application. + + + + + + + + + + + + + A role-name-key is specified to allow the references + from the security-role-refs. + + + + + + + + + + + + The keyref indicates the references from + security-role-ref to a specified role-name. + + + + + + + + + + + + + + + + + + + When specified, this element provides a default context path + of the web application. An empty value for this element must cause + the web application to be deployed at the root for the container. + Otherwise, the default context path must start with + a "/" character but not end with a "/" character. + Servlet containers may provide vendor specific configuration + options that allows specifying a value that overrides the value + specified here. + + + + + + + + + When specified, this element provides a default request + character encoding of the web application. + + + + + + + + + When specified, this element provides a default response + character encoding of the web application. + + + + + + + + + When specified, this element causes uncovered http methods + to be denied. For every url-pattern that is the target of a + security-constrant, this element causes all HTTP methods that + are NOT covered (by a security constraint) at the url-pattern + to be denied. + + + + + + + + + + + + + + + + Please see section 8.2.2 of the specification for details. + + + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd new file mode 100644 index 000000000000..4cb8277c9934 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_6_1.xsd @@ -0,0 +1,1526 @@ + + + + + + + Copyright (c) 2009, 2023 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/web-common_6_1.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + + + + + + + + The context-param element contains the declaration + of a web application's servlet context + initialization parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The metadata-complete attribute defines whether this + deployment descriptor and other related deployment + descriptors for this module (e.g., web service + descriptors) are complete, or whether the class + files available to this module and packaged with + this application should be examined for annotations + that specify deployment information. + + If metadata-complete is set to "true", the deployment + tool must ignore any annotations that specify deployment + information, which might be present in the class files + of the application. + + If metadata-complete is not specified or is set to + "false", the deployment tool must examine the class + files of the application for annotations, as + specified by the specifications. + + + + + + + + + + + + + This type is a general type that can be used to declare + attribute/value lists. + + + + + + + + + + + The attribute-name element contains the name of an + attribute. + + + + + + + + + + The attribute-value element contains the value of a + attribute. + + + + + + + + + + + + + + + The auth-constraintType indicates the user roles that + should be permitted access to this resource + collection. The role-name used here must either correspond + to the role-name of one of the security-role elements + defined for this web application, or be the specially + reserved role-name "*" that is a compact syntax for + indicating all roles in the web application. If both "*" + and rolenames appear, the container interprets this as all + roles. If no roles are defined, no user is allowed access + to the portion of the web application described by the + containing security-constraint. The container matches + role names case sensitively when determining access. + + + + + + + + + + + + + + + + + + The auth-methodType is used to configure the authentication + mechanism for the web application. As a prerequisite to + gaining access to any web resources which are protected by + an authorization constraint, a user must have authenticated + using the configured mechanism. Legal values are "BASIC", + "DIGEST", "FORM", "CLIENT-CERT", or a vendor-specific + authentication scheme. + + Used in: login-config + + + + + + + + + + + + + + + + The dispatcher has five legal values: FORWARD, REQUEST, + INCLUDE, ASYNC, and ERROR. + + A value of FORWARD means the Filter will be applied under + RequestDispatcher.forward() calls. + A value of REQUEST means the Filter will be applied under + ordinary client calls to the path or servlet. + A value of INCLUDE means the Filter will be applied under + RequestDispatcher.include() calls. + A value of ASYNC means the Filter will be applied under + calls dispatched from an AsyncContext. + A value of ERROR means the Filter will be applied under the + error page mechanism. + + The absence of any dispatcher elements in a filter-mapping + indicates a default of applying filters only under ordinary + client calls to the path or servlet. + + + + + + + + + + + + + + + + + + + + + + The error-code contains an HTTP error code, ex: 404 + + Used in: error-page + + + + + + + + + + + + + + + + + + + The error-pageType contains a mapping between an error code + or exception type to the path of a resource in the web + application. + + Error-page declarations using the exception-type element in + the deployment descriptor must be unique up to the class name of + the exception-type. Similarly, error-page declarations using the + error-code element must be unique in the deployment descriptor + up to the status code. + + If an error-page element in the deployment descriptor does not + contain an exception-type or an error-code element, the error + page is a default error page. + + Used in: web-app + + + + + + + + + + + + The exception-type contains a fully qualified class + name of a Java exception type. + + + + + + + + + + + The location element contains the location of the + resource in the web application relative to the root of + the web application. The value of the location must have + a leading `/'. + + + + + + + + + + + + + + + The filterType is used to declare a filter in the web + application. The filter is mapped to either a servlet or a + URL pattern in the filter-mapping element, using the + filter-name value to reference. Filters can access the + initialization parameters declared in the deployment + descriptor at runtime via the FilterConfig interface. + + Used in: web-app + + + + + + + + + + + + The fully qualified classname of the filter. + + + + + + + + + + + The init-param element contains a name/value pair as + an initialization param of a servlet filter + + + + + + + + + + + + + + + Declaration of the filter mappings in this web + application is done by using filter-mappingType. + The container uses the filter-mapping + declarations to decide which filters to apply to a request, + and in what order. The container matches the request URI to + a Servlet in the normal way. To determine which filters to + apply it matches filter-mapping declarations either on + servlet-name, or on url-pattern for each filter-mapping + element, depending on which style is used. The order in + which filters are invoked is the order in which + filter-mapping declarations that match a request URI for a + servlet appear in the list of filter-mapping elements.The + filter-name value must be the value of the filter-name + sub-elements of one of the filter declarations in the + deployment descriptor. + + + + + + + + + + + + + + + + + + + + + This type defines a string which contains at least one + character. + + + + + + + + + + + + + + + + The logical name of the filter is declare + by using filter-nameType. This name is used to map the + filter. Each filter name is unique within the web + application. + + Used in: filter, filter-mapping + + + + + + + + + + + + + + + + The form-login-configType specifies the login and error + pages that should be used in form based login. If form based + authentication is not used, these elements are ignored. + + Used in: login-config + + + + + + + + + + + The form-login-page element defines the location in the web + app where the page that can be used for login can be + found. The path begins with a leading / and is interpreted + relative to the root of the WAR. + + + + + + + + + + The form-error-page element defines the location in + the web app where the error page that is displayed + when login is not successful can be found. + The path begins with a leading / and is interpreted + relative to the root of the WAR. + + + + + + + + + + + + + + + + + A HTTP method type as defined in HTTP 1.1 section 2.2. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The login-configType is used to configure the authentication + method that should be used, the realm name that should be + used for this application, and the attributes that are + needed by the form login mechanism. + + Used in: web-app + + + + + + + + + + + The realm name element specifies the realm name to + use in HTTP Basic authorization. + + + + + + + + + + + + + + + + The mime-mappingType defines a mapping between an extension + and a mime type. + + Used in: web-app + + + + + + + + + The extension element contains a string describing an + extension. example: "txt" + + + + + + + + + + + + + + + + + The mime-typeType is used to indicate a defined mime type. + + Example: + "text/plain" + + Used in: mime-mapping + + + + + + + + + + + + + + + + + + The security-constraintType is used to associate + security constraints with one or more web resource + collections + + Used in: web-app + + + + + + + + + + + + + + + + + + + + The servletType is used to declare a servlet. + It contains the declarative data of a + servlet. If a jsp-file is specified and the load-on-startup + element is present, then the JSP should be precompiled and + loaded. + + Used in: web-app + + + + + + + + + + + + + The servlet-class element contains the fully + qualified class name of the servlet. + + + + + + + + + + + + + + + The load-on-startup element indicates that this + servlet should be loaded (instantiated and have + its init() called) on the startup of the web + application. The optional contents of these + element must be an integer indicating the order in + which the servlet should be loaded. If the value + is a negative integer, or the element is not + present, the container is free to load the servlet + whenever it chooses. If the value is a positive + integer or 0, the container must load and + initialize the servlet as the application is + deployed. The container must guarantee that + servlets marked with lower integers are loaded + before servlets marked with higher integers. The + container may choose the order of loading of + servlets with the same load-on-start-up value. + + + + + + + + + + + + + + + + + + + + The servlet-mappingType defines a mapping between a + servlet and a url pattern. + + Used in: web-app + + + + + + + + + + + + + + + + + + + The servlet-name element contains the canonical name of the + servlet. Each servlet name is unique within the web + application. + + + + + + + + + + + + + + + + The session-configType defines the session parameters + for this web application. + + Used in: web-app + + + + + + + + + + The session-timeout element defines the default + session timeout interval for all sessions created + in this web application. The specified timeout + must be expressed in a whole number of minutes. + If the timeout is 0 or less, the container ensures + the default behaviour of sessions is never to time + out. If this element is not specified, the container + must set its default timeout period. + + + + + + + + + The cookie-config element defines the configuration of the + session tracking cookies created by this web application. + + + + + + + + + The tracking-mode element defines the tracking modes + for sessions created by this web application + + + + + + + + + + + + + + + The cookie-configType defines the configuration for the + session tracking cookies of this web application. + + Used in: session-config + + + + + + + + + + The name that will be assigned to any session tracking + cookies created by this web application. + The default is JSESSIONID + + + + + + + + + The domain name that will be assigned to any session tracking + cookies created by this web application. + + + + + + + + + The path that will be assigned to any session tracking + cookies created by this web application. + + + + + + + + + The comment that will be assigned to any session tracking + cookies created by this web application. + + + + + + + + + Specifies whether any session tracking cookies created + by this web application will be marked as HttpOnly + + + + + + + + + Specifies whether any session tracking cookies created + by this web application will be marked as secure. + When true, all session tracking cookies must be marked + as secure independent of the nature of the request that + initiated the corresponding session. + When false, the session cookie should only be marked secure + if the request that initiated the session was secure. + + + + + + + + + The lifetime (in seconds) that will be assigned to any + session tracking cookies created by this web application. + Default is -1 + + + + + + + + + The attribute-param element contains a name/value pair to + be added as an attribute to every session cookie. + + + + + + + + + + + + + + + The name that will be assigned to any session tracking + cookies created by this web application. + The default is JSESSIONID + + Used in: cookie-config + + + + + + + + + + + + + + + + The domain name that will be assigned to any session tracking + cookies created by this web application. + + Used in: cookie-config + + + + + + + + + + + + + + + + The path that will be assigned to any session tracking + cookies created by this web application. + + Used in: cookie-config + + + + + + + + + + + + + + + + The comment that will be assigned to any session tracking + cookies created by this web application. + + Used in: cookie-config + + + + + + + + + + + + + + + + The tracking modes for sessions created by this web + application + + Used in: session-config + + + + + + + + + + + + + + + + + + + + The transport-guaranteeType specifies that the communication + between client and server should be NONE, INTEGRAL, or + CONFIDENTIAL. NONE means that the application does not + require any transport guarantees. A value of INTEGRAL means + that the application requires that the data sent between the + client and server be sent in such a way that it can't be + changed in transit. CONFIDENTIAL means that the application + requires that the data be transmitted in a fashion that + prevents other entities from observing the contents of the + transmission. In most cases, the presence of the INTEGRAL or + CONFIDENTIAL flag will indicate that the use of SSL is + required. + + Used in: user-data-constraint + + + + + + + + + + + + + + + + + + + + The user-data-constraintType is used to indicate how + data communicated between the client and container should be + protected. + + Used in: security-constraint + + + + + + + + + + + + + + + + + + The elements that use this type designate a path starting + with a "/" and interpreted relative to the root of a WAR + file. + + + + + + + + + + + + + + + + + This type contains the recognized versions of + web-application supported. It is used to designate the + version of the web application. + + + + + + + + + + + + + + + The web-resource-collectionType is used to identify the + resources and HTTP methods on those resources to which a + security constraint applies. If no HTTP methods are specified, + then the security constraint applies to all HTTP methods. + If HTTP methods are specified by http-method-omission + elements, the security constraint applies to all methods + except those identified in the collection. + http-method-omission and http-method elements are never + mixed in the same collection. + + Used in: security-constraint + + + + + + + + + + The web-resource-name contains the name of this web + resource collection. + + + + + + + + + + + Each http-method names an HTTP method to which the + constraint applies. + + + + + + + Each http-method-omission names an HTTP method to + which the constraint does not apply. + + + + + + + + + + + + + + + The welcome-file-list contains an ordered list of welcome + files elements. + + Used in: web-app + + + + + + + + + + The welcome-file element contains file name to use + as a default welcome file, such as index.html + + + + + + + + + + + + + + + The localeType defines valid locale defined by ISO-639-1 + and ISO-3166. + + + + + + + + + + + + + + + + The encodingType defines IANA character sets. + + + + + + + + + + + + + + + + The locale-encoding-mapping-list contains one or more + locale-encoding-mapping(s). + + + + + + + + + + + + + + + + + The locale-encoding-mapping contains locale name and + encoding name. The locale name must be either "Language-code", + such as "ja", defined by ISO-639 or "Language-code_Country-code", + such as "ja_JP". "Country code" is defined by ISO-3166. + + + + + + + + + + + + + + + + + + This element indicates that the ordering sub-element in which + it was placed should take special action regarding the ordering + of this application resource relative to other application + configuration resources. + See section 8.2.2 of the specification for details. + + + + + + + + + + + + + This element specifies configuration information related to the + handling of multipart/form-data requests. + + + + + + + + The directory location where uploaded files will be stored + + + + + + + The maximum size limit of uploaded files + + + + + + + The maximum size limit of multipart/form-data requests + + + + + + + The size threshold after which an uploaded file will be + written to disk + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd new file mode 100644 index 000000000000..77ab2f758830 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.mdd @@ -0,0 +1,910 @@ + + + + + + + + web-fragment + https://jakarta.ee/xml/ns/jakartaee + WebFragment + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.WebFragment + + + public org.xml.sax.SAXParseException getError() { + return null; + } + public int getStatus() { + return STATE_VALID; + } + // due to compatibility with servlet2.3 + public void setTaglib(int index, org.netbeans.modules.j2ee.dd.api.web.Taglib valueInterface) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public org.netbeans.modules.j2ee.dd.api.web.Taglib getTaglib(int index) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public void setTaglib(org.netbeans.modules.j2ee.dd.api.web.Taglib[] value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public org.netbeans.modules.j2ee.dd.api.web.Taglib[] getTaglib() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public int sizeTaglib() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public int addTaglib(org.netbeans.modules.j2ee.dd.api.web.Taglib valueInterface) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public int removeTaglib(org.netbeans.modules.j2ee.dd.api.web.Taglib valueInterface) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException(VERSION_6_1); + } + public void setJspConfig(org.netbeans.modules.j2ee.dd.api.web.JspConfig value) { + if (value==null) setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{}); + else setJspConfig(new org.netbeans.modules.j2ee.dd.api.web.JspConfig[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.JspConfig getSingleJspConfig() { + org.netbeans.modules.j2ee.dd.api.web.JspConfig[] values = getJspConfig(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setWelcomeFileList(org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList value) { + if (value==null) setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{}); + setWelcomeFileList(new org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList getSingleWelcomeFileList() { + org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList[] values = getWelcomeFileList(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setSessionConfig(org.netbeans.modules.j2ee.dd.api.web.SessionConfig value) { + if (value==null) setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{}); + else setSessionConfig(new org.netbeans.modules.j2ee.dd.api.web.SessionConfig[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.SessionConfig getSingleSessionConfig() { + org.netbeans.modules.j2ee.dd.api.web.SessionConfig[] values = getSessionConfig(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setLoginConfig(org.netbeans.modules.j2ee.dd.api.web.LoginConfig value) { + if (value==null) setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{}); + else setLoginConfig(new org.netbeans.modules.j2ee.dd.api.web.LoginConfig[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.LoginConfig getSingleLoginConfig() { + org.netbeans.modules.j2ee.dd.api.web.LoginConfig[] values = getLoginConfig(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public void setDistributable(boolean value) { + if (value) setDistributable(new EmptyType[]{new EmptyType()}); + else setDistributable(new EmptyType[]{}); + } + public boolean isDistributable() { + EmptyType[] values = getDistributable(); + if (values==null || values.length==0) return false; + else return true; + } + public void setLocaleEncodingMappingList(org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList value) { + if (value==null) setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{}); + else setLocaleEncodingMappingList(new org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[]{value}); + } + public org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList getSingleLocaleEncodingMappingList() { + org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList[] values = getLocaleEncodingMappingList(); + if (values==null || values.length==0) return null; + else return values[0]; + } + public org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering newAbsoluteOrdering() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException("web-fragment "+VERSION_6_1); + } + public void setAbsoluteOrdering(org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering[] value) throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException("web-fragment "+VERSION_6_1); + } + public org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering[] getAbsoluteOrdering() throws org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException { + throw new org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException("web-fragment "+VERSION_6_1); + } + + + + emptyType + https://jakarta.ee/xml/ns/jakartaee + EmptyType + + + param-valueType + https://jakarta.ee/xml/ns/jakartaee + InitParam + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.InitParam, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ParamName"; } + + + + filterType + https://jakarta.ee/xml/ns/jakartaee + Filter + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.Filter, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "FilterName"; } + + + + filter-mappingType + https://jakarta.ee/xml/ns/jakartaee + FilterMapping + + org.netbeans.modules.j2ee.dd.api.web.FilterMapping + + + public String getServletName() { + return this.sizeServletName() > 0 ? (String)this.getValue(SERVLET_NAME, 0) : null; + } + + public void setServletName(String value) { + setServletNames(value != null ? new String[]{value} : new String[]{}); + } + + public String getUrlPattern() { + return this.sizeUrlPattern() > 0 ? (String)this.getValue(URL_PATTERN, 0) : null; + } + + public void setUrlPattern(String value) { + setUrlPatterns(value != null ? new String[]{value} : new String[]{}); + } + + + + listenerType + https://jakarta.ee/xml/ns/jakartaee + Listener + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.Listener + + + + servletType + https://jakarta.ee/xml/ns/jakartaee + Servlet + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.Servlet, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ServletName"; } + + + + servlet-mappingType + https://jakarta.ee/xml/ns/jakartaee + ServletMapping + + org.netbeans.modules.j2ee.dd.api.web.ServletMapping25, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "UrlPattern"; } + + public void setUrlPattern(String value) { + setUrlPatterns(new String[] {value}); + } + + public String getUrlPattern() { + String[] urlPatterns = getUrlPatterns(); + if (urlPatterns != null && urlPatterns.length > 0) { + return urlPatterns[0]; + } + return null; + } + + + + + session-configType + https://jakarta.ee/xml/ns/jakartaee + SessionConfig + org.netbeans.modules.j2ee.dd.impl.common.Comparator + + org.netbeans.modules.j2ee.dd.api.web.SessionConfig + + + + mime-mappingType + https://jakarta.ee/xml/ns/jakartaee + MimeMapping + + org.netbeans.modules.j2ee.dd.api.web.MimeMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "Extension"; } + + + + welcome-file-listType + https://jakarta.ee/xml/ns/jakartaee + WelcomeFileList + + org.netbeans.modules.j2ee.dd.api.web.WelcomeFileList + + + + error-pageType + https://jakarta.ee/xml/ns/jakartaee + ErrorPage + org.netbeans.modules.j2ee.dd.impl.common.Comparator + + org.netbeans.modules.j2ee.dd.api.web.ErrorPage, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ErrorCode"; } + + + + jsp-configType + https://jakarta.ee/xml/ns/jakartaee + JspConfig + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.web.JspConfig + + + + security-constraintType + https://jakarta.ee/xml/ns/jakartaee + SecurityConstraint + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.SecurityConstraint + + + + login-configType + https://jakarta.ee/xml/ns/jakartaee + LoginConfig + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.web.LoginConfig + + + + security-roleType + https://jakarta.ee/xml/ns/jakartaee + SecurityRole + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.SecurityRole, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "RoleName"; } + + + + message-destinationType + https://jakarta.ee/xml/ns/jakartaee + MessageDestination + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.MessageDestination, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "MessageDestinationName"; } + + + + locale-encoding-mapping-listType + https://jakarta.ee/xml/ns/jakartaee + LocaleEncodingMappingList + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMappingList + + + + locale-encoding-mappingType + https://jakarta.ee/xml/ns/jakartaee + LocaleEncodingMapping + + org.netbeans.modules.j2ee.dd.api.web.LocaleEncodingMapping, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "Locale"; } + + + + localeType + https://jakarta.ee/xml/ns/jakartaee + LocaleType + java.lang.String + + + encodingType + https://jakarta.ee/xml/ns/jakartaee + EncodingType + java.lang.String + + + string + https://jakarta.ee/xml/ns/jakartaee + String + java.lang.String + + + descriptionType + https://jakarta.ee/xml/ns/jakartaee + DescriptionType + java.lang.String + + + xsdStringType + https://jakarta.ee/xml/ns/jakartaee + XsdStringType + java.lang.String + + + display-nameType + https://jakarta.ee/xml/ns/jakartaee + DisplayNameType + java.lang.String + + + iconType + https://jakarta.ee/xml/ns/jakartaee + Icon + + org.netbeans.modules.j2ee.dd.api.common.Icon + + + + pathType + https://jakarta.ee/xml/ns/jakartaee + PathType + java.lang.String + + + env-entryType + https://jakarta.ee/xml/ns/jakartaee + EnvEntry + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EnvEntry, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EnvEntryName"; } + + + + ejb-refType + https://jakarta.ee/xml/ns/jakartaee + EjbRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EjbRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EjbRefName"; } + + + + ejb-local-refType + https://jakarta.ee/xml/ns/jakartaee + EjbLocalRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.EjbLocalRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "EjbRefName"; } + + + + resource-refType + https://jakarta.ee/xml/ns/jakartaee + ResourceRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ResourceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ResRefName"; } + + + + resource-env-refType + https://jakarta.ee/xml/ns/jakartaee + ResourceEnvRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ResourceEnvRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ResourceEnvRefName"; } + + + + message-destination-refType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.MessageDestinationRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "MessageDestinationRefName"; } + + + + persistence-context-refType + https://jakarta.ee/xml/ns/jakartaee + PersistenceContextRefType + + + persistence-unit-refType + https://jakarta.ee/xml/ns/jakartaee + PersistenceUnitRefType + + + lifecycle-callbackType + https://jakarta.ee/xml/ns/jakartaee + LifecycleCallbackType + + + fully-qualified-classType + https://jakarta.ee/xml/ns/jakartaee + FullyQualifiedClassType + java.lang.String + + + java-identifierType + https://jakarta.ee/xml/ns/jakartaee + JavaIdentifierType + java.lang.String + + + jndi-nameType + https://jakarta.ee/xml/ns/jakartaee + JndiNameType + java.lang.String + + + persistence-context-typeType + https://jakarta.ee/xml/ns/jakartaee + PersistenceContextTypeType + java.lang.String + + + propertyType + https://jakarta.ee/xml/ns/jakartaee + PropertyType + + + message-destination-typeType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationTypeType + java.lang.String + + + message-destination-usageType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationUsageType + java.lang.String + + + message-destination-linkType + https://jakarta.ee/xml/ns/jakartaee + MessageDestinationLinkType + java.lang.String + + + injection-targetType + https://jakarta.ee/xml/ns/jakartaee + InjectionTarget + org.netbeans.modules.j2ee.dd.api.common.InjectionTarget + org.netbeans.modules.j2ee.dd.impl.common.EnclosingBean + + + res-authType + https://jakarta.ee/xml/ns/jakartaee + ResAuthType + java.lang.String + + + res-sharing-scopeType + https://jakarta.ee/xml/ns/jakartaee + ResSharingScopeType + java.lang.String + + + service-refType + https://jakarta.ee/xml/ns/jakartaee + ServiceRef + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "ServiceRefName"; } + + + + xsdAnyURIType + https://jakarta.ee/xml/ns/jakartaee + XsdAnyURIType + java.net.URI + + + xsdQNameType + https://jakarta.ee/xml/ns/jakartaee + XsdQNameType + java.lang.String + + + port-component-refType + https://jakarta.ee/xml/ns/jakartaee + PortComponentRef + + org.netbeans.modules.j2ee.dd.api.common.PortComponentRef + + + + service-ref_handlerType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandler + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "HandlerName"; } + + + + service-ref_handler-chainsType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChains + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains + + + service-ref_handler-chainType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChain + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain + + + service-ref_qname-pattern + https://jakarta.ee/xml/ns/jakartaee + ServiceRefQnamePattern + java.lang.String + + + service-ref_protocol-bindingListType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefProtocolBindingListType + String + + + ejb-ref-nameType + https://jakarta.ee/xml/ns/jakartaee + EjbRefNameType + java.lang.String + + + ejb-ref-typeType + https://jakarta.ee/xml/ns/jakartaee + EjbRefTypeType + java.lang.String + + + local-homeType + https://jakarta.ee/xml/ns/jakartaee + LocalHomeType + java.lang.String + + + localType + https://jakarta.ee/xml/ns/jakartaee + LocalType + java.lang.String + + + ejb-linkType + https://jakarta.ee/xml/ns/jakartaee + EjbLinkType + java.lang.String + + + homeType + https://jakarta.ee/xml/ns/jakartaee + HomeType + java.lang.String + + + remoteType + https://jakarta.ee/xml/ns/jakartaee + RemoteType + java.lang.String + + + env-entry-type-valuesType + https://jakarta.ee/xml/ns/jakartaee + EnvEntryTypeValuesType + java.lang.String + + + role-nameType + https://jakarta.ee/xml/ns/jakartaee + RoleNameType + java.lang.String + + + auth-methodType + https://jakarta.ee/xml/ns/jakartaee + AuthMethodType + java.lang.String + + + form-login-configType + https://jakarta.ee/xml/ns/jakartaee + FormLoginConfig + + org.netbeans.modules.j2ee.dd.api.web.FormLoginConfig + + + + war-pathType + https://jakarta.ee/xml/ns/jakartaee + WarPathType + java.lang.String + + + web-resource-collectionType + https://jakarta.ee/xml/ns/jakartaee + WebResourceCollection + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.WebResourceCollection, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "WebResourceName"; } + + + + auth-constraintType + https://jakarta.ee/xml/ns/jakartaee + AuthConstraint + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.AuthConstraint + + + + user-data-constraintType + https://jakarta.ee/xml/ns/jakartaee + UserDataConstraint + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.UserDataConstraint + + + + transport-guaranteeType + https://jakarta.ee/xml/ns/jakartaee + TransportGuaranteeType + java.lang.String + + + url-patternType + https://jakarta.ee/xml/ns/jakartaee + UrlPatternType + java.lang.String + + + http-methodType + https://jakarta.ee/xml/ns/jakartaee + HttpMethodType + java.lang.String + + + taglibType + https://jakarta.ee/xml/ns/jakartaee + Taglib + + org.netbeans.modules.j2ee.dd.api.web.Taglib, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "TaglibUri"; } + + + + jsp-property-groupType + https://jakarta.ee/xml/ns/jakartaee + JspPropertyGroup + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.web.JspPropertyGroup + + + + true-falseType + https://jakarta.ee/xml/ns/jakartaee + TrueFalseType + boolean + + + error-codeType + https://jakarta.ee/xml/ns/jakartaee + ErrorCodeType + Integer + + + string + http://www.w3.org/2001/XMLSchema + String + java.lang.String + + + mime-typeType + https://jakarta.ee/xml/ns/jakartaee + MimeTypeType + java.lang.String + + + xsdIntegerType + https://jakarta.ee/xml/ns/jakartaee + XsdIntegerType + java.math.BigInteger + + + servlet-nameType + https://jakarta.ee/xml/ns/jakartaee + ServletNameType + java.lang.String + + + nonEmptyStringType + https://jakarta.ee/xml/ns/jakartaee + NonEmptyStringType + java.lang.String + + + load-on-startupType + https://jakarta.ee/xml/ns/jakartaee + LoadOnStartupType + java.math.BigInteger + + + run-asType + https://jakarta.ee/xml/ns/jakartaee + RunAs + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.RunAs + + + + security-role-refType + https://jakarta.ee/xml/ns/jakartaee + SecurityRoleRef + org.netbeans.modules.j2ee.dd.impl.common.DescriptionBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.SecurityRoleRef, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "RoleName"; } + + + + jsp-fileType + https://jakarta.ee/xml/ns/jakartaee + JspFileType + java.lang.String + + + filter-nameType + https://jakarta.ee/xml/ns/jakartaee + FilterNameType + java.lang.String + + + dispatcherType + https://jakarta.ee/xml/ns/jakartaee + DispatcherType + java.lang.String + + + absoluteOrderingType + https://jakarta.ee/xml/ns/jakartaee + AbsoluteOrdering + + org.netbeans.modules.j2ee.dd.api.web.AbsoluteOrdering + + + + orderingType + https://jakarta.ee/xml/ns/jakartaee + RelativeOrdering + + org.netbeans.modules.j2ee.dd.api.web.RelativeOrdering + + + + ordering-orderingType + https://jakarta.ee/xml/ns/jakartaee + RelativeOrderingItems + + org.netbeans.modules.j2ee.dd.api.web.RelativeOrderingItems + + + + ordering-othersType + https://jakarta.ee/xml/ns/jakartaee + RelativeOrderingOthersItem + + org.netbeans.modules.j2ee.dd.api.web.RelativeOrderingOthersItem + + + + + + + handlerType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandler + org.netbeans.modules.j2ee.dd.impl.common.Comparator + org.netbeans.modules.j2ee.dd.impl.common.ComponentBeanMultiple + + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandler, org.netbeans.modules.j2ee.dd.impl.common.KeyBean + + + public String getKeyProperty() { return "HandlerName"; } + + + + handler-chainsType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChains + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChains + + + handler-chainType + https://jakarta.ee/xml/ns/jakartaee + ServiceRefHandlerChainType + org.netbeans.modules.j2ee.dd.api.common.ServiceRefHandlerChain + + + dewey-versionType + https://jakarta.ee/xml/ns/jakartaee + version + java.math.BigDecimal + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd new file mode 100644 index 000000000000..633b1d69f2f5 --- /dev/null +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_6_1.xsd @@ -0,0 +1,316 @@ + + + + + + Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + + ... + + + The instance documents may indicate the published version of + the schema using the xsi:schemaLocation attribute for Jakarta EE + namespace with the following location: + + https://jakarta.ee/xml/ns/jakartaee/web-fragment_6_1.xsd + + ]]> + + + + + + + The following conventions apply to all Jakarta EE + deployment descriptor elements unless indicated otherwise. + + - In elements that specify a pathname to a file within the + same JAR file, relative filenames (i.e., those not + starting with "/") are considered relative to the root of + the JAR file's namespace. Absolute filenames (i.e., those + starting with "/") also specify names in the root of the + JAR file's namespace. In general, relative names are + preferred. The exception is .war files where absolute + names are preferred for consistency with the Servlet API. + + + + + + + + + + + + + + The web-fragment element is the root of the deployment + descriptor for a web fragment. Note that the sub-elements + of this element can be in the arbitrary order. Because of + that, the multiplicity of the elements of distributable, + session-config, welcome-file-list, jsp-config, login-config, + and locale-encoding-mapping-list was changed from "?" to "*" + in this schema. However, the deployment descriptor instance + file must not contain multiple elements of session-config, + jsp-config, and login-config. When there are multiple elements of + welcome-file-list or locale-encoding-mapping-list, the container + must concatenate the element contents. The multiple occurence + of the element distributable is redundant and the container + treats that case exactly in the same way when there is only + one distributable. + + + + + + + + The servlet element contains the name of a servlet. + The name must be unique within the web application. + + + + + + + + + + + The filter element contains the name of a filter. + The name must be unique within the web application. + + + + + + + + + + + The ejb-local-ref-name element contains the name of an + enterprise bean reference. The enterprise bean reference + is an entry in the web application's environment and is relative + to the java:comp/env context. The name must be unique within + the web application. + + It is recommended that name is prefixed with "ejb/". + + + + + + + + + + + The ejb-ref-name element contains the name of an + enterprise bean reference. The enterprise bean reference + is an entry in the web application's environment and is relative + to the java:comp/env context. The name must be unique within + the web application. + + It is recommended that name is prefixed with "ejb/". + + + + + + + + + + + The resource-env-ref-name element specifies the name of + a resource environment reference; its value is the + environment entry name used in the web application code. + The name is a JNDI name relative to the java:comp/env + context and must be unique within a web application. + + + + + + + + + + + The message-destination-ref-name element specifies the name of + a message destination reference; its value is the + environment entry name used in the web application code. + The name is a JNDI name relative to the java:comp/env + context and must be unique within a web application. + + + + + + + + + + + The res-ref-name element specifies the name of a + resource manager connection factory reference. The name + is a JNDI name relative to the java:comp/env context. + The name must be unique within a web application. + + + + + + + + + + + The env-entry-name element contains the name of a web + application's environment entry. The name is a JNDI + name relative to the java:comp/env context. The name + must be unique within a web application. + + + + + + + + + + + A role-name-key is specified to allow the references + from the security-role-refs. + + + + + + + + + + + The keyref indicates the references from + security-role-ref to a specified role-name. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Please see section 8.2.2 of the specification for details. + + + + + + + + + + + + + + + + + This element contains a sequence of "name" elements, each of + which + refers to an application configuration resource by the "name" + declared on its web.xml fragment. This element can also contain + a single "others" element which specifies that this document + comes + before or after other documents within the application. + See section 8.2.2 of the specification for details. + + + + + + + + + + diff --git a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java index 2e7b533b7554..e28016222cba 100644 --- a/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java +++ b/enterprise/j2ee.dd/src/org/netbeans/modules/j2ee/dd/impl/web/WebAppProxy.java @@ -960,6 +960,9 @@ public Object clone() { } else if (WebApp.VERSION_6_0.equals(version)) { ((org.netbeans.modules.j2ee.dd.impl.web.model_6_0.WebApp)clonedWebApp)._setSchemaLocation ("https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"); + } else if (WebApp.VERSION_6_1.equals(version)) { + ((org.netbeans.modules.j2ee.dd.impl.web.model_6_1.WebApp)clonedWebApp)._setSchemaLocation + ("https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd"); } } proxy.setError(error); diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties index 080f26ff6038..d6ea216e8080 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/Bundle.properties @@ -30,6 +30,8 @@ Loaders/text/x-dd-application6.0/Factories/org-netbeans-modules-j2ee-ddloaders-w Loaders/text/x-dd-application7.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-application8.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-application9.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files +Loaders/text/x-dd-application10.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files +Loaders/text/x-dd-application11.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-client1.3/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-client1.4/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-client5.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files @@ -38,6 +40,7 @@ Loaders/text/x-dd-client7.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DD Loaders/text/x-dd-client8.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-client9.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-client10.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files +Loaders/text/x-dd-client11.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-ejbjar2.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-ejbjar2.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-ejbjar3.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files @@ -53,11 +56,13 @@ Loaders/text/x-dd-servlet3.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-D Loaders/text/x-dd-servlet4.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet5.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet6.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files +Loaders/text/x-dd-servlet6.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet-fragment3.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet-fragment3.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet-fragment4.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet-fragment5.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-servlet-fragment6.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files +Loaders/text/x-dd-servlet-fragment6.1/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-web2.5/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd-web3.0/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files Loaders/text/x-dd/Factories/org-netbeans-modules-j2ee-ddloaders-web-DDDataLoader.instance=Deployment Descriptor Files diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java index ec7cdefa3f52..37db80826b09 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/app/EarDataLoader.java @@ -49,6 +49,8 @@ public class EarDataLoader extends UniFileLoader { private static final String REQUIRED_MIME_PREFIX_6 = "text/x-dd-application9.0"; // NOI18N private static final String REQUIRED_MIME_PREFIX_7 = "text/x-dd-application10.0"; // NOI18N + + private static final String REQUIRED_MIME_PREFIX_8 = "text/x-dd-application11.0"; // NOI18N public EarDataLoader () { super ("org.netbeans.modules.j2ee.ddloaders.app.EarDataObject"); // NOI18N @@ -75,6 +77,7 @@ protected void initialize () { getExtensions().addMimeType(REQUIRED_MIME_PREFIX_5); getExtensions().addMimeType(REQUIRED_MIME_PREFIX_6); getExtensions().addMimeType(REQUIRED_MIME_PREFIX_7); + getExtensions().addMimeType(REQUIRED_MIME_PREFIX_8); } @Override diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java index a5f93135a269..ca44a5355870 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/catalog/EnterpriseCatalog.java @@ -49,7 +49,7 @@ public final class EnterpriseCatalog implements CatalogReader, CatalogDescriptor private static final String JAKARTAEE_NS = "https://jakarta.ee/xml/ns/jakartaee"; //NOI18N private static final String RESOURCE_PATH = "nbres:/org/netbeans/modules/j2ee/dd/impl/resources/"; //NO18N - private List schemas = new ArrayList<>(); + private List schemas = new ArrayList<>(256); private static final Logger LOGGER = Logger.getLogger(EnterpriseCatalog.class.getName()); @@ -67,6 +67,8 @@ private void initialize(){ schemas.add(new SchemaInfo("application-client_7.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("application-client_8.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("application-client_9.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("application-client_10.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("application-client_11.xsd", JAKARTAEE_NS)); // Application schema schemas.add(new SchemaInfo("application_1_4.xsd", J2EE_NS)); schemas.add(new SchemaInfo("application_5.xsd", JAVAEE_NS)); @@ -74,6 +76,8 @@ private void initialize(){ schemas.add(new SchemaInfo("application_7.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("application_8.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("application_9.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("application_10.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("application_11.xsd", JAKARTAEE_NS)); // Web services schema schemas.add(new SchemaInfo("j2ee_web_services_1_1.xsd", J2EE_NS)); schemas.add(new SchemaInfo("javaee_web_services_1_2.xsd", JAVAEE_NS)); @@ -91,6 +95,7 @@ private void initialize(){ schemas.add(new SchemaInfo("connector_1_6.xsd", JAVAEE_NS)); schemas.add(new SchemaInfo("connector_1_7.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("connector_2_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("connector_2_1.xsd", JAKARTAEE_NS)); // Enterprise JavaBeans Deployment Descriptor Schema schemas.add(new SchemaInfo("ejb-jar_2_1.xsd", J2EE_NS)); schemas.add(new SchemaInfo("ejb-jar_3_0.xsd", JAVAEE_NS)); @@ -104,22 +109,30 @@ private void initialize(){ schemas.add(new SchemaInfo("web-app_3_1.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("web-app_4_0.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("web-app_5_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("web-app_6_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("web-app_6_1.xsd", JAKARTAEE_NS)); // Web Application Deployment Descriptor common definitions schema schemas.add(new SchemaInfo("web-common_3_0.xsd", JAVAEE_NS)); schemas.add(new SchemaInfo("web-common_3_1.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("web-common_4_0.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("web-common_5_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("web-common_6_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("web-common_6_1.xsd", JAKARTAEE_NS)); // Web Application Deployment Descriptor fragment schema schemas.add(new SchemaInfo("web-fragment_3_0.xsd", JAVAEE_NS)); schemas.add(new SchemaInfo("web-fragment_3_1.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("web-fragment_4_0.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("web-fragment_5_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("web-fragment_6_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("web-fragment_6_1.xsd", JAKARTAEE_NS)); // JavaServer Pages Deployment Descriptor schema schemas.add(new SchemaInfo("jsp_2_0.xsd", J2EE_NS)); schemas.add(new SchemaInfo("jsp_2_1.xsd", JAVAEE_NS)); schemas.add(new SchemaInfo("jsp_2_2.xsd", JAVAEE_NS)); schemas.add(new SchemaInfo("jsp_2_3.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("jsp_3_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("jsp_3_1.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("jsp_4_0.xsd", JAKARTAEE_NS)); // J2EE and Java EE definitions file that contains common schema components schemas.add(new SchemaInfo("j2ee_1_4.xsd", J2EE_NS)); schemas.add(new SchemaInfo("javaee_5.xsd", JAVAEE_NS)); @@ -127,6 +140,8 @@ private void initialize(){ schemas.add(new SchemaInfo("javaee_7.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("javaee_8.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("jakartaee_9.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("jakartaee_10.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("jakartaee_11.xsd", JAKARTAEE_NS)); // web 2.2 and 2.3 dtds schemas.add(new SchemaInfo("web-app_2_2.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", true)); //NO18N schemas.add(new SchemaInfo("web-app_2_3.dtd", "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", true)); //NO18N @@ -135,9 +150,12 @@ private void initialize(){ schemas.add(new SchemaInfo("beans_1_1.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("beans_2_0.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("beans_3_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("beans_4_0.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("beans_4_1.xsd", JAKARTAEE_NS)); // Java EE application permissions schema schemas.add(new SchemaInfo("permissions_7.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("permissions_9.xsd", JAKARTAEE_NS)); + schemas.add(new SchemaInfo("permissions_10.xsd", JAKARTAEE_NS)); // Schema for batch.xml-based artifact loading in Java Batch schemas.add(new SchemaInfo("batchXML_1_0.xsd", NEW_JAVAEE_NS)); schemas.add(new SchemaInfo("batchXML_2_0.xsd", JAKARTAEE_NS)); diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java index 257adaa87e7c..d2ab62e606b9 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/client/ClientDataLoader.java @@ -42,6 +42,7 @@ public class ClientDataLoader extends UniFileLoader { private static final String REQUIRED_MIME_PREFIX_6 = "text/x-dd-client8.0"; // NOI18N private static final String REQUIRED_MIME_PREFIX_7 = "text/x-dd-client9.0"; // NOI18N private static final String REQUIRED_MIME_PREFIX_8 = "text/x-dd-client10.0"; // NOI18N + private static final String REQUIRED_MIME_PREFIX_9 = "text/x-dd-client11.0"; // NOI18N public ClientDataLoader() { super("org.netbeans.modules.j2ee.ddloaders.client.ClientDataObject"); // NOI18N @@ -68,6 +69,7 @@ protected void initialize() { getExtensions().addMimeType(REQUIRED_MIME_PREFIX_6); getExtensions().addMimeType(REQUIRED_MIME_PREFIX_7); getExtensions().addMimeType(REQUIRED_MIME_PREFIX_8); + getExtensions().addMimeType(REQUIRED_MIME_PREFIX_9); } @Override diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml index 35deb028adaa..c1ae1b7aca7d 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/dd-loaders-mime-resolver.xml @@ -95,6 +95,16 @@ + + + + + + + + + + @@ -145,6 +155,16 @@ + + + + + + + + + + @@ -281,6 +301,16 @@ + + + + + + + + + + @@ -351,4 +381,14 @@ + + + + + + + + + + diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml index 52c09ec79e46..2707d1bc15c6 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/resources/layer.xml @@ -24,6 +24,9 @@ + + + @@ -45,6 +48,9 @@ + + + @@ -114,6 +120,9 @@ + + + @@ -129,6 +138,9 @@ + + + @@ -153,6 +165,8 @@ + + @@ -637,6 +651,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1047,6 +1143,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1346,6 +1524,18 @@ + + + + + + + + + + + + @@ -1406,6 +1596,18 @@ + + + + + + + + + + + + @@ -1526,6 +1728,18 @@ + + + + + + + + + + + + @@ -1610,6 +1824,18 @@ + + + + + + + + + + + + diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java index fb6e01d5f21b..53ce8a87bf8e 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDDataObject.java @@ -129,7 +129,8 @@ protected int associateLookup() { DDWeb30DataLoader.REQUIRED_MIME_31, DDWebFragment30DataLoader.REQUIRED_MIME_31, DDWeb40DataLoader.REQUIRED_MIME_40, DDWebFragment40DataLoader.REQUIRED_MIME_40, DDWeb50DataLoader.REQUIRED_MIME_50, DDWebFragment50DataLoader.REQUIRED_MIME_50, - DDWeb60DataLoader.REQUIRED_MIME_60, DDWebFragment60DataLoader.REQUIRED_MIME_60}, + DDWeb60DataLoader.REQUIRED_MIME_60, DDWebFragment60DataLoader.REQUIRED_MIME_60, + DDWeb60DataLoader.REQUIRED_MIME_61, DDWebFragment60DataLoader.REQUIRED_MIME_61}, iconBase="org/netbeans/modules/j2ee/ddloaders/web/resources/DDDataIcon.gif", persistenceType=TopComponent.PERSISTENCE_ONLY_OPENED, preferredID="multiview_xml", diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java index e8623d2f886d..4e3f612484c4 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWeb60DataLoader.java @@ -27,12 +27,14 @@ * A data loader for web.xml version 6.0. Required for providing * a different action context than for older versions - see #85570. * + * @author Jose Contreras */ public class DDWeb60DataLoader extends DDDataLoader { private static final long serialVersionUID = 1L; public static final String REQUIRED_MIME_60 = "text/x-dd-servlet6.0"; // NOI18N + public static final String REQUIRED_MIME_61 = "text/x-dd-servlet6.1"; // NOI18N public DDWeb60DataLoader() { super("org.netbeans.modules.j2ee.ddloaders.web.DDDataObject"); // NOI18N @@ -45,7 +47,7 @@ protected String actionsContext() { @Override protected String[] getSupportedMimeTypes() { - return new String[]{REQUIRED_MIME_60}; + return new String[]{REQUIRED_MIME_60, REQUIRED_MIME_61}; } @Override diff --git a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java index e3bed5a27601..0ccbdecc0157 100644 --- a/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java +++ b/enterprise/j2ee.ddloaders/src/org/netbeans/modules/j2ee/ddloaders/web/DDWebFragment60DataLoader.java @@ -27,13 +27,14 @@ * A data loader for web-fragment.xml version 6.0. Required for providing * a different action context than for older versions - see #85570. * - * @author pepness + * @author Jose Contreras */ public class DDWebFragment60DataLoader extends DDDataLoader { private static final long serialVersionUID = 1L; public static final String REQUIRED_MIME_60 = "text/x-dd-servlet-fragment6.0"; // NOI18N + public static final String REQUIRED_MIME_61 = "text/x-dd-servlet-fragment6.1"; // NOI18N public DDWebFragment60DataLoader() { super("org.netbeans.modules.j2ee.ddloaders.web.DDFragmentDataObject"); // NOI18N @@ -46,7 +47,7 @@ protected String actionsContext() { @Override protected String[] getSupportedMimeTypes() { - return new String[]{REQUIRED_MIME_60}; + return new String[]{REQUIRED_MIME_60, REQUIRED_MIME_61}; } @Override diff --git a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java index af662456c255..6db2395ed80f 100644 --- a/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java +++ b/enterprise/j2ee.earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java @@ -310,7 +310,9 @@ public String getModuleVersion () { if (p == null) { p = Profile.JAVA_EE_7_FULL; } - if (Profile.JAKARTA_EE_10_FULL.equals(p) || Profile.JAKARTA_EE_10_FULL.equals(p)) { + if (Profile.JAKARTA_EE_11_FULL.equals(p)) { + return Application.VERSION_11; + } else if (Profile.JAKARTA_EE_10_FULL.equals(p)) { return Application.VERSION_10; } else if (Profile.JAKARTA_EE_9_1_FULL.equals(p) || Profile.JAKARTA_EE_9_FULL.equals(p)) { return Application.VERSION_9; diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java index b3ca3d2f905b..e73d072a8989 100644 --- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java +++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/Utils.java @@ -241,8 +241,8 @@ public void run(WorkingCopy workingCopy) throws IOException { // call ejb should not make this check, all should be handled in EnterpriseReferenceContainer boolean isCallerFreeform = enterpriseProject.getClass().getName().equals("org.netbeans.modules.ant.freeform.FreeformProject"); - boolean isCallerEE6WebProject = isEE6WebProject(enterpriseProject); - boolean isCallerEE10WebProject = isEE10WebProject(enterpriseProject); + final boolean isEjb31LiteSupported = isEjb31LiteSupported(enterpriseProject); + final boolean isEjb40LiteSupported = isEjb40LiteSupported(enterpriseProject); List filteredResults = new ArrayList(allProjects.length); for (int i = 0; i < allProjects.length; i++) { @@ -253,14 +253,8 @@ public void run(WorkingCopy workingCopy) throws IOException { EjbJar[] ejbJars = EjbJar.getEjbJars(allProjects[i]); Profile profile = ejbJars.length > 0 ? ejbJars[0].getJ2eeProfile() : null; - if (J2eeModule.Type.EJB.equals(type) || (J2eeModule.Type.WAR.equals(type) - && (Profile.JAVA_EE_6_WEB.equals(profile) || Profile.JAVA_EE_6_FULL.equals(profile) - || Profile.JAVA_EE_7_WEB.equals(profile) || Profile.JAVA_EE_7_FULL.equals(profile) - || Profile.JAVA_EE_8_WEB.equals(profile) || Profile.JAVA_EE_8_FULL.equals(profile) - || Profile.JAKARTA_EE_8_WEB.equals(profile) || Profile.JAKARTA_EE_8_FULL.equals(profile) - || Profile.JAKARTA_EE_9_WEB.equals(profile) || Profile.JAKARTA_EE_9_FULL.equals(profile) - || Profile.JAKARTA_EE_9_1_WEB.equals(profile) || Profile.JAKARTA_EE_9_1_FULL.equals(profile) - || Profile.JAKARTA_EE_10_WEB.equals(profile) || Profile.JAKARTA_EE_10_FULL.equals(profile)))) { + if (J2eeModule.Type.EJB.equals(type) || + (J2eeModule.Type.WAR.equals(type) && profile.isAtLeast(Profile.JAVA_EE_6_WEB))) { isEJBModule = true; } } @@ -269,18 +263,18 @@ public void run(WorkingCopy workingCopy) throws IOException { // If the caller project is a freeform project, include caller itself only // If the caller project is a Java EE 6 web project, include itself in the list if ((isEJBModule && !isCallerFreeform) || - (enterpriseProject.equals(allProjects[i]) && (isCallerFreeform || isCallerEE6WebProject || isCallerEE10WebProject) ) ) { + (enterpriseProject.equals(allProjects[i]) && (isCallerFreeform || isEjb31LiteSupported || isEjb40LiteSupported) ) ) { filteredResults.add(allProjects[i]); } } return filteredResults.toArray(new Project[0]); } - public static boolean isEE6WebProject(Project enterpriseProject) { + public static boolean isEjb31LiteSupported(Project enterpriseProject) { return J2eeProjectCapabilities.forProject(enterpriseProject).isEjb31LiteSupported(); } - public static boolean isEE10WebProject(Project enterpriseProject) { + public static boolean isEjb40LiteSupported(Project enterpriseProject) { return J2eeProjectCapabilities.forProject(enterpriseProject).isEjb40LiteSupported(); } diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java index a0bf95e329be..b443e325d4c3 100644 --- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java +++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/dd/EjbJarXmlWizardIterator.java @@ -94,11 +94,11 @@ public Set instantiate() throws IOException { String resource; // see #213631 - caused by fact that EJB DD schemas have different numbering than WEB DD schemas // (so Java EE6 Web-DD is of the version 3.0, but Ejb-DD is of the version 3.1) - if (j2eeProfile == Profile.JAKARTA_EE_9_WEB || j2eeProfile == Profile.JAKARTA_EE_9_1_WEB || j2eeProfile == Profile.JAKARTA_EE_10_WEB) { + if (j2eeProfile.isAtLeast(Profile.JAKARTA_EE_9_WEB)) { resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-4.0.xml"; - } else if (j2eeProfile == Profile.JAVA_EE_7_WEB || j2eeProfile == Profile.JAVA_EE_8_WEB || j2eeProfile == Profile.JAKARTA_EE_8_WEB) { + } else if (j2eeProfile.isAtLeast(Profile.JAVA_EE_7_WEB)) { resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-3.2.xml"; - } else if (j2eeProfile == Profile.JAVA_EE_6_WEB) { + } else if (j2eeProfile.isAtLeast(Profile.JAVA_EE_6_WEB)) { // ee6 web module is of the version 3.0 but the ee6 deployment descriptor schema should be of version 3.1 resource = "org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-3.1.xml"; } else { diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java index d1b4df5bc826..31bc8d64c4c3 100644 --- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java +++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/jpa/dao/EjbFacadeVisualPanel2.java @@ -76,7 +76,8 @@ public EjbFacadeVisualPanel2(Project project, WizardDescriptor wizard) { ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_8_FULL); boolean serverSupportsEJB40 = ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_FULL) || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_1_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_10_FULL); + || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_10_FULL) + || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_11_FULL); if (!projectCap.isEjb31Supported() && !serverSupportsEJB31 && !projectCap.isEjb40Supported()&& !serverSupportsEJB40){ remoteCheckBox.setVisible(false); diff --git a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java index 01cd554eaded..7d6b1599861a 100644 --- a/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java +++ b/enterprise/j2ee.ejbcore/src/org/netbeans/modules/j2ee/ejbcore/ejb/wizard/mdb/MdbWizard.java @@ -75,6 +75,7 @@ public final class MdbWizard implements WizardDescriptor.InstantiatingIterator { "jakarta.jakartaee-web-api-9.0.0", //NOI18N "jakarta.jakartaee-web-api-9.1.0", //NOI18N "jakarta.jakartaee-web-api-10.0.0", //NOI18N + "jakarta.jakartaee-web-api-11.0.0" //NOI18N }; private static final String[] SESSION_STEPS = new String[]{ NbBundle.getMessage(MdbWizard.class, "LBL_SpecifyEJBInfo"), //NOI18N @@ -89,6 +90,7 @@ public final class MdbWizard implements WizardDescriptor.InstantiatingIterator { MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_9_FULL, "jakarta.jakartaee-api-9.0.0"); //NOI18N MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_9_1_FULL, "jakarta.jakartaee-api-9.1.0"); //NOI18N MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_10_FULL, "jakarta.jakartaee-api-10.0.0"); //NOI18N + MAVEN_JAVAEE_API_LIBS.put(Profile.JAKARTA_EE_11_FULL, "jakarta.jakartaee-api-11.0.0"); //NOI18N } @Override @@ -186,7 +188,9 @@ private boolean isJmsOnClasspath() throws IOException { private Profile getTargetFullProfile() { Profile profile = JavaEEProjectSettings.getProfile(Templates.getProject(wiz)); if (profile != null) { - if (profile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) { + if (profile.isAtLeast(Profile.JAKARTA_EE_11_WEB)) { + return Profile.JAKARTA_EE_11_FULL; + } else if (profile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) { return Profile.JAKARTA_EE_10_FULL; } else if (profile.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)) { return Profile.JAKARTA_EE_9_1_FULL; diff --git a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarJPAModuleInfo.java b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarJPAModuleInfo.java index 9f741ad5ee34..3627ada5f8df 100644 --- a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarJPAModuleInfo.java +++ b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarJPAModuleInfo.java @@ -61,12 +61,13 @@ public Boolean isJPAVersionSupported(String version) { JpaSupport support = JpaSupport.getInstance(platform); JpaProvider provider = support.getDefaultProvider(); if (provider != null) { - return (Persistence.VERSION_3_1.equals(version) && provider.isJpa31Supported()) + return (Persistence.VERSION_3_2.equals(version) && provider.isJpa32Supported() + || (Persistence.VERSION_3_1.equals(version) && provider.isJpa31Supported()) || (Persistence.VERSION_3_0.equals(version) && provider.isJpa30Supported()) || (Persistence.VERSION_2_2.equals(version) && provider.isJpa22Supported()) || (Persistence.VERSION_2_1.equals(version) && provider.isJpa21Supported()) || (Persistence.VERSION_2_0.equals(version) && provider.isJpa2Supported()) - || (Persistence.VERSION_1_0.equals(version) && provider.isJpa1Supported()); + || (Persistence.VERSION_1_0.equals(version) && provider.isJpa1Supported())); } return null; } diff --git a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSClientSupport.java b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSClientSupport.java index 97274f627951..10008b397192 100644 --- a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSClientSupport.java +++ b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSClientSupport.java @@ -87,36 +87,35 @@ protected FileObject getXmlArtifactsRoot() { protected String getProjectJavaEEVersion() { EjbJar ejbModule = EjbJar.getEjbJar(project.getProjectDirectory()); if (ejbModule != null) { - if (Profile.JAVA_EE_6_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_6_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_7_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_7_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_8_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAVA_EE_8_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAKARTA_EE_8_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_8_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_9_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_1_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_10_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAKARTA_EE_10_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAVA_EE_5.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_15; + switch (ejbModule.getJ2eeProfile()) { + case JAVA_EE_6_WEB: + case JAVA_EE_6_FULL: + return JAVA_EE_VERSION_16; + case JAVA_EE_7_WEB: + case JAVA_EE_7_FULL: + return JAVA_EE_VERSION_17; + case JAVA_EE_8_WEB: + case JAVA_EE_8_FULL: + return JAVA_EE_VERSION_18; + case JAKARTA_EE_8_WEB: + case JAKARTA_EE_8_FULL: + return JAKARTA_EE_VERSION_8; + case JAKARTA_EE_9_WEB: + case JAKARTA_EE_9_FULL: + return JAKARTA_EE_VERSION_9; + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_1_FULL: + return JAKARTA_EE_VERSION_91; + case JAKARTA_EE_10_WEB: + case JAKARTA_EE_10_FULL: + return JAKARTA_EE_VERSION_10; + case JAKARTA_EE_11_WEB: + case JAKARTA_EE_11_FULL: + return JAKARTA_EE_VERSION_11; + case JAVA_EE_5: + return JAVA_EE_VERSION_15; + default: + break; } } return JAVA_EE_VERSION_NONE; diff --git a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSSupport.java b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSSupport.java index 71cbc81d2a86..e823628ee346 100644 --- a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSSupport.java +++ b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/jaxws/EjbProjectJAXWSSupport.java @@ -158,36 +158,35 @@ private void logWsDetected() { protected String getProjectJavaEEVersion() { EjbJar ejbModule = EjbJar.getEjbJar(project.getProjectDirectory()); if (ejbModule != null) { - if (Profile.JAVA_EE_6_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_6_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_7_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_7_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_8_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAVA_EE_8_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAKARTA_EE_8_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_8_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_9_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_1_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_10_WEB.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAKARTA_EE_10_FULL.equals(ejbModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAVA_EE_5.equals(ejbModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_15; + switch (ejbModule.getJ2eeProfile()) { + case JAVA_EE_6_WEB: + case JAVA_EE_6_FULL: + return JAVA_EE_VERSION_16; + case JAVA_EE_7_WEB: + case JAVA_EE_7_FULL: + return JAVA_EE_VERSION_17; + case JAVA_EE_8_WEB: + case JAVA_EE_8_FULL: + return JAVA_EE_VERSION_18; + case JAKARTA_EE_8_WEB: + case JAKARTA_EE_8_FULL: + return JAKARTA_EE_VERSION_8; + case JAKARTA_EE_9_WEB: + case JAKARTA_EE_9_FULL: + return JAKARTA_EE_VERSION_9; + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_1_FULL: + return JAKARTA_EE_VERSION_91; + case JAKARTA_EE_10_WEB: + case JAKARTA_EE_10_FULL: + return JAKARTA_EE_VERSION_10; + case JAKARTA_EE_11_WEB: + case JAKARTA_EE_11_FULL: + return JAKARTA_EE_VERSION_11; + case JAVA_EE_5: + return JAVA_EE_VERSION_15; + default: + break; } } return JAVA_EE_VERSION_NONE; diff --git a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java index 30a2481e51a3..8ea11c1e9c9e 100644 --- a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java +++ b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/customizer/EjbJarProjectProperties.java @@ -322,17 +322,20 @@ private void init() { PLATFORM_LIST_RENDERER = PlatformUiSupport.createPlatformListCellRenderer(); SpecificationVersion minimalSourceLevel = null; Profile profile = Profile.fromPropertiesString(evaluator.getProperty(J2EE_PLATFORM)); - - if (Profile.JAKARTA_EE_9_1_FULL.equals(profile) || Profile.JAKARTA_EE_10_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("11"); - } else if (Profile.JAKARTA_EE_9_FULL.equals(profile) || Profile.JAKARTA_EE_8_FULL.equals(profile) || Profile.JAVA_EE_8_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.8"); - } else if (Profile.JAVA_EE_7_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.7"); - } else if (Profile.JAVA_EE_6_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.6"); - } else if (Profile.JAVA_EE_5.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.5"); + if (profile != null && profile.isFullProfile()) { + if (profile.isAtLeast(Profile.JAKARTA_EE_11_FULL)) { + minimalSourceLevel = new SpecificationVersion("21"); + } else if (profile.isAtLeast(Profile.JAKARTA_EE_9_1_FULL)) { + minimalSourceLevel = new SpecificationVersion("11"); + } else if (profile.isAtLeast(Profile.JAVA_EE_8_FULL)) { + minimalSourceLevel = new SpecificationVersion("1.8"); + } else if (Profile.JAVA_EE_7_FULL.equals(profile)) { + minimalSourceLevel = new SpecificationVersion("1.7"); + } else if (Profile.JAVA_EE_6_FULL.equals(profile)) { + minimalSourceLevel = new SpecificationVersion("1.6"); + } else if (Profile.JAVA_EE_5.equals(profile)) { + minimalSourceLevel = new SpecificationVersion("1.5"); + } } JAVAC_SOURCE_MODEL = PlatformUiSupport.createSourceLevelComboBoxModel (PLATFORM_MODEL, evaluator.getProperty(JAVAC_SOURCE), evaluator.getProperty(JAVAC_TARGET), minimalSourceLevel); JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer (); diff --git a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/NewEjbJarProjectWizardIterator.java b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/NewEjbJarProjectWizardIterator.java index afaa702799b3..a7027faed226 100644 --- a/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/NewEjbJarProjectWizardIterator.java +++ b/enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/wizards/NewEjbJarProjectWizardIterator.java @@ -227,9 +227,11 @@ public final void addChangeListener(ChangeListener l) {} public final void removeChangeListener(ChangeListener l) {} private static String adaptSourceLevelToJavaEEProfile(Profile javaEEProfile, String defaultSourceLevel) { - if (javaEEProfile.isAtLeast(Profile.JAKARTA_EE_9_1_WEB) || javaEEProfile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) { + if (javaEEProfile.isAtLeast(Profile.JAKARTA_EE_11_WEB)) { + return "21"; //NOI18N + } else if (javaEEProfile.isAtLeast(Profile.JAKARTA_EE_9_1_WEB)) { return "11"; //NOI18N - } else if (javaEEProfile.isAtLeast(Profile.JAVA_EE_8_WEB) || javaEEProfile.isAtLeast(Profile.JAKARTA_EE_9_WEB)) { + } else if (javaEEProfile.isAtLeast(Profile.JAVA_EE_8_WEB)) { return "1.8"; //NOI18N } else if (javaEEProfile.isAtLeast(Profile.JAVA_EE_7_WEB)) { return "1.7"; //NOI18N diff --git a/enterprise/j2ee.ejbverification/src/org/netbeans/modules/j2ee/ejbverification/rules/PersistentTimerInEjbLite.java b/enterprise/j2ee.ejbverification/src/org/netbeans/modules/j2ee/ejbverification/rules/PersistentTimerInEjbLite.java index 8aece8c20a2e..7e657ad48aca 100644 --- a/enterprise/j2ee.ejbverification/src/org/netbeans/modules/j2ee/ejbverification/rules/PersistentTimerInEjbLite.java +++ b/enterprise/j2ee.ejbverification/src/org/netbeans/modules/j2ee/ejbverification/rules/PersistentTimerInEjbLite.java @@ -83,9 +83,10 @@ public static Collection run(HintContext hintContext) { final List problems = new ArrayList<>(); final EJBProblemContext ctx = HintsUtils.getOrCacheContext(hintContext); if (ctx != null && ctx.getEjb() instanceof Session) { - boolean ee9lite = ctx.getEjbModule().getJ2eeProfile().isAtLeast(Profile.JAKARTA_EE_9_WEB); - boolean ee7lite = ctx.getEjbModule().getJ2eeProfile().isAtLeast(Profile.JAVA_EE_7_WEB); - boolean ee6lite = ctx.getEjbModule().getJ2eeProfile() == Profile.JAVA_EE_6_WEB; + final Profile profile = ctx.getEjbModule().getJ2eeProfile(); + boolean ee9lite = profile.isAtLeast(Profile.JAKARTA_EE_9_WEB); + boolean ee7lite = profile.isAtLeast(Profile.JAVA_EE_7_WEB); + boolean ee6lite = (profile == Profile.JAVA_EE_6_WEB); J2eePlatform platform = ProjectUtil.getPlatform(ctx.getProject()); if ((ee6lite || ee7lite || ee9lite) && nonEeFullServer(platform)) { for (Element element : ctx.getClazz().getEnclosedElements()) { @@ -114,23 +115,13 @@ private static boolean nonEeFullServer(J2eePlatform platform) { if (platform == null) { return true; } - if(platform.getSupportedProfiles().contains(Profile.JAVA_EE_6_FULL)) { - return false; - } else if(platform.getSupportedProfiles().contains(Profile.JAVA_EE_7_FULL)) { - return false; - } else if(platform.getSupportedProfiles().contains(Profile.JAVA_EE_8_FULL)) { - return false; - } else if(platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_8_FULL)) { - return false; - } else if(platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_FULL)) { - return false; - } else if(platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_1_FULL)) { - return false; - } else if(platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_10_FULL)) { - return false; - } else { - return true; + + for (Profile profile: platform.getSupportedProfiles()) { + if (profile.isFullProfile() && profile.isAtLeast(Profile.JAVA_EE_6_FULL)) { + return false; + } } + return true; } private static boolean isTimerPersistent(Map values) { diff --git a/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java b/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java index 3bd04150e69c..cf66ab33f012 100644 --- a/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java +++ b/enterprise/j2ee.sun.dd/src/org/netbeans/modules/j2ee/sun/dd/api/ASDDVersion.java @@ -416,6 +416,32 @@ public final class ASDDVersion { 601, "GlassFish Server 7" // NOI18N ); + /** Represents GF Server 8 + */ + public static final ASDDVersion GLASSFISH_8 = new ASDDVersion( + "8.0", 100, // NOI18N + DTDRegistry.GLASSFISH_WEBAPP_301_DTD_PUBLIC_ID, + DTDRegistry.GLASSFISH_WEBAPP_301_DTD_SYSTEM_ID, + SunWebApp.VERSION_3_0_1, + 301, + DTDRegistry.GLASSFISH_EJBJAR_311_DTD_PUBLIC_ID, + DTDRegistry.GLASSFISH_EJBJAR_311_DTD_SYSTEM_ID, + SunEjbJar.VERSION_3_1_1, + 311, + DTDRegistry.SUN_CMP_MAPPING_810_DTD_PUBLIC_ID, + DTDRegistry.SUN_CMP_MAPPING_810_DTD_SYSTEM_ID, + "1.2", + 120, + DTDRegistry.GLASSFISH_APPLICATION_601_DTD_PUBLIC_ID, + DTDRegistry.GLASSFISH_APPLICATION_601_DTD_SYSTEM_ID, + SunApplication.VERSION_6_0_1, + 601, + DTDRegistry.GLASSFISH_APPCLIENT_601_DTD_PUBLIC_ID, + DTDRegistry.GLASSFISH_APPCLIENT_601_DTD_SYSTEM_ID, + SunApplicationClient.VERSION_6_0_1, + 601, + "GlassFish Server 8" // NOI18N + ); /** Represents Sun Java System Web Server 7.0 */ public static final ASDDVersion SUN_WEBSERVER_7_0 = new ASDDVersion( diff --git a/enterprise/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule.java b/enterprise/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule.java index ea375a0e5036..ff0a061f3c08 100644 --- a/enterprise/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule.java +++ b/enterprise/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/J2eeModule.java @@ -170,10 +170,10 @@ public ModuleType getJsrModuleType(Type type) { } /** - * Returns a Java EE module specification version, version of a web application + * Returns a Java/Jakarta EE module specification version, version of a web application * for example. *

- * Do not confuse with the Java EE platform specification version. + * Do not confuse with the Java/Jakarta EE platform specification version. * * @return module specification version. */ diff --git a/enterprise/jakarta.web.beans/src/org/netbeans/modules/jakarta/web/beans/wizard/BeansXmlIterator.java b/enterprise/jakarta.web.beans/src/org/netbeans/modules/jakarta/web/beans/wizard/BeansXmlIterator.java index fa9ebb22981b..f4a3c11760d9 100644 --- a/enterprise/jakarta.web.beans/src/org/netbeans/modules/jakarta/web/beans/wizard/BeansXmlIterator.java +++ b/enterprise/jakarta.web.beans/src/org/netbeans/modules/jakarta/web/beans/wizard/BeansXmlIterator.java @@ -77,7 +77,9 @@ public Set instantiate(TemplateWizard wizard) throws IOException { Profile profile = null; if (project != null) { J2eeProjectCapabilities cap = J2eeProjectCapabilities.forProject(project); - if (cap != null && cap.isCdi40Supported()) { + if (cap != null && cap.isCdi41Supported()) { + profile = Profile.JAKARTA_EE_11_FULL; + } else if (cap != null && cap.isCdi40Supported()) { profile = Profile.JAKARTA_EE_10_FULL; } else if (cap != null && cap.isCdi30Supported()) { profile = Profile.JAKARTA_EE_9_FULL; diff --git a/enterprise/jakartaee11.api/build.xml b/enterprise/jakartaee11.api/build.xml new file mode 100644 index 000000000000..769444d9a7f7 --- /dev/null +++ b/enterprise/jakartaee11.api/build.xml @@ -0,0 +1,25 @@ + + + + Builds, tests, and runs the project org.netbeans.modules.jakartaee11.api + + diff --git a/enterprise/jakartaee11.api/external/binaries-list b/enterprise/jakartaee11.api/external/binaries-list new file mode 100644 index 000000000000..52ecb1598e03 --- /dev/null +++ b/enterprise/jakartaee11.api/external/binaries-list @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +3D3471C64C8500880D0C0C6DA265F19194CE8304 jakarta.platform:jakarta.jakartaee-api:11.0.0-M1 +F0117F7D79657E795020A64CE01359962452694A jakarta.platform:jakarta.jakartaee-web-api:11.0.0-M1 \ No newline at end of file diff --git a/enterprise/jakartaee11.api/external/jakarta.jakartaee-api-11.0.0-license.txt b/enterprise/jakartaee11.api/external/jakarta.jakartaee-api-11.0.0-license.txt new file mode 100644 index 000000000000..57178c4f03d3 --- /dev/null +++ b/enterprise/jakartaee11.api/external/jakarta.jakartaee-api-11.0.0-license.txt @@ -0,0 +1,93 @@ +Name: JakartaEE API 11.0.0 +Version: 11.0.0 +License: EPL-v20 +Description: JakartaEE API 11.0.0 +Origin: Eclipse Foundation (https://mvnrepository.com/artifact/jakarta.platform/jakarta.jakartaee-api/11.0.0-M1) +Files: jakarta.jakartaee-api-11.0.0-M1.jar + +Eclipse Public License - v 2.0 +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. Definitions +“Contribution” means: + +a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. +“Contributor” means any person or entity that Distributes the Program. + +“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +“Program” means the Contributions Distributed in accordance with this Agreement. + +“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. + +“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. + +“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. + +“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. + +“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. + +“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. + +2. Grant of Rights +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). + +3. Requirements +3.1 If a Contributor Distributes the Program in any form, then: + +a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and + +b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: + +i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and +iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. +3.2 When the Program is Distributed as Source Code: + +a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and +b) a copy of this Agreement must be included with each copy of the Program. +3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. + +4. Commercial Distribution +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. No Warranty +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. Disclaimer of Liability +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. General +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice +“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.” + +Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. + +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. diff --git a/enterprise/jakartaee11.api/external/jakarta.jakartaee-web-api-11.0.0-license.txt b/enterprise/jakartaee11.api/external/jakarta.jakartaee-web-api-11.0.0-license.txt new file mode 100644 index 000000000000..62b3c3cee0b4 --- /dev/null +++ b/enterprise/jakartaee11.api/external/jakarta.jakartaee-web-api-11.0.0-license.txt @@ -0,0 +1,93 @@ +Name: JakartaEE Web API 11.0.0 +Version: 11.0.0 +License: EPL-v20 +Description: JakartaEE Web API 11.0.0 +Origin: Eclipse Foundation (https://mvnrepository.com/artifact/jakarta.platform/jakarta.jakartaee-web-api/11.0.0-M1) +Files: jakarta.jakartaee-web-api-11.0.0-M1.jar + +Eclipse Public License - v 2.0 +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. Definitions +“Contribution” means: + +a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. +“Contributor” means any person or entity that Distributes the Program. + +“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +“Program” means the Contributions Distributed in accordance with this Agreement. + +“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. + +“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. + +“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. + +“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. + +“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. + +“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. + +2. Grant of Rights +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). + +3. Requirements +3.1 If a Contributor Distributes the Program in any form, then: + +a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and + +b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: + +i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and +iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. +3.2 When the Program is Distributed as Source Code: + +a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and +b) a copy of this Agreement must be included with each copy of the Program. +3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. + +4. Commercial Distribution +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. No Warranty +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. Disclaimer of Liability +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. General +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice +“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.” + +Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. + +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. diff --git a/enterprise/jakartaee11.api/manifest.mf b/enterprise/jakartaee11.api/manifest.mf new file mode 100644 index 000000000000..c94af3e2c5f1 --- /dev/null +++ b/enterprise/jakartaee11.api/manifest.mf @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +AutoUpdate-Show-In-Client: false +OpenIDE-Module: org.netbeans.modules.jakartaee11.api +OpenIDE-Module-Layer: org/netbeans/modules/jakartaee11/api/layer.xml +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee11/api/Bundle.properties +OpenIDE-Module-Specification-Version: 1.23 +OpenIDE-Module-Java-Dependencies: Java > 11 +OpenIDE-Module-Provides: jakartaee11.api diff --git a/enterprise/jakartaee11.api/nbproject/project.properties b/enterprise/jakartaee11.api/nbproject/project.properties new file mode 100644 index 000000000000..b5953f675824 --- /dev/null +++ b/enterprise/jakartaee11.api/nbproject/project.properties @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +is.autoload=true +javac.source=1.8 +release.external/jakarta.jakartaee-api-11.0.0-M1.jar=modules/ext/jakarta.jakartaee-api-11.0.0.jar +release.external/jakarta.jakartaee-web-api-11.0.0-M1.jar=modules/ext/jakarta.jakartaee-web-api-11.0.0.jar diff --git a/enterprise/jakartaee11.api/nbproject/project.xml b/enterprise/jakartaee11.api/nbproject/project.xml new file mode 100644 index 000000000000..c1991274e907 --- /dev/null +++ b/enterprise/jakartaee11.api/nbproject/project.xml @@ -0,0 +1,31 @@ + + + + org.netbeans.modules.apisupport.project + + + org.netbeans.modules.jakartaee11.api + + + + + diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/Bundle.properties b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/Bundle.properties new file mode 100644 index 000000000000..651b2584897b --- /dev/null +++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/Bundle.properties @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +OpenIDE-Module-Display-Category=Jakarta EE +OpenIDE-Module-Long-Description=\ + Library wrapper which provides JakartaEE 11 API (full API and web profile API) +OpenIDE-Module-Name=Jakarta EE 11 API Library +OpenIDE-Module-Short-Description=Jakarta EE 11 API Library + +#library display name +jakartaee-api-11.0=Jakarta EE 11 API Library +jakartaee-web-api-11.0=Jakarta EE Web 11 API Library diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-api-11.0.xml b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-api-11.0.xml new file mode 100644 index 000000000000..d148946875ba --- /dev/null +++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-api-11.0.xml @@ -0,0 +1,41 @@ + + + + + jakartaee-api-11.0 + j2se + org/netbeans/modules/jakartaee11/api/Bundle + + classpath + jar:nbinst://org.netbeans.modules.jakartaee11.api/modules/ext/jakarta.jakartaee-api-11.0.0.jar!/ + + + javadoc + jar:nbinst://org.netbeans.modules.jakartaee11.platform/docs/jakartaee11-doc-api.jar!/ + + + + maven-dependencies + jakarta.platform:jakarta.jakartaee-api:11.0.0-M1:jar + + + diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-web-api-11.0.xml b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-web-api-11.0.xml new file mode 100644 index 000000000000..2d7da18fa36c --- /dev/null +++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/jakartaee-web-api-11.0.xml @@ -0,0 +1,41 @@ + + + + + jakartaee-web-api-11.0 + j2se + org/netbeans/modules/jakartaee11/api/Bundle + + classpath + jar:nbinst://org.netbeans.modules.jakartaee11.api/modules/ext/jakarta.jakartaee-web-api-11.0.0.jar!/ + + + javadoc + jar:nbinst://org.netbeans.modules.jakartaee11.platform/docs/jakartaee11-doc-api.jar!/ + + + + maven-dependencies + jakarta.platform:jakarta.jakartaee-web-api:11.0.0-M1:jar + + + diff --git a/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/layer.xml b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/layer.xml new file mode 100644 index 000000000000..10d26d377bab --- /dev/null +++ b/enterprise/jakartaee11.api/src/org/netbeans/modules/jakartaee11/api/layer.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + diff --git a/enterprise/jakartaee11.platform/arch.xml b/enterprise/jakartaee11.platform/arch.xml new file mode 100644 index 000000000000..067007a2456f --- /dev/null +++ b/enterprise/jakartaee11.platform/arch.xml @@ -0,0 +1,908 @@ + + + +]> + + + + &api-questions; + + + + +

+ This module is an empty module, it only contains javahelp documentation for jakartaee functionality. +

+ + + + + + +

+ N/A +

+
+ + + + + +

+ Done. +

+
+ + + + + +

+ No usecases. +

+
+ + + + + +

+ Container for javahelp docs for jakartaee. +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ 1.8 +

+
+ + + + + +

+ JRE +

+
+ + + + + +

+ None. +

+
+ + + + + +

+ None. +

+
+ + + + + +

+ Runs everywhere. +

+
+ + + + +

+ N/A +

+
+ + + + + +

+ docs/jakartaee11-doc-api.jar, modules/docs/org-netbeans-modules-jakartaee11-platform.jar +

+
+ + + + + +

+ Yes. +

+
+ + + + + +

+ Yes. +

+
+ + + + + +

+ Anywhere. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ N/A +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ javahelp helpse registration +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + diff --git a/enterprise/jakartaee11.platform/build.xml b/enterprise/jakartaee11.platform/build.xml new file mode 100644 index 000000000000..57ecf544f309 --- /dev/null +++ b/enterprise/jakartaee11.platform/build.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/enterprise/jakartaee11.platform/external/binaries-list b/enterprise/jakartaee11.platform/external/binaries-list new file mode 100644 index 000000000000..5fbe81d7f9ea --- /dev/null +++ b/enterprise/jakartaee11.platform/external/binaries-list @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +4165DFDD7B817AF41113E8A5C5DB80A348DB21CA jakarta.platform:jakarta.jakartaee-api:11.0.0-M1:javadoc diff --git a/enterprise/jakartaee11.platform/external/jakarta.jakartaee-api-11.0.0-javadoc-license.txt b/enterprise/jakartaee11.platform/external/jakarta.jakartaee-api-11.0.0-javadoc-license.txt new file mode 100644 index 000000000000..64b2e84adab5 --- /dev/null +++ b/enterprise/jakartaee11.platform/external/jakarta.jakartaee-api-11.0.0-javadoc-license.txt @@ -0,0 +1,93 @@ +Name: JakartaEE API 11.0.0 Documentation +Version: 11.0.0 +License: EPL-v20 +Description: JakartaEE API 11.0.0 Documentation +Origin: Eclipse Foundation (https://mvnrepository.com/artifact/jakarta.platform/jakarta.jakartaee-api/11.0.0-M1) +Files: jakarta.jakartaee-api-11.0.0-M1-javadoc.jar, generated-jakarta.jakartaee-api-11.0.0-javadoc.jar + +Eclipse Public License - v 2.0 +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. Definitions +“Contribution” means: + +a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. +“Contributor” means any person or entity that Distributes the Program. + +“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +“Program” means the Contributions Distributed in accordance with this Agreement. + +“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. + +“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. + +“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. + +“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. + +“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. + +“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. + +2. Grant of Rights +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). + +3. Requirements +3.1 If a Contributor Distributes the Program in any form, then: + +a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and + +b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: + +i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and +iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. +3.2 When the Program is Distributed as Source Code: + +a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and +b) a copy of this Agreement must be included with each copy of the Program. +3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. + +4. Commercial Distribution +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. No Warranty +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. Disclaimer of Liability +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. General +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice +“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.” + +Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. + +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. diff --git a/enterprise/jakartaee11.platform/manifest.mf b/enterprise/jakartaee11.platform/manifest.mf new file mode 100644 index 000000000000..ecb472bc4b92 --- /dev/null +++ b/enterprise/jakartaee11.platform/manifest.mf @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +OpenIDE-Module: org.netbeans.modules.jakartaee11.platform/1 +OpenIDE-Module-Specification-Version: 1.23 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jakartaee11/platform/Bundle.properties +AutoUpdate-Show-In-Client: false +OpenIDE-Module-Java-Dependencies: Java > 11 +OpenIDE-Module-Provides: jakartaee11.platform diff --git a/enterprise/jakartaee11.platform/nbproject/project.properties b/enterprise/jakartaee11.platform/nbproject/project.properties new file mode 100644 index 000000000000..9888b7c58d0a --- /dev/null +++ b/enterprise/jakartaee11.platform/nbproject/project.properties @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +is.autoload=true +javac.compilerargs=-Xlint:all -Xlint:-serial +javac.source=1.8 +release.external/generated-jakarta.jakartaee-api-11.0.0-javadoc.jar=docs/jakartaee11-doc-api.jar + +javadoc.arch=${basedir}/arch.xml diff --git a/enterprise/jakartaee11.platform/nbproject/project.xml b/enterprise/jakartaee11.platform/nbproject/project.xml new file mode 100644 index 000000000000..dedfb5387837 --- /dev/null +++ b/enterprise/jakartaee11.platform/nbproject/project.xml @@ -0,0 +1,32 @@ + + + + org.netbeans.modules.apisupport.project + + + org.netbeans.modules.jakartaee11.platform + + + + + + diff --git a/enterprise/jakartaee11.platform/src/org/netbeans/modules/jakartaee11/platform/Bundle.properties b/enterprise/jakartaee11.platform/src/org/netbeans/modules/jakartaee11/platform/Bundle.properties new file mode 100644 index 000000000000..2824262415fd --- /dev/null +++ b/enterprise/jakartaee11.platform/src/org/netbeans/modules/jakartaee11/platform/Bundle.properties @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# module description +OpenIDE-Module-Name=Jakarta EE 11 Documentation +OpenIDE-Module-Display-Category=Jakarta EE +OpenIDE-Module-Short-Description=Jakarta EE 11 Documentation +OpenIDE-Module-Long-Description=\ + Documentation for the NetBeans Jakarta EE 11 support and Jakarta EE 11 Javadoc diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java index 66626693e292..cd26eaec77aa 100644 --- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java +++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/PersistenceProviderSupplierImpl.java @@ -20,7 +20,6 @@ package org.netbeans.modules.javaee.project.api; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -72,7 +71,7 @@ public List getSupportedProviders() { return findPersistenceProviders(null); } } - + private List findPersistenceProviders(J2eePlatform platform) { final List providers = new ArrayList(); boolean lessEE7 = true;//we may not know platform @@ -80,13 +79,13 @@ private List findPersistenceProviders(J2eePlatform platform) { final Map jpaProviderMap = createProviderMap(platform); boolean defaultFound = false; // see issue #225071 - - lessEE7 = !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_10_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_10_FULL) - && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_1_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_1_FULL) - && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_9_FULL) - && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_8_WEB) && !platform.getSupportedProfiles().contains(Profile.JAKARTA_EE_8_FULL) - && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_8_WEB) && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_8_FULL) - && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_7_WEB) && !platform.getSupportedProfiles().contains(Profile.JAVA_EE_7_FULL);//we know gf4 do not support old providers, #233726 + for (Profile profile: platform.getSupportedProfiles()) { + if (profile.isAtLeast(Profile.JAVA_EE_7_WEB)) { + lessEE7 = false; //we know gf4 do not support old providers, #233726 + break; + } + } + // Here we are mapping the JpaProvider to the correct Provider for (Provider provider : ProviderUtil.getAllProviders()) { @@ -95,6 +94,7 @@ private List findPersistenceProviders(J2eePlatform platform) { if (jpa != null) { String version = ProviderUtil.getVersion(provider); if (version == null + || (version.equals(Persistence.VERSION_3_2) && jpa.isJpa32Supported()) || (version.equals(Persistence.VERSION_3_1) && jpa.isJpa31Supported()) || (version.equals(Persistence.VERSION_3_0) && jpa.isJpa30Supported()) || (version.equals(Persistence.VERSION_2_2) && jpa.isJpa22Supported()) @@ -123,11 +123,13 @@ private List findPersistenceProviders(J2eePlatform platform) { } if (!found){ String version = ProviderUtil.getVersion(each); + // we know gf4 do not support old providers, #233726, todo, we need to get supported from gf plugin instead if(lessEE7 || version == null || version.equals(Persistence.VERSION_2_1) || version.equals(Persistence.VERSION_2_2) || version.equals(Persistence.VERSION_3_0) - || version.equals(Persistence.VERSION_3_1)) {//we know gf4 do not support old providers, #233726, todo, we need to get supported from gf plugin instead + || version.equals(Persistence.VERSION_3_1) + || version.equals(Persistence.VERSION_3_2)) { providers.add(each); } } diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/Bundle.properties b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/Bundle.properties index 1e7cddc5c821..057eec9308bd 100644 --- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/Bundle.properties +++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/Bundle.properties @@ -141,6 +141,10 @@ MSG_RecommendationSetJdk11=Note: JDK 11 will be used for Jakarta EE 9.1 an MSG_RecommendationSetSourceLevel11=Note: Source Level 11 will be set for Jakarta EE 9.1 and Jakarta EE 10 project. MSG_RecommendationJDK11=Recommendation: JDK 11 should be used for Jakarta EE 9.1 and Jakarta EE 10 projects. +MSG_RecommendationSetJdk21=Note: JDK 21 will be used for Jakarta EE 11 projects. +MSG_RecommendationSetSourceLevel21=Note: Source Level 21 will be set for Jakarta EE 11 project. +MSG_RecommendationJDK21=Recommendation: JDK 21 should be used for Jakarta EE 11 projects. + #Import wizard - existing sources LBL_IW_ImportTitle=Add Existing Sources LBL_IW_LocationSrcDesc=Select the folder that contains all the sources for your application. diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java index eb71051e61c4..8ed5611bc056 100644 --- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java +++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/J2eeVersionWarningPanel.java @@ -42,17 +42,20 @@ final class J2eeVersionWarningPanel extends javax.swing.JPanel { public static final String WARN_SET_JDK_7 = "warnSetJdk7"; // NOI18N public static final String WARN_SET_JDK_8 = "warnSetJdk8"; // NOI18N public static final String WARN_SET_JDK_11 = "warnSetJdk11"; // NOI18N + public static final String WARN_SET_JDK_21 = "warnSetJdk21"; // NOI18N public static final String WARN_SET_SOURCE_LEVEL_15 = "warnSetSourceLevel15"; // NOI18N public static final String WARN_SET_SOURCE_LEVEL_6 = "warnSetSourceLevel6"; // NOI18N public static final String WARN_SET_SOURCE_LEVEL_7 = "warnSetSourceLevel7"; // NOI18N public static final String WARN_SET_SOURCE_LEVEL_8 = "warnSetSourceLevel8"; // NOI18N public static final String WARN_SET_SOURCE_LEVEL_11 = "warnSetSourceLevel11"; // NOI18N + public static final String WARN_SET_SOURCE_LEVEL_21 = "warnSetSourceLevel21"; // NOI18N public static final String WARN_JDK_6_REQUIRED = "warnJdk6Required"; // NOI18N public static final String WARN_JDK_7_REQUIRED = "warnJdk7Required"; // NOI18N public static final String WARN_JDK_8_REQUIRED = "warnJdk8Required"; // NOI18N public static final String WARN_JDK_11_REQUIRED = "warnJdk11Required"; // NOI18N + public static final String WARN_JDK_21_REQUIRED = "warnJdk21Required"; // NOI18N private String warningType; @@ -85,6 +88,9 @@ public void setWarningType(String warningType) { case WARN_SET_JDK_11: labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetJdk11"); break; + case WARN_SET_JDK_21: + labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetJdk21"); + break; case WARN_SET_SOURCE_LEVEL_15: labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetSourceLevel15"); break; @@ -100,6 +106,9 @@ public void setWarningType(String warningType) { case WARN_SET_SOURCE_LEVEL_11: labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetSourceLevel11"); break; + case WARN_SET_SOURCE_LEVEL_21: + labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationSetSourceLevel21"); + break; case WARN_JDK_6_REQUIRED: labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationJDK6"); break; @@ -112,6 +121,9 @@ public void setWarningType(String warningType) { case WARN_JDK_11_REQUIRED: labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationJDK11"); break; + case WARN_JDK_21_REQUIRED: + labelText = NbBundle.getMessage(J2eeVersionWarningPanel.class, "MSG_RecommendationJDK21"); + break; default: break; } @@ -145,6 +157,10 @@ public String getSuggestedJavaPlatformName() { JavaPlatform[] javaPlatforms = getJavaPlatforms("11"); return getPreferredPlatform(javaPlatforms).getDisplayName(); } + case WARN_SET_JDK_21: { + JavaPlatform[] javaPlatforms = getJavaPlatforms("21"); + return getPreferredPlatform(javaPlatforms).getDisplayName(); + } default: return JavaPlatform.getDefault().getDisplayName(); } @@ -177,6 +193,10 @@ public Specification getSuggestedJavaPlatformSpecification() { JavaPlatform[] javaPlatforms = getJavaPlatforms("11"); return getPreferredPlatform(javaPlatforms).getSpecification(); } + case WARN_SET_JDK_21: { + JavaPlatform[] javaPlatforms = getJavaPlatforms("21"); + return getPreferredPlatform(javaPlatforms).getSpecification(); + } default: return JavaPlatform.getDefault().getSpecification(); } @@ -241,6 +261,12 @@ public static String findWarningType(Profile j2eeProfile, Set acceptableSourceLe return null; } + // no warning if 21 is the default for jakartaee11 + if ((j2eeProfile == Profile.JAKARTA_EE_11_FULL || j2eeProfile == Profile.JAKARTA_EE_11_WEB) && + isAcceptableSourceLevel("21", sourceLevel, acceptableSourceLevels)) { // NOI18N + return null; + } + if (j2eeProfile == Profile.JAVA_EE_5) { JavaPlatform[] java15Platforms = getJavaPlatforms("1.5"); //NOI18N if (java15Platforms.length > 0) { @@ -295,6 +321,17 @@ public static String findWarningType(Profile j2eeProfile, Set acceptableSourceLe return WARN_JDK_11_REQUIRED; } } + } else if (j2eeProfile == Profile.JAKARTA_EE_11_FULL || j2eeProfile == Profile.JAKARTA_EE_11_WEB) { + JavaPlatform[] java21Platforms = getJavaPlatforms("21"); //NOI18N + if (java21Platforms.length > 0) { + return WARN_SET_JDK_21; + } else { + if (canSetSourceLevel("21")) { + return WARN_SET_SOURCE_LEVEL_21; + } else { + return WARN_JDK_21_REQUIRED; + } + } } else { return null; } diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java index 971bd510a141..bcfbf5dd9f7a 100644 --- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java +++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/wizard/ProjectServerPanel.java @@ -426,23 +426,17 @@ private void serverInstanceComboBoxActionPerformed(java.awt.event.ActionEvent ev Set profiles = new TreeSet<>(Profile.UI_COMPARATOR); profiles.addAll(j2eePlatform.getSupportedProfiles(j2eeModuleType)); for (Profile profile : profiles) { - // j2ee 1.3 and 1.4 is not supported anymore + // j2ee 1.3 and 1.4 are not supported anymore if (Profile.J2EE_13.equals(profile) || Profile.J2EE_14.equals(profile)) { continue; } if (j2eeModuleType == J2eeModule.Type.WAR) { - if (Profile.JAVA_EE_6_FULL.equals(profile) || Profile.JAVA_EE_7_FULL.equals(profile) - || Profile.JAVA_EE_8_FULL.equals(profile) || Profile.JAKARTA_EE_8_FULL.equals(profile) - || Profile.JAKARTA_EE_9_FULL.equals(profile) || Profile.JAKARTA_EE_9_1_FULL.equals(profile) - || Profile.JAKARTA_EE_10_FULL.equals(profile)) { + if (profile.isFullProfile() && profile.isAtLeast(Profile.JAVA_EE_6_FULL)) { // for web apps always offer only JAVA_EE_6_WEB profile and skip full one continue; } } else { - if (Profile.JAVA_EE_6_WEB.equals(profile) || Profile.JAVA_EE_7_WEB.equals(profile) - || Profile.JAVA_EE_8_WEB.equals(profile) || Profile.JAKARTA_EE_8_WEB.equals(profile) - || Profile.JAKARTA_EE_9_WEB.equals(profile) || Profile.JAKARTA_EE_9_1_WEB.equals(profile) - || Profile.JAKARTA_EE_10_WEB.equals(profile)) { + if (profile.isWebProfile() && profile.isAtLeast(Profile.JAVA_EE_6_WEB)) { // for EE apps always skip web profile continue; } @@ -617,7 +611,9 @@ private String getSourceLevel(WizardDescriptor d, String serverInstanceId, Profi Set jdks = j2eePlatform.getSupportedJavaPlatformVersions(); // make sure that chosen source level is suported by server: if (jdks != null && !jdks.contains(sourceLevel)) { // workaround for #212146 when jdks == null - if ("11".equals(sourceLevel) && jdks.contains("1.8")) { + if ("21".equals(sourceLevel) && jdks.contains("11")) { + sourceLevel = "11"; + } else if ("11".equals(sourceLevel) && jdks.contains("1.8")) { sourceLevel = "1.8"; } else if ("1.8".equals(sourceLevel) && jdks.contains("1.7")) { sourceLevel = "1.7"; @@ -638,6 +634,9 @@ private String getSourceLevel(WizardDescriptor d, String serverInstanceId, Profi String warningType = warningPanel.getWarningType(); if (warningType != null) { switch (warningType) { + case J2eeVersionWarningPanel.WARN_SET_SOURCE_LEVEL_21: + sourceLevel = "21"; //NOI18N + break; case J2eeVersionWarningPanel.WARN_SET_SOURCE_LEVEL_11: sourceLevel = "11"; //NOI18N break; @@ -987,6 +986,8 @@ private void checkACXmlJ2eeVersion(FileObject appClientXML) { j2eeSpecComboBox.setSelectedItem(new ProfileItem(Profile.JAKARTA_EE_9_FULL)); } else if(new BigDecimal(org.netbeans.modules.j2ee.dd.api.client.AppClient.VERSION_10_0).equals(version)) { j2eeSpecComboBox.setSelectedItem(new ProfileItem(Profile.JAKARTA_EE_10_FULL)); + } else if(new BigDecimal(org.netbeans.modules.j2ee.dd.api.client.AppClient.VERSION_11_0).equals(version)) { + j2eeSpecComboBox.setSelectedItem(new ProfileItem(Profile.JAKARTA_EE_11_FULL)); } } catch (IOException e) { String message = NbBundle.getMessage(ProjectServerPanel.class, "MSG_AppClientXmlCorrupted"); // NOI18N diff --git a/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig b/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig index 80e99d4d559b..405c0ac97d7a 100644 --- a/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig +++ b/enterprise/javaee.specs.support/nbproject/org-netbeans-modules-javaee-specs-support.sig @@ -1,5 +1,5 @@ #Signature file v4.1 -#Version 1.48 +#Version 1.49 CLSS public abstract interface java.io.Serializable @@ -169,6 +169,7 @@ meth public boolean isJpa22Supported() meth public boolean isJpa2Supported() meth public boolean isJpa30Supported() meth public boolean isJpa31Supported() +meth public boolean isJpa32Supported() meth public java.lang.String getClassName() supr java.lang.Object hfds impl @@ -221,7 +222,7 @@ meth public abstract java.lang.String activationConfigProperty() CLSS public final org.netbeans.modules.javaee.specs.support.spi.JpaProviderFactory cons public init() innr public abstract static Accessor -meth public static org.netbeans.modules.javaee.specs.support.api.JpaProvider createJpaProvider(java.lang.String,boolean,boolean,boolean,boolean,boolean,boolean,boolean) +meth public static org.netbeans.modules.javaee.specs.support.api.JpaProvider createJpaProvider(java.lang.String,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean) meth public static org.netbeans.modules.javaee.specs.support.api.JpaProvider createJpaProvider(org.netbeans.modules.javaee.specs.support.spi.JpaProviderImplementation) supr java.lang.Object @@ -242,6 +243,7 @@ meth public abstract boolean isJpa22Supported() meth public abstract boolean isJpa2Supported() meth public abstract boolean isJpa30Supported() meth public abstract boolean isJpa31Supported() +meth public abstract boolean isJpa32Supported() meth public abstract java.lang.String getClassName() CLSS public abstract interface org.netbeans.modules.javaee.specs.support.spi.JpaSupportImplementation diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java index 46e2fe616625..b2b37eaf8238 100644 --- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java +++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/api/JpaProvider.java @@ -66,6 +66,10 @@ public boolean isJpa30Supported() { public boolean isJpa31Supported() { return impl.isJpa31Supported(); } + + public boolean isJpa32Supported() { + return impl.isJpa32Supported(); + } public boolean isDefault() { return impl.isDefault(); diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java index d2b6ad9a7f62..5cabb0e6bcea 100644 --- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java +++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/bridge/BridgingJpaSupportImpl.java @@ -69,30 +69,41 @@ public Set getProviders() { || platform.isToolSupported(JPAModuleInfo.JPAVERSIONPREFIX + Persistence.VERSION_3_0); boolean jpa31 = !check || platform.isToolSupported(JPAModuleInfo.JPAVERSIONPREFIX + Persistence.VERSION_3_1); + boolean jpa32 = !check + || platform.isToolSupported(JPAModuleInfo.JPAVERSIONPREFIX + Persistence.VERSION_3_2); for (Map.Entry entry : getPossibleContainerProviders().entrySet()) { Provider provider = entry.getKey(); if (platform.isToolSupported(provider.getProviderClass())) { JpaProvider jpaProvider = JpaProviderFactory.createJpaProvider( - provider.getProviderClass(), platform.isToolSupported(entry.getValue()), jpa1, jpa2, jpa21, jpa22, jpa30, jpa31); + provider.getProviderClass(), + platform.isToolSupported(entry.getValue()), + jpa1, jpa2, jpa21, jpa22, jpa30, jpa31, jpa32); result.add(jpaProvider); } } return result; } + // TODO: Add missing JPA 3.x providers private static Map getPossibleContainerProviders() { - Map candidates = new HashMap(); + Map candidates = new HashMap<>(); candidates.put(ProviderUtil.HIBERNATE_PROVIDER1_0, "hibernatePersistenceProviderIsDefault1.0"); // NOI18N candidates.put(ProviderUtil.HIBERNATE_PROVIDER2_0, "hibernatePersistenceProviderIsDefault2.0"); // NOI18N candidates.put(ProviderUtil.HIBERNATE_PROVIDER2_1, "hibernatePersistenceProviderIsDefault2.1"); // NOI18N candidates.put(ProviderUtil.HIBERNATE_PROVIDER2_2, "hibernatePersistenceProviderIsDefault2.2"); // NOI18N + candidates.put(ProviderUtil.HIBERNATE_PROVIDER3_0, "hibernatePersistenceProviderIsDefault3.0"); // NOI18N + candidates.put(ProviderUtil.HIBERNATE_PROVIDER3_1, "hibernatePersistenceProviderIsDefault3.1"); // NOI18N + candidates.put(ProviderUtil.HIBERNATE_PROVIDER3_2, "hibernatePersistenceProviderIsDefault3.2"); // NOI18N candidates.put(ProviderUtil.TOPLINK_PROVIDER1_0, "toplinkPersistenceProviderIsDefault"); // NOI18N candidates.put(ProviderUtil.KODO_PROVIDER, "kodoPersistenceProviderIsDefault"); // NOI18N - candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_2, "dataNucleusPersistenceProviderIsDefault2.2"); // NOI18N - candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_1, "dataNucleusPersistenceProviderIsDefault2.1"); // NOI18N - candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_0, "dataNucleusPersistenceProviderIsDefault2.0"); // NOI18N candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER1_0, "dataNucleusPersistenceProviderIsDefault1.0"); // NOI18N + candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_0, "dataNucleusPersistenceProviderIsDefault2.0"); // NOI18N + candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_1, "dataNucleusPersistenceProviderIsDefault2.1"); // NOI18N + candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER2_2, "dataNucleusPersistenceProviderIsDefault2.2"); // NOI18N + candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER3_0, "dataNucleusPersistenceProviderIsDefault3.0"); // NOI18N + candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER3_1, "dataNucleusPersistenceProviderIsDefault3.1"); // NOI18N + candidates.put(ProviderUtil.DATANUCLEUS_PROVIDER3_2, "dataNucleusPersistenceProviderIsDefault3.2"); // NOI18N candidates.put(ProviderUtil.OPENJPA_PROVIDER1_0, "openJpaPersistenceProviderIsDefault1.0"); // NOI18N candidates.put(ProviderUtil.OPENJPA_PROVIDER2_0, "openJpaPersistenceProviderIsDefault2.0"); // NOI18N candidates.put(ProviderUtil.OPENJPA_PROVIDER2_1, "openJpaPersistenceProviderIsDefault2.1"); // NOI18N @@ -103,6 +114,7 @@ private static Map getPossibleContainerProviders() { candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER2_2, "eclipseLinkPersistenceProviderIsDefault2.2"); // NOI18N candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER3_0, "eclipseLinkPersistenceProviderIsDefault3.0"); // NOI18N candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER3_1, "eclipseLinkPersistenceProviderIsDefault3.1"); // NOI18N + candidates.put(ProviderUtil.ECLIPSELINK_PROVIDER3_2, "eclipseLinkPersistenceProviderIsDefault3.2"); // NOI18N return candidates; } } diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java index fa139fb5912f..4610185dcd34 100644 --- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java +++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderFactory.java @@ -33,7 +33,8 @@ public static JpaProvider createJpaProvider(JpaProviderImplementation impl) { public static JpaProvider createJpaProvider(final String className, final boolean isDefault, final boolean isJpa1Supported, final boolean isJpa2Supported, final boolean isJpa21Supported, - final boolean isJpa22Supported, final boolean isJpa30Supported, final boolean isJpa31Supported) { + final boolean isJpa22Supported, final boolean isJpa30Supported, final boolean isJpa31Supported, + final boolean isJpa32Supported) { return Accessor.getDefault().createJpaProvider(new JpaProviderImplementation() { @Override @@ -66,6 +67,11 @@ public boolean isJpa31Supported() { return isJpa31Supported; } + @Override + public boolean isJpa32Supported() { + return isJpa32Supported; + } + @Override public boolean isDefault() { return isDefault; diff --git a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java index ddb0cdb6086f..87208738f972 100644 --- a/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java +++ b/enterprise/javaee.specs.support/src/org/netbeans/modules/javaee/specs/support/spi/JpaProviderImplementation.java @@ -36,6 +36,8 @@ public interface JpaProviderImplementation { boolean isJpa31Supported(); + boolean isJpa32Supported(); + boolean isDefault(); String getClassName(); diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java index fdd0cf2b9777..863f9166545a 100644 --- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java +++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/JpaSupportImpl.java @@ -38,7 +38,7 @@ public JpaSupportImpl(WildflyJ2eePlatformFactory.J2eePlatformImplImpl platformIm @Override public JpaProvider getDefaultProvider() { String defaultProvider = platformImpl.getDefaultJpaProvider(); - return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, true, true, true, true, true); + return JpaProviderFactory.createJpaProvider(defaultProvider, true, true, true, true, true, true, true, true); } @Override @@ -47,13 +47,16 @@ public Set getProviders() { boolean jpa2 = true; Set providers = new HashSet(); if (platformImpl.containsPersistenceProvider(WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER)) { - providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER, WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, true, true, true, true)); + providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER, + WildflyJ2eePlatformFactory.HIBERNATE_JPA_PROVIDER.equals(defaultProvider), true, jpa2, true, true, true, true, true)); } if (platformImpl.containsPersistenceProvider(WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER)) { - providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER, WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false)); + providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER, + WildflyJ2eePlatformFactory.TOPLINK_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false)); } if (platformImpl.containsPersistenceProvider(WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER)) { - providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER, WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false)); + providers.add(JpaProviderFactory.createJpaProvider(WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER, + WildflyJ2eePlatformFactory.KODO_JPA_PROVIDER.equals(defaultProvider), true, false, false, false, false, false, false)); } return providers; } diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java index 138a9f1a8641..be40e1ece72e 100644 --- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java +++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyJ2eePlatformFactory.java @@ -118,6 +118,7 @@ public static class J2eePlatformImplImpl extends J2eePlatformImpl2 { JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_9_FULL); JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_9_1_FULL); JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_10_FULL); + JAKARTAEE_FULL_PROFILES.add(Profile.JAKARTA_EE_11_FULL); } private static final Set EAP6_PROFILES = new HashSet<>(4); @@ -136,6 +137,7 @@ public static class J2eePlatformImplImpl extends J2eePlatformImpl2 { WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_9_WEB); WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_9_1_WEB); WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_10_WEB); + WILDFLY_WEB_PROFILES.add(Profile.JAKARTA_EE_11_WEB); } private static final Set JAKARTAEE_WEB_PROFILES = new HashSet<>(8); @@ -144,6 +146,7 @@ public static class J2eePlatformImplImpl extends J2eePlatformImpl2 { JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_9_WEB); JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_9_1_WEB); JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_10_WEB); + JAKARTAEE_WEB_PROFILES.add(Profile.JAKARTA_EE_11_WEB); } private LibraryImplementation[] libraries; diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/JPAStuffImpl.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/JPAStuffImpl.java index e44f161900a9..b1e0031b24d7 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/JPAStuffImpl.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/JPAStuffImpl.java @@ -105,7 +105,8 @@ public Boolean isJPAVersionSupported(String version) { JpaSupport support = JpaSupport.getInstance(platform); JpaProvider provider = support.getDefaultProvider(); if (provider != null) { - return (Persistence.VERSION_3_1.equals(version) && provider.isJpa31Supported()) + return (Persistence.VERSION_3_2.equals(version) && provider.isJpa32Supported()) + || (Persistence.VERSION_3_1.equals(version) && provider.isJpa31Supported()) || (Persistence.VERSION_3_0.equals(version) && provider.isJpa30Supported()) || (Persistence.VERSION_2_2.equals(version) && provider.isJpa22Supported()) || (Persistence.VERSION_2_1.equals(version) && provider.isJpa21Supported()) diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/MavenJsfReferenceImplementationProvider.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/MavenJsfReferenceImplementationProvider.java index 5288a6fb8fef..707819664363 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/MavenJsfReferenceImplementationProvider.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/MavenJsfReferenceImplementationProvider.java @@ -54,9 +54,10 @@ public class MavenJsfReferenceImplementationProvider implements JsfReferenceImpl map.put(JsfVersion.JSF_2_0, "com.sun.faces:jsf-impl:2.0.11"); map.put(JsfVersion.JSF_2_1, "com.sun.faces:jsf-impl:2.1.29"); map.put(JsfVersion.JSF_2_2, "com.sun.faces:jsf-impl:2.2.20"); - map.put(JsfVersion.JSF_2_3, "org.glassfish:jakarta.faces:2.3.19"); - map.put(JsfVersion.JSF_3_0, "org.glassfish:jakarta.faces:3.0.4"); - map.put(JsfVersion.JSF_4_0, "org.glassfish:jakarta.faces:4.0.2"); + map.put(JsfVersion.JSF_2_3, "org.glassfish:jakarta.faces:2.3.21"); + map.put(JsfVersion.JSF_3_0, "org.glassfish:jakarta.faces:3.0.5"); + map.put(JsfVersion.JSF_4_0, "org.glassfish:jakarta.faces:4.0.5"); + map.put(JsfVersion.JSF_4_1, "org.glassfish:jakarta.faces:4.1.0-M1"); JSF_VERSION_MAVEN_COORDINATES_MAPPING = Collections.unmodifiableMap(map); } diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ear/EarImpl.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ear/EarImpl.java index d7ddaa30f994..e6baefd668f2 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ear/EarImpl.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ear/EarImpl.java @@ -258,6 +258,8 @@ public J2eeModule.Type getModuleType() { @Override public String getModuleVersion() { Profile prf = getJ2eeProfile(); + if (prf == Profile.JAKARTA_EE_11_FULL || prf == Profile.JAKARTA_EE_11_FULL) return Application.VERSION_11; + if (prf == Profile.JAKARTA_EE_10_FULL || prf == Profile.JAKARTA_EE_10_FULL) return Application.VERSION_10; if (prf == Profile.JAKARTA_EE_9_1_FULL || prf == Profile.JAKARTA_EE_9_FULL) return Application.VERSION_9; if (prf == Profile.JAKARTA_EE_8_FULL || prf == Profile.JAVA_EE_8_FULL) return Application.VERSION_8; if (prf == Profile.JAVA_EE_7_FULL) return Application.VERSION_7; diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/customizer/impl/CustomizerRunWeb.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/customizer/impl/CustomizerRunWeb.java index 193557655c54..935e59e856ca 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/customizer/impl/CustomizerRunWeb.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/customizer/impl/CustomizerRunWeb.java @@ -113,6 +113,7 @@ public class CustomizerRunWeb extends BaseRunCustomizer { WEB_PROFILES.add(Profile.JAKARTA_EE_9_WEB); WEB_PROFILES.add(Profile.JAKARTA_EE_9_1_WEB); WEB_PROFILES.add(Profile.JAKARTA_EE_10_WEB); + WEB_PROFILES.add(Profile.JAKARTA_EE_11_WEB); FULL_PROFILES = new TreeSet<>(Profile.UI_COMPARATOR); FULL_PROFILES.add(Profile.JAVA_EE_5); @@ -123,6 +124,7 @@ public class CustomizerRunWeb extends BaseRunCustomizer { FULL_PROFILES.add(Profile.JAKARTA_EE_9_FULL); FULL_PROFILES.add(Profile.JAKARTA_EE_9_1_FULL); FULL_PROFILES.add(Profile.JAKARTA_EE_10_FULL); + FULL_PROFILES.add(Profile.JAKARTA_EE_11_FULL); } @Messages({ diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/ServerSelectionHelper.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/ServerSelectionHelper.java index 4b4162a5cbee..7c632790f2cc 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/ServerSelectionHelper.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/ServerSelectionHelper.java @@ -155,6 +155,7 @@ private void updatePlatformVersionModel() { // If option was selected, show all supported profiles except Java EE 7 profiles if (ExecutionChecker.DEV_NULL.equals(serverInstance)) { if (J2eeModule.Type.WAR.equals(projectType)) { + profiles.add(Profile.JAKARTA_EE_11_WEB); profiles.add(Profile.JAKARTA_EE_10_WEB); profiles.add(Profile.JAKARTA_EE_9_1_WEB); profiles.add(Profile.JAKARTA_EE_9_WEB); @@ -163,6 +164,7 @@ private void updatePlatformVersionModel() { profiles.add(Profile.JAVA_EE_7_WEB); profiles.add(Profile.JAVA_EE_6_WEB); } else { + profiles.add(Profile.JAKARTA_EE_11_FULL); profiles.add(Profile.JAKARTA_EE_10_FULL); profiles.add(Profile.JAKARTA_EE_9_1_FULL); profiles.add(Profile.JAKARTA_EE_9_FULL); @@ -188,6 +190,7 @@ private void updatePlatformVersionModel() { // We want to have Java EE 6 Full profile for all project types except Web project if (J2eeModule.Type.WAR.equals(projectType)) { + profiles.remove(Profile.JAKARTA_EE_11_FULL); profiles.remove(Profile.JAKARTA_EE_10_FULL); profiles.remove(Profile.JAKARTA_EE_9_1_FULL); profiles.remove(Profile.JAKARTA_EE_9_FULL); @@ -196,6 +199,7 @@ private void updatePlatformVersionModel() { profiles.remove(Profile.JAVA_EE_7_FULL); profiles.remove(Profile.JAVA_EE_6_FULL); } else { + profiles.remove(Profile.JAKARTA_EE_11_WEB); profiles.remove(Profile.JAKARTA_EE_10_WEB); profiles.remove(Profile.JAKARTA_EE_9_1_WEB); profiles.remove(Profile.JAKARTA_EE_9_WEB); diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/BaseJ2eeArchetypeProvider.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/BaseJ2eeArchetypeProvider.java index 50fb87d29cd3..5f673b20898d 100755 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/BaseJ2eeArchetypeProvider.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/BaseJ2eeArchetypeProvider.java @@ -95,12 +95,17 @@ protected void addSameMojoArchetypeForAllProfiles(String version, String artifac Archetype jakartaEE9_1Archetype = createArchetype( NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeGroupId.JakartaEE9_1"), NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeVersion.JakartaEE9_1"), - NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeArtifactId.JakartaEE9_1")); + NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeArtifactId.JakartaEE9_1")); Archetype jakartaEE10_0Archetype = createArchetype( NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeGroupId.JakartaEE10_0"), NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeVersion.JakartaEE10_0"), - NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeArtifactId.JakartaEE10_0")); + NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeArtifactId.JakartaEE10_0")); + + Archetype jakartaEE11_0Archetype = createArchetype( + NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeGroupId.JakartaEE11_0"), + NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeVersion.JakartaEE11_0"), + NbBundle.getMessage(BaseJ2eeArchetypeProvider.class,"mvn.archetypeArtifactId.JakartaEE11_0")); map.put(Profile.JAVA_EE_8_FULL, javaEE8Archetype); map.put(Profile.JAVA_EE_8_WEB, javaEE8Archetype); @@ -112,6 +117,8 @@ protected void addSameMojoArchetypeForAllProfiles(String version, String artifac map.put(Profile.JAKARTA_EE_9_1_WEB, jakartaEE9_1Archetype); map.put(Profile.JAKARTA_EE_10_FULL, jakartaEE10_0Archetype); map.put(Profile.JAKARTA_EE_10_WEB, jakartaEE10_0Archetype); + map.put(Profile.JAKARTA_EE_11_FULL, jakartaEE11_0Archetype); + map.put(Profile.JAKARTA_EE_11_WEB, jakartaEE11_0Archetype); } private Archetype createMojoArchetype(String version, String artifactId) { diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/Bundle.properties b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/Bundle.properties index 676ef9d5c855..acdb31543fe2 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/Bundle.properties +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/Bundle.properties @@ -16,6 +16,9 @@ # under the License. # Maven Archetype Properties +mvn.archetypeGroupId.JakartaEE11_0=io.github.juneau001 +mvn.archetypeVersion.JakartaEE11_0=1.0.0 +mvn.archetypeArtifactId.JakartaEE11_0=webapp-jakartaee11 mvn.archetypeGroupId.JakartaEE10_0=io.github.juneau001 mvn.archetypeVersion.JakartaEE10_0=1.1.0 mvn.archetypeArtifactId.JakartaEE10_0=webapp-jakartaee10 diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/J2eeArchetypeFactory.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/J2eeArchetypeFactory.java index 6014fd35af02..60371de8a67d 100755 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/J2eeArchetypeFactory.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/ui/wizard/archetype/J2eeArchetypeFactory.java @@ -90,6 +90,7 @@ public Map getArchetypeMap(J2eeModule.Type projectType) { private static class AppClientArchetypes extends BaseJ2eeArchetypeProvider { @Override protected void setUpProjectArchetypes() { + addJakartaEEArchetype(Profile.JAKARTA_EE_11_FULL,"mvn.archetypeGroupId.JakartaEE11_0","mvn.archetypeVersion.JakartaEE11_0","mvn.archetypeArtifactId.JakartaEE11_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_10_FULL,"mvn.archetypeGroupId.JakartaEE10_0","mvn.archetypeVersion.JakartaEE10_0","mvn.archetypeArtifactId.JakartaEE10_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_1_FULL,"mvn.archetypeGroupId.JakartaEE9_1","mvn.archetypeVersion.JakartaEE9_1","mvn.archetypeArtifactId.JakartaEE9_1"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_FULL,"mvn.archetypeGroupId.JakartaEE9","mvn.archetypeVersion.JakartaEE9","mvn.archetypeArtifactId.JakartaEE9"); @@ -105,6 +106,7 @@ protected void setUpProjectArchetypes() { private static class EaArchetypes extends BaseJ2eeArchetypeProvider { @Override protected void setUpProjectArchetypes() { + addJakartaEEArchetype(Profile.JAKARTA_EE_11_FULL,"mvn.archetypeGroupId.JakartaEE11_0","mvn.archetypeVersion.JakartaEE11_0","mvn.archetypeArtifactId.JakartaEE11_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_10_FULL,"mvn.archetypeGroupId.JakartaEE10_0","mvn.archetypeVersion.JakartaEE10_0","mvn.archetypeArtifactId.JakartaEE10_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_1_FULL,"mvn.archetypeGroupId.JakartaEE9_1","mvn.archetypeVersion.JakartaEE9_1","mvn.archetypeArtifactId.JakartaEE9_1"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_FULL,"mvn.archetypeGroupId.JakartaEE9","mvn.archetypeVersion.JakartaEE9","mvn.archetypeArtifactId.JakartaEE9"); @@ -118,6 +120,7 @@ protected void setUpProjectArchetypes() { private static class EarArchetypes extends BaseJ2eeArchetypeProvider { @Override protected void setUpProjectArchetypes() { + addJakartaEEArchetype(Profile.JAKARTA_EE_11_FULL,"mvn.archetypeGroupId.JakartaEE11_0","mvn.archetypeVersion.JakartaEE11_0","mvn.archetypeArtifactId.JakartaEE11_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_10_FULL,"mvn.archetypeGroupId.JakartaEE10_0","mvn.archetypeVersion.JakartaEE10_0","mvn.archetypeArtifactId.JakartaEE10_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_1_FULL,"mvn.archetypeGroupId.JakartaEE9_1","mvn.archetypeVersion.JakartaEE9_1","mvn.archetypeArtifactId.JakartaEE9_1"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_FULL,"mvn.archetypeGroupId.JakartaEE9","mvn.archetypeVersion.JakartaEE9","mvn.archetypeArtifactId.JakartaEE9"); @@ -133,6 +136,7 @@ protected void setUpProjectArchetypes() { private static class EjbArchetypes extends BaseJ2eeArchetypeProvider { @Override protected void setUpProjectArchetypes() { + addJakartaEEArchetype(Profile.JAKARTA_EE_11_FULL,"mvn.archetypeGroupId.JakartaEE11_0","mvn.archetypeVersion.JakartaEE11_0","mvn.archetypeArtifactId.JakartaEE11_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_10_FULL,"mvn.archetypeGroupId.JakartaEE10_0","mvn.archetypeVersion.JakartaEE10_0","mvn.archetypeArtifactId.JakartaEE10_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_1_FULL,"mvn.archetypeGroupId.JakartaEE9_1","mvn.archetypeVersion.JakartaEE9_1","mvn.archetypeArtifactId.JakartaEE9_1"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_FULL,"mvn.archetypeGroupId.JakartaEE9","mvn.archetypeVersion.JakartaEE9","mvn.archetypeArtifactId.JakartaEE9"); @@ -148,6 +152,7 @@ protected void setUpProjectArchetypes() { private static class WebArchetypes extends BaseJ2eeArchetypeProvider { @Override protected void setUpProjectArchetypes() { + addJakartaEEArchetype(Profile.JAKARTA_EE_11_WEB,"mvn.archetypeGroupId.JakartaEE11_0","mvn.archetypeVersion.JakartaEE11_0","mvn.archetypeArtifactId.JakartaEE11_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_10_WEB,"mvn.archetypeGroupId.JakartaEE10_0","mvn.archetypeVersion.JakartaEE10_0","mvn.archetypeArtifactId.JakartaEE10_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_1_WEB,"mvn.archetypeGroupId.JakartaEE9_1","mvn.archetypeVersion.JakartaEE9_1","mvn.archetypeArtifactId.JakartaEE9_1"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_WEB,"mvn.archetypeGroupId.JakartaEE9","mvn.archetypeVersion.JakartaEE9","mvn.archetypeArtifactId.JakartaEE9"); @@ -162,6 +167,7 @@ protected void setUpProjectArchetypes() { // using Java EE 6 Full profile, then the same profile applies to Ejb, Web and Parent project creation - In that case // application is looking for Java EE 6 Full archetype to create the Web project with it, so we need to have it here // or otherwise Java EE project would not be created properly + addJakartaEEArchetype(Profile.JAKARTA_EE_11_FULL,"mvn.archetypeGroupId.JakartaEE11_0","mvn.archetypeVersion.JakartaEE11_0","mvn.archetypeArtifactId.JakartaEE11_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_10_FULL,"mvn.archetypeGroupId.JakartaEE10_0","mvn.archetypeVersion.JakartaEE10_0","mvn.archetypeArtifactId.JakartaEE10_0"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_1_FULL,"mvn.archetypeGroupId.JakartaEE9_1","mvn.archetypeVersion.JakartaEE9_1","mvn.archetypeArtifactId.JakartaEE9_1"); addJakartaEEArchetype(Profile.JAKARTA_EE_9_FULL,"mvn.archetypeGroupId.JakartaEE9","mvn.archetypeVersion.JakartaEE9","mvn.archetypeArtifactId.JakartaEE9"); diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebModuleImpl.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebModuleImpl.java index d9afd9f39605..a2e7324cffe9 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebModuleImpl.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebModuleImpl.java @@ -158,6 +158,9 @@ public Profile getJ2eeProfile() { if (Profile.JAKARTA_EE_10_FULL.equals(pomProfile)) { return Profile.JAKARTA_EE_10_WEB; } + if (Profile.JAKARTA_EE_11_FULL.equals(pomProfile)) { + return Profile.JAKARTA_EE_11_WEB; + } return pomProfile; } @@ -198,6 +201,9 @@ private Profile getProfileFromDescriptor() { if (WebApp.VERSION_6_0.equals(waVersion)) { return Profile.JAKARTA_EE_10_WEB; } + if (WebApp.VERSION_6_1.equals(waVersion)) { + return Profile.JAKARTA_EE_11_WEB; + } } catch (IOException exc) { ErrorManager.getDefault().notify(exc); } @@ -240,6 +246,8 @@ private Profile getProfileFromDescriptor() { List jakartaEE91Full = new ArrayList<>(); List jakartaEE10Web = new ArrayList<>(); List jakartaEE10Full = new ArrayList<>(); + List jakartaEE11Web = new ArrayList<>(); + List jakartaEE11Full = new ArrayList<>(); // Java EE specification javaEE5.add(new DependencyDesc("javaee", "javaee-api", "5.0")); @@ -258,6 +266,8 @@ private Profile getProfileFromDescriptor() { jakartaEE91Full.add(new DependencyDesc("jakarta.platform","jakarta.jakartaee-web-api","9.1.0")); jakartaEE10Web.add(new DependencyDesc("jakarta.platform","jakarta.jakartaee-api","10.0.0")); jakartaEE10Full.add(new DependencyDesc("jakarta.platform","jakarta.jakartaee-web-api","10.0.0")); + jakartaEE11Web.add(new DependencyDesc("jakarta.platform","jakarta.jakartaee-api","11.0.0-M1")); + jakartaEE11Full.add(new DependencyDesc("jakarta.platform","jakarta.jakartaee-web-api","11.0.0-M1")); // GlassFish implementations javaEE5.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-all", "2")); @@ -276,8 +286,10 @@ private Profile getProfileFromDescriptor() { jakartaEE9Web.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-web", "6.0.0")); jakartaEE91Full.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-all", "6.2.5")); jakartaEE91Web.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-web", "6.2.5")); - jakartaEE10Full.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-all", "7.0.0-M4")); - jakartaEE10Web.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-web", "7.0.0-M4")); + jakartaEE10Full.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-all", "7.0.11")); + jakartaEE10Web.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-web", "7.0.11")); + jakartaEE11Full.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-all", "8.0.0-M1")); + jakartaEE11Web.add(new DependencyDesc("org.glassfish.main.extras", "glassfish-embedded-web", "8.0.0-M1")); // WebLogic implementations @@ -300,6 +312,8 @@ private Profile getProfileFromDescriptor() { jakartaEE8Full.add(new DependencyDesc("org.jboss.spec", "jboss-jakartaee-all-8.0", null)); jakartaEE8Web.add(new DependencyDesc("org.jboss.spec", "jboss-jakartaee-web-8.0", null)); + javaEEMap.put(Profile.JAKARTA_EE_11_FULL, jakartaEE11Full); + javaEEMap.put(Profile.JAKARTA_EE_11_WEB, jakartaEE11Web); javaEEMap.put(Profile.JAKARTA_EE_10_FULL, jakartaEE10Full); javaEEMap.put(Profile.JAKARTA_EE_10_WEB, jakartaEE10Web); javaEEMap.put(Profile.JAKARTA_EE_9_1_FULL, jakartaEE91Full); diff --git a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebRecoPrivTemplates.java b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebRecoPrivTemplates.java index 0a8f6002c59c..8e0fb3a50170 100644 --- a/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebRecoPrivTemplates.java +++ b/enterprise/maven.j2ee/src/org/netbeans/modules/maven/j2ee/web/WebRecoPrivTemplates.java @@ -194,10 +194,7 @@ private boolean isServerSupportingEJB31() { if (ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_6_FULL) || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_7_FULL) || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_8_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_8_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_1_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_10_FULL)) { + || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_8_FULL)) { return true; } diff --git a/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/JavaEEProjectSettingsImplTest.java b/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/JavaEEProjectSettingsImplTest.java index 8d5b2d80005d..6a786e9af48e 100644 --- a/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/JavaEEProjectSettingsImplTest.java +++ b/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/JavaEEProjectSettingsImplTest.java @@ -51,6 +51,8 @@ public void testJavaEEProjectSettingsInMavenProjects() throws Exception { } public void checkProjectForProfileChange(Project prj) { + JavaEEProjectSettings.setProfile(prj, Profile.JAKARTA_EE_11_FULL); + assertEquals(Profile.JAKARTA_EE_11_FULL, JavaEEProjectSettings.getProfile(prj)); JavaEEProjectSettings.setProfile(prj, Profile.JAKARTA_EE_10_FULL); assertEquals(Profile.JAKARTA_EE_10_FULL, JavaEEProjectSettings.getProfile(prj)); JavaEEProjectSettings.setProfile(prj, Profile.JAKARTA_EE_9_1_FULL); diff --git a/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/web/WebModuleImplTest.java b/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/web/WebModuleImplTest.java index 44c3f6a5d6f5..e70edf752d5a 100644 --- a/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/web/WebModuleImplTest.java +++ b/enterprise/maven.j2ee/test/unit/src/org/netbeans/modules/maven/j2ee/web/WebModuleImplTest.java @@ -149,6 +149,14 @@ public void testGetJ2eeProfile_warProject_jakartaEE10FullSpecification() throws public void testGetJ2eeProfile_jakartaEE10WebSpecification() throws IOException { checkJ2eeProfile(Profile.JAKARTA_EE_10_WEB, "jakarta.platform", "jakarta.jakartaee-web-api", "10.0.0"); //NOI18N } + + public void testGetJ2eeProfile_warProject_jakartaEE11FullSpecification() throws IOException { + checkJ2eeProfile(Profile.JAKARTA_EE_11_WEB, "jakarta.platform", "jakarta.jakartaee-api", "11.0.0-M1"); //NOI18N + } + + public void testGetJ2eeProfile_jakartaEE11WebSpecification() throws IOException { + checkJ2eeProfile(Profile.JAKARTA_EE_11_WEB, "jakarta.platform", "jakarta.jakartaee-web-api", "11.0.0-M1"); //NOI18N + } public void testGetJ2eeProfile_javaEE5Full_glassfish() throws IOException { checkJ2eeProfile(Profile.JAVA_EE_5, "org.glassfish.main.extras", "glassfish-embedded-all", "2"); //NOI18N @@ -207,11 +215,19 @@ public void testGetJ2eeProfile_jakartaEE91Web_glassfish() throws IOException { } public void testGetJ2eeProfile_warProject_jakartaEE10Full_glassfish() throws IOException { - checkJ2eeProfile(Profile.JAKARTA_EE_10_WEB, "org.glassfish.main.extras", "glassfish-embedded-all", "7.0.0-M4"); //NOI18N + checkJ2eeProfile(Profile.JAKARTA_EE_10_WEB, "org.glassfish.main.extras", "glassfish-embedded-all", "7.0.11"); //NOI18N } public void testGetJ2eeProfile_jakartaEE10Web_glassfish() throws IOException { - checkJ2eeProfile(Profile.JAKARTA_EE_10_WEB, "org.glassfish.main.extras", "glassfish-embedded-web", "7.0.0-M4"); //NOI18N + checkJ2eeProfile(Profile.JAKARTA_EE_10_WEB, "org.glassfish.main.extras", "glassfish-embedded-web", "7.0.11"); //NOI18N + } + + public void testGetJ2eeProfile_warProject_jakartaEE11Full_glassfish() throws IOException { + checkJ2eeProfile(Profile.JAKARTA_EE_11_WEB, "org.glassfish.main.extras", "glassfish-embedded-all", "8.0.0-M1"); //NOI18N + } + + public void testGetJ2eeProfile_jakartaEE11Web_glassfish() throws IOException { + checkJ2eeProfile(Profile.JAKARTA_EE_11_WEB, "org.glassfish.main.extras", "glassfish-embedded-web", "8.0.0-M1"); //NOI18N } public void testGetJ2eeProfile_javaEE5_weblogic() throws IOException { diff --git a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JavaEEPlatformImpl.java b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JavaEEPlatformImpl.java index f70e05c1a459..23474d8dab64 100644 --- a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JavaEEPlatformImpl.java +++ b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JavaEEPlatformImpl.java @@ -209,6 +209,10 @@ public static Profile[] nbJavaEEProfiles( break; case v10_0_0: profiles[index++] = Profile.JAKARTA_EE_10_FULL; break; + case v11_0_0_web: profiles[index++] = Profile.JAKARTA_EE_11_WEB; + break; + case v11_0_0: profiles[index++] = Profile.JAKARTA_EE_11_FULL; + break; } } else { profiles = new Profile[0]; diff --git a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JpaSupportImpl.java b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JpaSupportImpl.java index 7801277ed1cc..8c86cf024229 100644 --- a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JpaSupportImpl.java +++ b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/Hk2JpaSupportImpl.java @@ -55,16 +55,18 @@ private static class JpaSupportVector { * @param jpa_2_2 JPA 2.2 supported. * @param jpa_3_0 JPA 3.0 supported. * @param jpa_3_1 JPA 3.1 supported. + * @param jpa_3_2 JPA 3.2 supported. */ JpaSupportVector(boolean jpa_1_0, boolean jpa_2_0, boolean jpa_2_1, boolean jpa_2_2, - boolean jpa_3_0, boolean jpa_3_1) { + boolean jpa_3_0, boolean jpa_3_1, boolean jpa_3_2) { _1_0 = jpa_1_0; _2_0 = jpa_2_0; _2_1 = jpa_2_1; _2_2 = jpa_2_2; _3_0 = jpa_3_0; _3_1 = jpa_3_1; + _3_2 = jpa_3_2; } /** JPA 1.0 supported. */ @@ -84,6 +86,8 @@ private static class JpaSupportVector { /** JPA 3.1 supported. */ boolean _3_1; + /** JPA 3.2 supported. */ + boolean _3_2; } //////////////////////////////////////////////////////////////////////////// @@ -105,7 +109,8 @@ private static class JpaSupportVector { new JpaSupportVector( true, true, version.isEE7Supported(), version.isEE8Supported(), - version.isEE9Supported(), version.isEE10Supported() + version.isEE9Supported(), version.isEE10Supported(), + false ) ); } @@ -181,7 +186,7 @@ public JpaProvider getDefaultProvider() { JPA_PROVIDER, true, instanceJpaSupport._1_0, instanceJpaSupport._2_0, instanceJpaSupport._2_1, instanceJpaSupport._2_2, instanceJpaSupport._3_0, - instanceJpaSupport._3_1); + instanceJpaSupport._3_1, instanceJpaSupport._3_2); } } return defaultProvider; diff --git a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/RunTimeDDCatalog.java b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/RunTimeDDCatalog.java index ad3ae50bd840..799dad544704 100644 --- a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/RunTimeDDCatalog.java +++ b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/RunTimeDDCatalog.java @@ -151,6 +151,8 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_9.xsd" , "application_9", "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application-client_10.xsd" , "application-client_10", "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_10.xsd" , "application_10", + "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application-client_11.xsd" , "application-client_11", + "SCHEMA:https://jakarta.ee/xml/ns/jakartaee/application_11.xsd" , "application_11", "SCHEMA:http://java.sun.com/xml/ns/j2ee/jax-rpc-ri-config.xsd" , "jax-rpc-ri-config", "SCHEMA:http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" , "connector_1_5", "SCHEMA:http://java.sun.com/xml/ns/javaee/connector_1_6.xsd" , "connector_1_6", @@ -179,11 +181,13 @@ public class RunTimeDDCatalog extends GrammarQueryManager implements CatalogRead "SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/orm_2_2.xsd" , "orm_2_2", "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_0.xsd" , "orm_3_0", "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_1.xsd" , "orm_3_1", + "SCHEMA:https://jakarta.ee/xml/ns/persistence/orm/orm_3_2.xsd" , "orm_3_2", "SCHEMA:http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" , "persistence_1_0", "SCHEMA:http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" , "persistence_2_0", "SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" , "persistence_2_1", "SCHEMA:http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd" , "persistence_2_2", "SCHEMA:https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd" , "persistence_3_0", + "SCHEMA:https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd" , "persistence_3_2", }; private static final String JavaEE6SchemaToURLMap[] = { @@ -495,6 +499,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String APP_10= JAKARTAEE_NS+"/"+APP_10_XSD; // NOI18N public static final String APP_10_ID = "SCHEMA:"+APP_10; // NOI18N + private static final String APP_11_XSD="application_11.xsd"; // NOI18N + private static final String APP_11= JAKARTAEE_NS+"/"+APP_11_XSD; // NOI18N + public static final String APP_11_ID = "SCHEMA:"+APP_11; // NOI18N + private static final String APPCLIENT_TAG="application-client"; //NOI18N private static final String APPCLIENT_1_4_XSD="application-client_1_4.xsd"; // NOI18N private static final String APPCLIENT_1_4= J2EE_NS+"/"+APPCLIENT_1_4_XSD; // NOI18N @@ -523,6 +531,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String APPCLIENT_10_XSD="application-client_10.xsd"; // NOI18N private static final String APPCLIENT_10= JAKARTAEE_NS+"/"+APPCLIENT_10_XSD; // NOI18N public static final String APPCLIENT_10_ID = "SCHEMA:"+APPCLIENT_10; // NOI18N + + private static final String APPCLIENT_11_XSD="application-client_11.xsd"; // NOI18N + private static final String APPCLIENT_11= JAKARTAEE_NS+"/"+APPCLIENT_11_XSD; // NOI18N + public static final String APPCLIENT_11_ID = "SCHEMA:"+APPCLIENT_11; // NOI18N private static final String WEBSERVICES_TAG="webservices"; //NOI18N private static final String WEBSERVICES_1_1_XSD="j2ee_web_services_1_1.xsd"; // NOI18N @@ -629,6 +641,18 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String WEBFRAGMENT_6_0_XSD="web-fragment_6_0.xsd"; // NOI18N private static final String WEBFRAGMENT_6_0 = JAKARTAEE_NS+"/"+WEBFRAGMENT_6_0_XSD; // NOI18N public static final String WEBFRAGMENT_6_0_ID = "SCHEMA:"+WEBFRAGMENT_6_0; // NOI18N + + private static final String WEBAPP_6_1_XSD="web-app_6_1.xsd"; // NOI18N + private static final String WEBAPP_6_1 = JAKARTAEE_NS+"/"+WEBAPP_6_1_XSD; // NOI18N + public static final String WEBAPP_6_1_ID = "SCHEMA:"+WEBAPP_6_1; // NOI18N + + private static final String WEBCOMMON_6_1_XSD="web-common_6_1.xsd"; // NOI18N + private static final String WEBCOMMON_6_1 = JAKARTAEE_NS+"/"+WEBCOMMON_6_1_XSD; // NOI18N + public static final String WEBCOMMON_6_1_ID = "SCHEMA:"+WEBCOMMON_6_1; // NOI18N + + private static final String WEBFRAGMENT_6_1_XSD="web-fragment_6_1.xsd"; // NOI18N + private static final String WEBFRAGMENT_6_1 = JAKARTAEE_NS+"/"+WEBFRAGMENT_6_1_XSD; // NOI18N + public static final String WEBFRAGMENT_6_1_ID = "SCHEMA:"+WEBFRAGMENT_6_1; // NOI18N public static final String PERSISTENCE_NS = "http://java.sun.com/xml/ns/persistence"; // NOI18N public static final String NEW_PERSISTENCE_NS = "http://xmlns.jcp.org/xml/ns/persistence"; // NOI18N @@ -659,6 +683,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String PERSISTENCE_3_1 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_1_XSD; // NOI18N public static final String PERSISTENCE_3_1_ID = "SCHEMA:"+PERSISTENCE_3_1; // NOI18N + private static final String PERSISTENCE_3_2_XSD="persistence_3_2.xsd"; // NOI18N + private static final String PERSISTENCE_3_2 = JAKARTA_PERSISTENCE_NS+"/"+PERSISTENCE_3_2_XSD; // NOI18N + public static final String PERSISTENCE_3_2_ID = "SCHEMA:"+PERSISTENCE_3_2; // NOI18N + public static final String PERSISTENCEORM_NS = "http://java.sun.com/xml/ns/persistence/orm"; // NOI18N public static final String NEW_PERSISTENCEORM_NS = "http://xmlns.jcp.org/xml/ns/persistence/orm"; // NOI18N public static final String JAKARTA_PERSISTENCEORM_NS = "https://jakarta.ee/xml/ns/persistence/orm"; // NOI18N @@ -688,6 +716,10 @@ public void removePropertyChangeListener(java.beans.PropertyChangeListener l) { private static final String PERSISTENCEORM_3_1 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_1_XSD; // NOI18N yes not ORM NS!!! public static final String PERSISTENCEORM_3_1_ID = "SCHEMA:"+PERSISTENCEORM_3_1; // NOI18N + private static final String PERSISTENCEORM_3_2_XSD="orm_3_2.xsd"; // NOI18N + private static final String PERSISTENCEORM_3_2 = JAKARTA_PERSISTENCEORM_NS+"/"+PERSISTENCEORM_3_2_XSD; // NOI18N yes not ORM NS!!! + public static final String PERSISTENCEORM_3_2_ID = "SCHEMA:"+PERSISTENCEORM_3_2; // NOI18N + public String getFullURLFromSystemId(String systemId){ return null; @@ -766,7 +798,12 @@ else if (systemId.endsWith(APP_1_4_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + APP_10_XSD); } else if (systemId.endsWith(APPCLIENT_10_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + APPCLIENT_10_XSD); - } //web-app, web-common & web-fragment + } else if (systemId.endsWith(APP_11_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + APP_11_XSD); + } else if (systemId.endsWith(APPCLIENT_11_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + APPCLIENT_11_XSD); + } + //web-app, web-common & web-fragment else if (systemId.endsWith(WEBAPP_2_5_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBAPP_2_5_XSD); } else if (systemId.endsWith(WEBAPP_3_0_XSD)) { @@ -799,6 +836,12 @@ else if (systemId.endsWith(WEBAPP_2_5_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBFRAGMENT_6_0_XSD); } else if (systemId.endsWith(WEBCOMMON_6_0_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBCOMMON_6_0_XSD); + } else if (systemId.endsWith(WEBAPP_6_1_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBAPP_6_1_XSD); + } else if (systemId.endsWith(WEBFRAGMENT_6_1_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBFRAGMENT_6_1_XSD); + } else if (systemId.endsWith(WEBCOMMON_6_1_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBCOMMON_6_1_XSD); } //persistence & orm else if (systemId.endsWith(PERSISTENCEORM_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + PERSISTENCEORM_XSD); @@ -822,6 +865,10 @@ else if (systemId.endsWith(PERSISTENCEORM_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION+PERSISTENCEORM_3_1_XSD); } else if (systemId.endsWith(PERSISTENCE_3_0_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + PERSISTENCE_3_0_XSD); + } else if (systemId.endsWith(PERSISTENCEORM_3_2_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + PERSISTENCEORM_3_2_XSD); + } else if (systemId.endsWith(PERSISTENCE_3_2_XSD)) { + return new org.xml.sax.InputSource(SCHEMASLOCATION + PERSISTENCE_3_2_XSD); } //webservice & webservice-client else if (systemId.endsWith(WEBSERVICES_1_1_XSD)) { return new org.xml.sax.InputSource(SCHEMASLOCATION + WEBSERVICES_1_1_XSD); @@ -930,6 +977,12 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-ejbjar2.1": // NOI18N inputSource = resolver.resolveEntity(EJBJAR_2_1_ID, ""); break; + case "text/x-dd-application11.0": // NOI18N + inputSource = resolver.resolveEntity(APP_11_ID, ""); + break; + case "text/x-dd-application10.0": // NOI18N + inputSource = resolver.resolveEntity(APP_10_ID, ""); + break; case "text/x-dd-application9.0": // NOI18N inputSource = resolver.resolveEntity(APP_9_ID, ""); break; @@ -948,6 +1001,12 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-application1.4": // NOI18N inputSource = resolver.resolveEntity(APP_1_4_ID, ""); break; + case "text/x-dd-client11.0": // NOI18N + inputSource = resolver.resolveEntity(APPCLIENT_11_ID, ""); + break; + case "text/x-dd-client10.0": // NOI18N + inputSource = resolver.resolveEntity(APPCLIENT_10_ID, ""); + break; case "text/x-dd-client9.0": // NOI18N inputSource = resolver.resolveEntity(APPCLIENT_9_ID, ""); break; @@ -966,6 +1025,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-client1.4": // NOI18N inputSource = resolver.resolveEntity(APPCLIENT_1_4_ID, ""); break; + case "text/x-dd-servlet6.1": // NOI18N + inputSource = resolver.resolveEntity(WEBAPP_6_1_ID, ""); + break; case "text/x-dd-servlet6.0": // NOI18N inputSource = resolver.resolveEntity(WEBAPP_6_0_ID, ""); break; @@ -984,6 +1046,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-servlet2.5": // NOI18N inputSource = resolver.resolveEntity(WEBAPP_2_5_ID, ""); break; + case "text/x-dd-servlet-fragment6.1": // NOI18N + inputSource = resolver.resolveEntity(WEBFRAGMENT_6_1_ID, ""); + break; case "text/x-dd-servlet-fragment6.0": // NOI18N inputSource = resolver.resolveEntity(WEBFRAGMENT_6_0_ID, ""); break; @@ -999,6 +1064,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-dd-servlet-fragment3.0": // NOI18N inputSource = resolver.resolveEntity(WEBFRAGMENT_3_0_ID, ""); break; + case "text/x-persistence3.2": // NOI18N + inputSource = resolver.resolveEntity(PERSISTENCE_3_2_ID, ""); + break; case "text/x-persistence3.1": // NOI18N inputSource = resolver.resolveEntity(PERSISTENCE_3_1_ID, ""); break; @@ -1017,6 +1085,9 @@ public GrammarQuery getGrammar(GrammarEnvironment ctx) { case "text/x-persistence1.0": // NOI18N inputSource = resolver.resolveEntity(PERSISTENCE_ID, ""); break; + case "text/x-orm3.2": // NOI18N + inputSource = resolver.resolveEntity(PERSISTENCEORM_3_2_ID, ""); + break; case "text/x-orm3.1": // NOI18N inputSource = resolver.resolveEntity(PERSISTENCEORM_3_1_ID, ""); break; diff --git a/enterprise/payara.tooling/src/org/netbeans/modules/payara/tooling/server/config/JavaEEProfile.java b/enterprise/payara.tooling/src/org/netbeans/modules/payara/tooling/server/config/JavaEEProfile.java index c26489869d52..79427468f2ad 100644 --- a/enterprise/payara.tooling/src/org/netbeans/modules/payara/tooling/server/config/JavaEEProfile.java +++ b/enterprise/payara.tooling/src/org/netbeans/modules/payara/tooling/server/config/JavaEEProfile.java @@ -84,7 +84,13 @@ public enum JavaEEProfile { v10_0_0_web(Version.v10_0_0, Type.WEB, "10.0.0-web"), /** JakartaEE 10 full profile. */ - v10_0_0(Version.v10_0_0, Type.FULL, "10.0.0"); + v10_0_0(Version.v10_0_0, Type.FULL, "10.0.0"), + + /** JakartaEE 11 web profile. */ + v11_0_0_web(Version.v11_0_0, Type.WEB, "11.0.0-web"), + + /** JakartaEE 11 full profile. */ + v11_0_0(Version.v11_0_0, Type.FULL, "11.0.0"); //////////////////////////////////////////////////////////////////////////// // Inner enums // @@ -144,7 +150,9 @@ public enum Version { /** JakartaEE 9.1. */ v9_1_0("9.1.0"), /** JakartaEE 10.0 */ - v10_0_0("10.0.0"); + v10_0_0("10.0.0"), + /** JakartaEE 11.0 */ + v11_0_0("11.0.0"); /** JavaEE profile type name. */ private final String name; diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManager.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManager.java index d4d96979fa7e..0147f5eae1a8 100644 --- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManager.java +++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManager.java @@ -92,7 +92,7 @@ public boolean isAtLeast(TomcatVersion tv) { public enum TomEEVersion { TOMEE_15(15), TOMEE_16(16), TOMEE_17(17), TOMEE_70(70), - TOMEE_71(71), TOMEE_80(80), TOMEE_90(90); + TOMEE_71(71), TOMEE_80(80), TOMEE_90(90), TOMEE_100(100); TomEEVersion(int version) { this.version = version; } private final int version; @@ -499,6 +499,10 @@ public synchronized boolean isTomEEJaxRS() { } } + public boolean isTomEE10() { + return tomEEVersion == TomEEVersion.TOMEE_100; + } + public boolean isTomEE9() { return tomEEVersion == TomEEVersion.TOMEE_90; } @@ -518,6 +522,10 @@ public boolean isJpa30() { public boolean isJpa31() { return false; } + + public boolean isJpa32() { + return isTomEE10(); + } public boolean isJpa22() { return isTomEE8(); diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/JpaSupportImpl.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/JpaSupportImpl.java index fd36d119bd26..55898ab5a52b 100644 --- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/JpaSupportImpl.java +++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/JpaSupportImpl.java @@ -28,7 +28,8 @@ /** * This is TomEE only class. TomEE PluME support two implementations: {@code OpenJPA} * and {@code EclipseLink},

every other TomEE flavor only support {@code OpenJPA} - * @author Petr Hejl, José Contreras + * @author Petr Hejl + * @author José Contreras */ class JpaSupportImpl implements JpaSupportImplementation { @@ -51,7 +52,8 @@ public JpaProvider getDefaultProvider() { instance.isJpa21(), instance.isJpa22(), instance.isJpa30(), - instance.isJpa31()); + instance.isJpa31(), + instance.isJpa32()); } @Override @@ -65,7 +67,8 @@ public Set getProviders() { instance.isJpa21(), instance.isJpa22(), instance.isJpa30(), - instance.isJpa31())); + instance.isJpa31(), + instance.isJpa32())); // TomEE PluME has Eclipselink and OpenJPA if (instance.isTomEEplume()) { providers.add(JpaProviderFactory.createJpaProvider( @@ -76,7 +79,8 @@ public Set getProviders() { instance.isJpa21(), instance.isJpa22(), instance.isJpa30(), - instance.isJpa31())); + instance.isJpa31(), + instance.isJpa32())); } return providers; } diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java index fa11460ff56a..ce4aacb48671 100644 --- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java +++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java @@ -464,6 +464,8 @@ public Set getSupportedProfiles() { // Only TomEE versions 8/9 of type Plus/PluME support full profile if (manager.getTomEEType().ordinal() >= 3 ) { switch (manager.getTomEEVersion()) { + case TOMEE_100: + profiles.add(Profile.JAKARTA_EE_11_FULL); case TOMEE_90: profiles.add(Profile.JAKARTA_EE_9_1_FULL); break; @@ -478,6 +480,8 @@ public Set getSupportedProfiles() { } } switch (manager.getTomEEVersion()) { + case TOMEE_100: + profiles.add(Profile.JAKARTA_EE_11_WEB); case TOMEE_90: profiles.add(Profile.JAKARTA_EE_9_1_WEB); break; @@ -506,7 +510,7 @@ public Set getSupportedProfiles() { } else { switch (manager.getTomcatVersion()) { case TOMCAT_110: - profiles.add(Profile.JAKARTA_EE_10_WEB); + profiles.add(Profile.JAKARTA_EE_11_WEB); break; case TOMCAT_101: profiles.add(Profile.JAKARTA_EE_10_WEB); @@ -551,6 +555,9 @@ public Set getSupportedJavaPlatformVersions() { // TomEE has different supported Java versions if (manager.isTomEE()) { switch (manager.getTomEEVersion()) { + case TOMEE_100: + versions = versionRange(21, 23); + break; case TOMEE_90: versions = versionRange(11, 23); break; diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java index 12d60fe4749a..d7bc82617110 100644 --- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java +++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java @@ -737,6 +737,8 @@ private static void addFileToList(List list, File f) { String eeDocs; switch (tm.getTomcatVersion()) { case TOMCAT_110: + eeDocs = "docs/jakartaee11-doc-api.jar"; + break; case TOMCAT_101: eeDocs = "docs/jakartaee10-doc-api.jar"; break; diff --git a/enterprise/web.beans/src/org/netbeans/modules/web/beans/wizard/BeansXmlIterator.java b/enterprise/web.beans/src/org/netbeans/modules/web/beans/wizard/BeansXmlIterator.java index de6f707ba38c..096fdfb781c7 100644 --- a/enterprise/web.beans/src/org/netbeans/modules/web/beans/wizard/BeansXmlIterator.java +++ b/enterprise/web.beans/src/org/netbeans/modules/web/beans/wizard/BeansXmlIterator.java @@ -77,7 +77,9 @@ public Set instantiate(TemplateWizard wizard) throws IOException { Profile profile = null; if (project != null) { J2eeProjectCapabilities cap = J2eeProjectCapabilities.forProject(project); - if (cap != null && cap.isCdi40Supported()) { + if (cap != null && cap.isCdi41Supported()) { + profile = Profile.JAKARTA_EE_11_FULL; + } else if (cap != null && cap.isCdi40Supported()) { profile = Profile.JAKARTA_EE_10_FULL; } else if (cap != null && cap.isCdi30Supported()) { profile = Profile.JAKARTA_EE_9_FULL; diff --git a/enterprise/web.core/src/org/netbeans/modules/web/wizards/PageIterator.java b/enterprise/web.core/src/org/netbeans/modules/web/wizards/PageIterator.java index 6136e3f848d4..d6f6ba78d5de 100644 --- a/enterprise/web.core/src/org/netbeans/modules/web/wizards/PageIterator.java +++ b/enterprise/web.core/src/org/netbeans/modules/web/wizards/PageIterator.java @@ -202,6 +202,11 @@ private static boolean isJSF40(WebModule wm) { ClassPath classpath = ClassPath.getClassPath(wm.getDocumentBase(), ClassPath.COMPILE); return classpath != null && classpath.findResource("jakarta/faces/lifecycle/ClientWindowScoped.class") != null; //NOI18N } + + private static boolean isJSF41(WebModule wm) { + ClassPath classpath = ClassPath.getClassPath(wm.getDocumentBase(), ClassPath.COMPILE); + return classpath != null && classpath.findResource("jakarta/faces/convert/UUIDConverter.class") != null; //NOI18N + } public Set instantiate(TemplateWizard wiz) throws IOException { // Here is the default plain behavior. Simply takes the selected @@ -236,7 +241,9 @@ public Set instantiate(TemplateWizard wiz) throws IOException { template = templateParent.getFileObject("JSP", "xhtml"); //NOI18N WebModule wm = WebModule.getWebModule(df.getPrimaryFile()); if (wm != null) { - if (isJSF40(wm)) { + if (isJSF41(wm)) { + wizardProps.put("isJSF41", Boolean.TRUE); + } else if (isJSF40(wm)) { wizardProps.put("isJSF40", Boolean.TRUE); } else if (isJSF30(wm)) { wizardProps.put("isJSF30", Boolean.TRUE); diff --git a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java index 8d5c9f5164a2..f8b0b7c9561b 100644 --- a/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java +++ b/enterprise/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java @@ -973,6 +973,7 @@ private static class ParseTask implements Callable { private static final Map VERSION_FACES_SCHEMA_FACES_MAPPING; static { Map map = new HashMap<>(); + map.put("4.1", "com/sun/faces/web-facesconfig_4_1.xsd"); map.put("4.0", "com/sun/faces/web-facesconfig_4_0.xsd"); map.put("3.0", "com/sun/faces/web-facesconfig_3_0.xsd"); map.put("2.3", "com/sun/faces/web-facesconfig_2_3.xsd"); @@ -986,6 +987,7 @@ private static class ParseTask implements Callable { private static final Map VERSION_FACES_SCHEMA_FACELET_TAGLIB_MAPPING; static { Map map = new HashMap<>(); + map.put("4.1", "com/sun/faces/web-facelettaglibrary_4_1.xsd"); map.put("4.0", "com/sun/faces/web-facelettaglibrary_4_0.xsd"); map.put("3.0", "com/sun/faces/web-facelettaglibrary_3_0.xsd"); map.put("2.3", "com/sun/faces/web-facelettaglibrary_2_3.xsd"); diff --git a/enterprise/web.jsf/licenseinfo.xml b/enterprise/web.jsf/licenseinfo.xml index e04457198e5f..54a3274a6561 100644 --- a/enterprise/web.jsf/licenseinfo.xml +++ b/enterprise/web.jsf/licenseinfo.xml @@ -104,6 +104,8 @@ src/org/netbeans/modules/web/jsf/resources/web-facesconfig_3_0.xsd src/org/netbeans/modules/web/jsf/resources/web-facelettaglibrary_4_0.xsd src/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_0.xsd + src/org/netbeans/modules/web/jsf/resources/web-facelettaglibrary_4_1.xsd + src/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_1.xsd diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFCatalog.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFCatalog.java index 14b91772156a..20e04c815aa4 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFCatalog.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFCatalog.java @@ -47,6 +47,7 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa private static final String URL_JSF_2_3="nbres:/org/netbeans/modules/web/jsf/resources/web-facesconfig_2_3.xsd"; // NOI18N private static final String URL_JSF_3_0="nbres:/org/netbeans/modules/web/jsf/resources/web-facesconfig_3_0.xsd"; // NOI18N private static final String URL_JSF_4_0="nbres:/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_0.xsd"; // NOI18N + private static final String URL_JSF_4_1="nbres:/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_1.xsd"; // NOI18N public static final String JAVAEE_NS = "http://java.sun.com/xml/ns/javaee"; // NOI18N public static final String NEW_JAVAEE_NS = "http://xmlns.jcp.org/xml/ns/javaee"; //NOI18N @@ -58,6 +59,7 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa private static final String JSF_2_3_XSD="web-facesconfig_2_3.xsd"; // NOI18N private static final String JSF_3_0_XSD="web-facesconfig_3_0.xsd"; // NOI18N private static final String JSF_4_0_XSD="web-facesconfig_4_0.xsd"; // NOI18N + private static final String JSF_4_1_XSD="web-facesconfig_4_1.xsd"; // NOI18N private static final String JSF_1_2=JAVAEE_NS+"/"+JSF_1_2_XSD; // NOI18N private static final String JSF_2_0=JAVAEE_NS+"/"+JSF_2_0_XSD; // NOI18N private static final String JSF_2_1=JAVAEE_NS+"/"+JSF_2_1_XSD; // NOI18N @@ -65,6 +67,7 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa private static final String JSF_2_3=NEW_JAVAEE_NS+"/"+JSF_2_3_XSD; // NOI18N private static final String JSF_3_0=JAKARTAEE_NS+"/"+JSF_3_0_XSD; // NOI18N private static final String JSF_4_0=JAKARTAEE_NS+"/"+JSF_4_0_XSD; // NOI18N + private static final String JSF_4_1=JAKARTAEE_NS+"/"+JSF_4_1_XSD; // NOI18N public static final String JSF_ID_1_2="SCHEMA:"+JSF_1_2; // NOI18N public static final String JSF_ID_2_0="SCHEMA:"+JSF_2_0; // NOI18N public static final String JSF_ID_2_1="SCHEMA:"+JSF_2_1; // NOI18N @@ -72,6 +75,7 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa public static final String JSF_ID_2_3="SCHEMA:"+JSF_2_3; // NOI18N public static final String JSF_ID_3_0="SCHEMA:"+JSF_3_0; // NOI18N public static final String JSF_ID_4_0="SCHEMA:"+JSF_4_0; // NOI18N + public static final String JSF_ID_4_1="SCHEMA:"+JSF_4_1; // NOI18N // faces-config resources @@ -83,8 +87,10 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa public static final String RES_FACES_CONFIG_2_3 = "faces-config_2_3.xml"; public static final String RES_FACES_CONFIG_3_0 = "faces-config_3_0.xml"; public static final String RES_FACES_CONFIG_4_0 = "faces-config_4_0.xml"; + public static final String RES_FACES_CONFIG_4_1 = "faces-config_4_1.xml"; //facelets + private static final String FILE_FACELETS_TAGLIB_SCHEMA_41="web-facelettaglibrary_4_1.xsd"; //NOI18N private static final String FILE_FACELETS_TAGLIB_SCHEMA_40="web-facelettaglibrary_4_0.xsd"; //NOI18N private static final String FILE_FACELETS_TAGLIB_SCHEMA_30="web-facelettaglibrary_3_0.xsd"; //NOI18N private static final String FILE_FACELETS_TAGLIB_SCHEMA_23="web-facelettaglibrary_2_3.xsd"; //NOI18N @@ -92,6 +98,8 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa private static final String FILE_FACELETS_TAGLIB_SCHEMA_20="web-facelettaglibrary_2_0.xsd"; //NOI18N private static final String FILE_FACELETS_TAGLIB_DTD_10="facelet-taglib_1_0.dtd"; //NOI18N + private static final String URL_FACELETS_TAGLIB_SCHEMA_41 = JAKARTAEE_NS + "/" + FILE_FACELETS_TAGLIB_SCHEMA_41; // NOI18N + private static final String ID_FACELETS_TAGLIB_SCHEMA_41 ="SCHEMA:" + URL_FACELETS_TAGLIB_SCHEMA_41; private static final String URL_FACELETS_TAGLIB_SCHEMA_40 = JAKARTAEE_NS + "/" + FILE_FACELETS_TAGLIB_SCHEMA_40; // NOI18N private static final String ID_FACELETS_TAGLIB_SCHEMA_40 ="SCHEMA:" + URL_FACELETS_TAGLIB_SCHEMA_40; private static final String URL_FACELETS_TAGLIB_SCHEMA_30 = JAKARTAEE_NS + "/" + FILE_FACELETS_TAGLIB_SCHEMA_30; // NOI18N @@ -104,6 +112,7 @@ public class JSFCatalog implements CatalogReader, CatalogDescriptor2, org.xml.sa private static final String ID_FACELETS_TAGLIB_SCHEMA_20 ="SCHEMA:" + URL_FACELETS_TAGLIB_SCHEMA_20; private static final String ID_FACELETS_TAGLIB_DTD_10 = "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"; //NOI18N + private static final String RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_41 ="nbres:/org/netbeans/modules/web/jsf/resources/" + FILE_FACELETS_TAGLIB_SCHEMA_41; // NOI18N private static final String RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_40 ="nbres:/org/netbeans/modules/web/jsf/resources/" + FILE_FACELETS_TAGLIB_SCHEMA_40; // NOI18N private static final String RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_30 ="nbres:/org/netbeans/modules/web/jsf/resources/" + FILE_FACELETS_TAGLIB_SCHEMA_30; // NOI18N private static final String RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_23 ="nbres:/org/netbeans/modules/web/jsf/resources/" + FILE_FACELETS_TAGLIB_SCHEMA_23; // NOI18N @@ -130,12 +139,14 @@ public java.util.Iterator getPublicIDs() { list.add(JSF_ID_2_3); list.add(JSF_ID_3_0); list.add(JSF_ID_4_0); + list.add(JSF_ID_4_1); list.add(ID_FACELETS_TAGLIB_DTD_10); list.add(ID_FACELETS_TAGLIB_SCHEMA_20); list.add(ID_FACELETS_TAGLIB_SCHEMA_22); list.add(ID_FACELETS_TAGLIB_SCHEMA_23); list.add(ID_FACELETS_TAGLIB_SCHEMA_30); list.add(ID_FACELETS_TAGLIB_SCHEMA_40); + list.add(ID_FACELETS_TAGLIB_SCHEMA_41); return list.listIterator(); } @@ -144,37 +155,47 @@ public java.util.Iterator getPublicIDs() { * @return null if not registered */ public String getSystemID(String publicId) { - if (JSF_ID_1_0.equals(publicId)) - return URL_JSF_1_0; - else if (JSF_ID_1_1.equals(publicId)) - return URL_JSF_1_1; - else if (JSF_ID_1_2.equals(publicId)) - return URL_JSF_1_2; - else if (JSF_ID_2_0.equals(publicId)) - return URL_JSF_2_0; - else if (JSF_ID_2_1.equals(publicId)) - return URL_JSF_2_1; - else if (JSF_ID_2_2.equals(publicId)) - return URL_JSF_2_2; - else if (JSF_ID_2_3.equals(publicId)) - return URL_JSF_2_3; - else if (JSF_ID_3_0.equals(publicId)) - return URL_JSF_3_0; - else if (JSF_ID_4_0.equals(publicId)) - return URL_JSF_4_0; - else if (ID_FACELETS_TAGLIB_DTD_10.equals(publicId)) - return RESOURCE_URL_FACELETS_TAGLIB_DTD_10; - else if(ID_FACELETS_TAGLIB_SCHEMA_20.equals(publicId)) - return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_20; - else if(ID_FACELETS_TAGLIB_SCHEMA_22.equals(publicId)) - return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_22; - else if(ID_FACELETS_TAGLIB_SCHEMA_23.equals(publicId)) - return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_23; - else if(ID_FACELETS_TAGLIB_SCHEMA_30.equals(publicId)) - return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_30; - else if(ID_FACELETS_TAGLIB_SCHEMA_40.equals(publicId)) - return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_40; - else return null; + if (null == publicId) { + return null; + } + switch (publicId) { + case JSF_ID_1_0: + return URL_JSF_1_0; + case JSF_ID_1_1: + return URL_JSF_1_1; + case JSF_ID_1_2: + return URL_JSF_1_2; + case JSF_ID_2_0: + return URL_JSF_2_0; + case JSF_ID_2_1: + return URL_JSF_2_1; + case JSF_ID_2_2: + return URL_JSF_2_2; + case JSF_ID_2_3: + return URL_JSF_2_3; + case JSF_ID_3_0: + return URL_JSF_3_0; + case JSF_ID_4_0: + return URL_JSF_4_0; + case JSF_ID_4_1: + return URL_JSF_4_1; + case ID_FACELETS_TAGLIB_DTD_10: + return RESOURCE_URL_FACELETS_TAGLIB_DTD_10; + case ID_FACELETS_TAGLIB_SCHEMA_20: + return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_20; + case ID_FACELETS_TAGLIB_SCHEMA_22: + return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_22; + case ID_FACELETS_TAGLIB_SCHEMA_23: + return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_23; + case ID_FACELETS_TAGLIB_SCHEMA_30: + return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_30; + case ID_FACELETS_TAGLIB_SCHEMA_40: + return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_40; + case ID_FACELETS_TAGLIB_SCHEMA_41: + return RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_41; + default: + return null; + } } /** @@ -229,7 +250,7 @@ public String getShortDescription() { } /** - * Resolves schema definition file for taglib descriptor (spec.1_1, 1_2, 2_0, 2_1, 2_2, 2_3, 3_0, 4_0) + * Resolves schema definition file for taglib descriptor (spec.1_1, 1_2, 2_0, 2_1, 2_2, 2_3, 3_0, 4_0, 4_1) * @param publicId publicId for resolved entity (null in our case) * @param systemId systemId for resolved entity * @return InputSource for publisId, @@ -255,6 +276,8 @@ public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) t return new org.xml.sax.InputSource(URL_JSF_3_0); } else if (JSF_4_0.equals(systemId)) { return new org.xml.sax.InputSource(URL_JSF_4_0); + } else if (JSF_4_1.equals(systemId)) { + return new org.xml.sax.InputSource(URL_JSF_4_1); } else if (URL_FACELETS_TAGLIB_SCHEMA_20.equals(systemId)) { return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_20); } else if (URL_FACELETS_TAGLIB_SCHEMA_22.equals(systemId)) { @@ -265,6 +288,8 @@ public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) t return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_30); } else if (URL_FACELETS_TAGLIB_SCHEMA_40.equals(systemId)) { return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_40); + } else if (URL_FACELETS_TAGLIB_SCHEMA_41.equals(systemId)) { + return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_41); } else if (systemId!=null && systemId.endsWith(JSF_1_2_XSD)) { return new org.xml.sax.InputSource(URL_JSF_1_2); } else if (systemId!=null && systemId.endsWith(JSF_2_0_XSD)) { @@ -279,6 +304,8 @@ public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) t return new org.xml.sax.InputSource(URL_JSF_3_0); } else if (systemId!=null && systemId.endsWith(JSF_4_0_XSD)) { return new org.xml.sax.InputSource(URL_JSF_4_0); + } else if (systemId!=null && systemId.endsWith(JSF_4_1_XSD)) { + return new org.xml.sax.InputSource(URL_JSF_4_1); } else if (systemId!=null && systemId.endsWith(FILE_FACELETS_TAGLIB_SCHEMA_20)) { return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_20); } else if (systemId!=null && systemId.endsWith(FILE_FACELETS_TAGLIB_SCHEMA_22)) { @@ -289,6 +316,8 @@ public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) t return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_30); } else if (systemId!=null && systemId.endsWith(FILE_FACELETS_TAGLIB_SCHEMA_40)) { return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_40); + } else if (systemId!=null && systemId.endsWith(FILE_FACELETS_TAGLIB_SCHEMA_41)) { + return new org.xml.sax.InputSource(RESOURCE_URL_FACELETS_TAGLIB_SCHEMA_41); } else { return null; } @@ -315,28 +344,43 @@ public static JsfVersion extractVersion(Document document) { JsfVersion value = JsfVersion.JSF_1_0; // This is the default version if (dt != null) { - if (JSF_ID_1_0.equals(dt.getPublicId())) { - value = JsfVersion.JSF_1_0; - } else if (JSF_ID_1_1.equals(dt.getPublicId())) { - value = JsfVersion.JSF_1_1; - } else if (JSF_ID_1_2.equals(dt.getPublicId())) { - value = JsfVersion.JSF_1_2; - } else if (JSF_ID_2_0.equals(dt.getPublicId())) { - value = JsfVersion.JSF_2_0; - } else if (JSF_ID_2_1.equals(dt.getPublicId())) { - value = JsfVersion.JSF_2_1; - } else if (JSF_ID_2_2.equals(dt.getPublicId())) { - value = JsfVersion.JSF_2_2; - } else if (JSF_ID_2_3.equals(dt.getPublicId())) { - value = JsfVersion.JSF_2_3; - } else if (JSF_ID_3_0.equals(dt.getPublicId())) { - value = JsfVersion.JSF_3_0; - }else if (JSF_ID_4_0.equals(dt.getPublicId())) { - value = JsfVersion.JSF_4_0; + switch (dt.getPublicId()) { + case JSF_ID_1_0: + value = JsfVersion.JSF_1_0; + break; + case JSF_ID_1_1: + value = JsfVersion.JSF_1_1; + break; + case JSF_ID_1_2: + value = JsfVersion.JSF_1_2; + break; + case JSF_ID_2_0: + value = JsfVersion.JSF_2_0; + break; + case JSF_ID_2_1: + value = JsfVersion.JSF_2_1; + break; + case JSF_ID_2_2: + value = JsfVersion.JSF_2_2; + break; + case JSF_ID_2_3: + value = JsfVersion.JSF_2_3; + break; + case JSF_ID_3_0: + value = JsfVersion.JSF_3_0; + break; + case JSF_ID_4_0: + value = JsfVersion.JSF_4_0; + break; + case JSF_ID_4_1: + value = JsfVersion.JSF_4_1; + break; + default: + break; } } return value; } -} +} \ No newline at end of file diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java index 3f90ced55d10..79e56e14b95e 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java @@ -577,7 +577,9 @@ public void run() { if (ddRoot != null) { Profile profile = webModule.getJ2eeProfile(); if (profile != null && profile.isAtLeast(Profile.JAVA_EE_5) && jsfVersion != null) { - if (jsfVersion.isAtLeast(JsfVersion.JSF_4_0)) { + if (jsfVersion.isAtLeast(JsfVersion.JSF_4_1)) { + facesConfigTemplate = JSFCatalog.RES_FACES_CONFIG_4_1; + } else if (jsfVersion.isAtLeast(JsfVersion.JSF_4_0)) { facesConfigTemplate = JSFCatalog.RES_FACES_CONFIG_4_0; } else if (jsfVersion.isAtLeast(JsfVersion.JSF_3_0)) { facesConfigTemplate = JSFCatalog.RES_FACES_CONFIG_3_0; @@ -698,7 +700,11 @@ public void run() { FileObject template = FileUtil.getConfigRoot().getFileObject(WELCOME_XHTML_TEMPLATE); HashMap params = new HashMap<>(); if (jsfVersion != null) { - if (jsfVersion.isAtLeast(JsfVersion.JSF_3_0)) { + if (jsfVersion.isAtLeast(JsfVersion.JSF_4_1)) { + params.put("isJSF41", Boolean.TRUE); //NOI18N + } if (jsfVersion.isAtLeast(JsfVersion.JSF_4_0)) { + params.put("isJSF40", Boolean.TRUE); //NOI18N + } else if (jsfVersion.isAtLeast(JsfVersion.JSF_3_0)) { params.put("isJSF30", Boolean.TRUE); //NOI18N } else if (jsfVersion.isAtLeast(JsfVersion.JSF_2_2)) { params.put("isJSF22", Boolean.TRUE); //NOI18N @@ -749,7 +755,8 @@ private boolean isGlassFishv3(String serverInstanceID) { String shortName; try { shortName = Deployment.getDefault().getServerInstance(serverInstanceID).getServerID(); - if ("gfv700ee10".equals(shortName) || "gfv610ee9".equals(shortName) || "gfv6ee9".equals(shortName) + if ("gfv800ee11".equals(shortName) || "gfv700ee10".equals(shortName) + || "gfv610ee9".equals(shortName) || "gfv6ee9".equals(shortName) || "gfv510ee8".equals(shortName) || "gfv5ee8".equals(shortName) || "gfv5".equals(shortName) || "gfv4ee7".equals(shortName) || "gfv4".equals(shortName) || "gfv3ee6".equals(shortName) diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFUtils.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFUtils.java index 0f5ccd5bb61e..e137a0b891cc 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFUtils.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/JSFUtils.java @@ -70,6 +70,7 @@ public class JSFUtils { public static final String DEFAULT_JSF_2_0_NAME = "jsf20"; //NOI18N public static final String DEFAULT_JSF_3_0_NAME = "jsf30"; //NOI18N public static final String DEFAULT_JSF_4_0_NAME = "jsf40"; //NOI18N + public static final String DEFAULT_JSF_4_1_NAME = "jsf41"; //NOI18N // the name of jstl library public static final String DEFAULT_JSTL_1_1_NAME = "jstl11"; //NOI18N @@ -86,6 +87,7 @@ public class JSFUtils { public static final String JSF_2_3__API_SPECIFIC_CLASS = "javax.faces.push.PushContext"; //NOI18N public static final String JSF_3_0__API_SPECIFIC_CLASS = "jakarta.faces.push.PushContext"; //NOI18N public static final String JSF_4_0__API_SPECIFIC_CLASS = "jakarta.faces.lifecycle.ClientWindowScoped"; //NOI18N + public static final String JSF_4_1__API_SPECIFIC_CLASS = "jakarta.faces.convert.UUIDConverter"; //NOI18N public static final String MYFACES_SPECIFIC_CLASS = "org.apache.myfaces.webapp.StartupServletContextListener"; //NOI18N //constants for web.xml (Java EE) @@ -432,7 +434,9 @@ public static MetadataModel getModel(Project project) { public static String getNamespaceDomain(WebModule webModule) { JsfVersion version = webModule != null ? JsfVersionUtils.forWebModule(webModule) : null; String nsLocation = NamespaceUtils.SUN_COM_LOCATION; - if (version != null && version.isAtLeast(JsfVersion.JSF_2_2)) { + if (version != null && version.isAtLeast(JsfVersion.JSF_4_0)) { + nsLocation = NamespaceUtils.JAKARTA_ORG_LOCATION; + } else if (version != null && version.isAtLeast(JsfVersion.JSF_2_2)) { nsLocation = NamespaceUtils.JCP_ORG_LOCATION; } return nsLocation; diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/ConfigurationUtils.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/ConfigurationUtils.java index 955aa0eeacd9..2fc70b674022 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/ConfigurationUtils.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/ConfigurationUtils.java @@ -103,7 +103,8 @@ public static Servlet getFacesServlet(WebModule webModule) { WebApp webApp = DDProvider.getDefault().getDDRoot(deploymentDescriptor); // Try to find according the servlet class name. The javax.faces.webapp.FacesServlet is final, so // it can not be extended. - if (WebApp.VERSION_6_0.equals(webApp.getVersion()) || WebApp.VERSION_5_0.equals(webApp.getVersion())) { + if (WebApp.VERSION_6_1.equals(webApp.getVersion()) || WebApp.VERSION_6_0.equals(webApp.getVersion()) || + WebApp.VERSION_5_0.equals(webApp.getVersion())) { return (Servlet) webApp .findBeanByName("Servlet", "ServletClass", "jakarta.faces.webapp.FacesServlet"); //NOI18N; } else { diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/JsfVersionUtils.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/JsfVersionUtils.java index 05ce5c463d74..45b6fb5abfd5 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/JsfVersionUtils.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/api/facesmodel/JsfVersionUtils.java @@ -64,6 +64,7 @@ public final class JsfVersionUtils { private static final LinkedHashMap SPECIFIC_CLASS_NAMES = new LinkedHashMap<>(); static { + SPECIFIC_CLASS_NAMES.put(JsfVersion.JSF_4_1, JSFUtils.JSF_4_1__API_SPECIFIC_CLASS); SPECIFIC_CLASS_NAMES.put(JsfVersion.JSF_4_0, JSFUtils.JSF_4_0__API_SPECIFIC_CLASS); SPECIFIC_CLASS_NAMES.put(JsfVersion.JSF_3_0, JSFUtils.JSF_3_0__API_SPECIFIC_CLASS); SPECIFIC_CLASS_NAMES.put(JsfVersion.JSF_2_3, JSFUtils.JSF_2_3__API_SPECIFIC_CLASS); @@ -197,7 +198,9 @@ public static JsfVersion forClasspath(@NonNull List classpath) { public static JsfVersion forServerLibrary(@NonNull ServerLibrary lib) { Parameters.notNull("serverLibrary", lib); //NOI18N if ("JavaServer Faces".equals(lib.getSpecificationTitle())) { // NOI18N - if (Version.fromJsr277NotationWithFallback("4.0").equals(lib.getSpecificationVersion())) { //NOI18N + if (Version.fromJsr277NotationWithFallback("4.1").equals(lib.getSpecificationVersion())) { //NOI18N + return JsfVersion.JSF_4_1; + } else if (Version.fromJsr277NotationWithFallback("4.0").equals(lib.getSpecificationVersion())) { //NOI18N return JsfVersion.JSF_4_0; } else if (Version.fromJsr277NotationWithFallback("3.0").equals(lib.getSpecificationVersion())) { //NOI18N return JsfVersion.JSF_3_0; diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/facelets/resources/templates/simpleFacelets.template b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/facelets/resources/templates/simpleFacelets.template index 756b9bbfd8e9..6c7ded997d50 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/facelets/resources/templates/simpleFacelets.template +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/facelets/resources/templates/simpleFacelets.template @@ -1,6 +1,6 @@ -<#if isJSF40??> +<#if isJSF40?? || isJSF41??> <#elseif isJSF22?? || isJSF30??> @@ -12,7 +12,7 @@ <#else> -<#if isJSF20?? || isJSF22?? || isJSF30?? || isJSF40??> +<#if isJSF20?? || isJSF22?? || isJSF30?? || isJSF40?? || isJSF41??> Facelet Title diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java index 9a188ef394e7..9c017f5e1a5d 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java @@ -91,7 +91,13 @@ public JSFConfigComponentFactory getFactory() { public JsfVersion getVersion() { String namespaceURI = getRootComponent().getPeer().getNamespaceURI(); JsfVersion version = JsfVersion.JSF_1_1; - if (JSFConfigQNames.JSF_4_0_NS.equals(namespaceURI) + if (JSFConfigQNames.JSF_4_1_NS.equals(namespaceURI) + && (getRootComponent().getVersion().equals("4.1") //NOI18N + || checkSchemaLocation( + getRootComponent().getPeer(), + "https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_1.xsd"))) { //NOI18N + version = JsfVersion.JSF_4_1; + } else if (JSFConfigQNames.JSF_4_0_NS.equals(namespaceURI) && (getRootComponent().getVersion().equals("4.0") //NOI18N || checkSchemaLocation( getRootComponent().getPeer(), diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigQNames.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigQNames.java index 0bdd41978a3d..42319595ef2f 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigQNames.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigQNames.java @@ -206,6 +206,7 @@ public enum JSFConfigQNames { private QName qname_2_3; private QName qname_3_0; private QName qname_4_0; + private QName qname_4_1; public static final String JSF_1_2_NS = "http://java.sun.com/xml/ns/javaee"; //NOI18N @@ -215,6 +216,7 @@ public enum JSFConfigQNames { public static final String JSF_2_3_NS = "http://xmlns.jcp.org/xml/ns/javaee"; //NOI18N public static final String JSF_3_0_NS = "https://jakarta.ee/xml/ns/jakartaee"; //NOI18N public static final String JSF_4_0_NS = "https://jakarta.ee/xml/ns/jakartaee"; //NOI18N + public static final String JSF_4_1_NS = "https://jakarta.ee/xml/ns/jakartaee"; //NOI18N public static final String JSF_1_1_NS = javax.xml.XMLConstants.NULL_NS_URI; public static final String JSFCONFIG_PREFIX = javax.xml.XMLConstants.DEFAULT_NS_PREFIX; @@ -228,6 +230,7 @@ public enum JSFConfigQNames { qname_2_3 = new QName(JSF_2_3_NS, localName, JSFCONFIG_PREFIX); qname_3_0 = new QName(JSF_3_0_NS, localName, JSFCONFIG_PREFIX); qname_4_0 = new QName(JSF_4_0_NS, localName, JSFCONFIG_PREFIX); + qname_4_1 = new QName(JSF_4_1_NS, localName, JSFCONFIG_PREFIX); } public QName getQName(JsfVersion version) { @@ -246,6 +249,8 @@ public QName getQName(JsfVersion version) { value = qname_3_0; } else if (version.equals(JsfVersion.JSF_4_0)) { value = qname_4_0; + } else if (version.equals(JsfVersion.JSF_4_1)) { + value = qname_4_1; } return value; } @@ -280,6 +285,10 @@ public static boolean areSameQName(JSFConfigQNames jsfqname, Element element) { return jsfqname.getQName(JsfVersion.JSF_2_3).equals(qname); } else if (JSFConfigQNames.JSF_3_0_NS.equals(element.getNamespaceURI())) { return jsfqname.getQName(JsfVersion.JSF_3_0).equals(qname); + } else if (JSFConfigQNames.JSF_4_0_NS.equals(element.getNamespaceURI())) { + return jsfqname.getQName(JsfVersion.JSF_4_0).equals(qname); + } else if (JSFConfigQNames.JSF_4_1_NS.equals(element.getNamespaceURI())) { + return jsfqname.getQName(JsfVersion.JSF_4_1).equals(qname); } return jsfqname.getLocalName().equals(qname.getLocalPart()); } @@ -292,6 +301,7 @@ public static boolean areSameQName(JSFConfigQNames jsfqname, Element element) { private static final Set mappedQNames_2_3 = new HashSet(); private static final Set mappedQNames_3_0 = new HashSet(); private static final Set mappedQNames_4_0 = new HashSet(); + private static final Set mappedQNames_4_1 = new HashSet(); static { mappedQNames_1_1.add(FACES_CONFIG.getQName(JsfVersion.JSF_1_1)); @@ -900,6 +910,105 @@ public static boolean areSameQName(JSFConfigQNames jsfqname, Element element) { mappedQNames_4_0.add(FLOW_DEFINITION.getQName(JsfVersion.JSF_4_0)); mappedQNames_4_0.add(PROTECTED_VIEWS.getQName(JsfVersion.JSF_4_0)); + mappedQNames_4_1.add(FACES_CONFIG.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(MANAGED_BEAN.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(CONVERTER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(NAVIGATION_RULE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(NAVIGATION_CASE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(DESCRIPTION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(DISPLAY_NAME.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(ICON.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(APPLICATION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VIEW_HANDLER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RESOURCE_BUNDLE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(COMPONENT.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(REFERENCED_BEAN.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RENDER_KIT.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(LIFECYCLE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VALIDATOR.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACES_CONFIG_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RESOURCE_BUNDLE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(ACTION_LISTENER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(DEFAULT_RENDER_KIT_ID.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(MESSAGE_BUNDLE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(NAVIGATION_HANDLER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(STATE_MANAGER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(EL_RESOLVER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(PROPERTY_RESOLVER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VARIABLE_RESOLVER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(LOCALE_CONFIG.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(APPLICATION_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(DEFAULT_LOCALE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(SUPPORTED_LOCALE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(APPLICATION_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACES_CONTEXT_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACELET_CACHE_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(LIFECYCLE_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RENDER_KIT_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACTORY_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACET.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(ATTRIBUTE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(PROPERTY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(COMPONENT_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(CONVERTER_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(MANAGED_PROPERTY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(MAP_ENTRIES.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(LIST_ENTRIES.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(MANAGED_BEAN_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(NAVIGATION_RULE_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RENDER_KIT_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(PHASE_LISTENER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(LIFECYCLE_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VALIDATOR_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FACES_CONFIG_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(IF.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(REDIRECT.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VIEW_PARAM.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(PARTIAL_TRAVERSAL.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(SYSTEM_EVENT_LISTENER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RESOURCE_HANDLER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(DEFAULT_VALIDATORS.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(ORDERING.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(AFTER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(BEFORE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(ABSOLUTE_ORDERING.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(OTHERS.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(EXCEPTION_HANDLER_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(EXTERNAL_CONTEXT_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(PARTIAL_VIEW_CONTEXT_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VIEW_DECLARATION_LANGUAGE_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(TAG_HANDLER_DELEGATE_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VISIT_CONTEXT_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(NAME.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RENDERER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(CLIENT_BEHAVIOR_RENDERER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(BEHAVIOR.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(BEHAVIOR_EXTENSION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RESOURCE_LIBRARY_CONTRACTS.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RESOURCE_BUNDLE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(RESOURCE_HANDLER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(URL_PATTERN.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLOW_HANDLER_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLASH_FACTORY.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(START_NODE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VIEW.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(VDL_DOCUMENT.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(DEFAULT_OUTCOME.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(SWITCH.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(METHOD_CALL.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLOW_RETURN.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(INITIALIZER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FINALIZER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLOW_CALL.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(INBOUND_PARAMETER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(OUTBOUND_PARAMETER.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLOW_REFERENCE.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLOW_ID.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(METHOD.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(FLOW_DEFINITION.getQName(JsfVersion.JSF_4_1)); + mappedQNames_4_1.add(PROTECTED_VIEWS.getQName(JsfVersion.JSF_4_1)); + } public static Set getMappedQNames(JsfVersion version) { @@ -918,6 +1027,8 @@ public static Set getMappedQNames(JsfVersion version) { mappedQNames = mappedQNames_3_0; } else if (version.equals(JsfVersion.JSF_4_0)) { mappedQNames = mappedQNames_4_0; + } else if (version.equals(JsfVersion.JSF_4_1)) { + mappedQNames = mappedQNames_4_1; } return Collections.unmodifiableSet(mappedQNames); } diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/faces-config_4_1.xml b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/faces-config_4_1.xml new file mode 100644 index 000000000000..adae74a7b75b --- /dev/null +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/faces-config_4_1.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/templates/compositeComponent.template b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/templates/compositeComponent.template index 0a3726c9ce6a..c8caca011ac8 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/templates/compositeComponent.template +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/templates/compositeComponent.template @@ -1,7 +1,9 @@ +<#if isJSF40?? || isJSF41??> + xmlns:cc="jakarta.faces.composite"> +<#else if isJSF22?? || isJSF30??> xmlns:cc="http://xmlns.jcp.org/jsf/composite"> <#else> xmlns:cc="http://java.sun.com/jsf/composite"> diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-facelettaglibrary_4_1.xsd b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-facelettaglibrary_4_1.xsd new file mode 100644 index 000000000000..64b9fc5f5a3c --- /dev/null +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-facelettaglibrary_4_1.xsd @@ -0,0 +1,751 @@ + + + + + + + + Copyright (c) 2009, 2023 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + The XML Schema for the Tag Libraries in the Jakarta Faces + Standard Facelets View Declaration Language (Facelets VDL) + (Version 4.1).

+ +

Jakarta Faces 4.1 Facelet Tag Libraries that wish to conform to + this schema must declare it in the following manner.

+ + <facelet-taglib xmlns="https://jakarta.ee/xml/ns/jakartaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facelettaglibrary_4_1.xsd" + version="4.1"> + + ... + + </facelet-taglib> + +

The instance documents may indicate the published + version of the schema using xsi:schemaLocation attribute + for jakartaee namespace with the following location:

+ +

https://jakarta.ee/xml/ns/jakartaee/web-facelettaglibrary_4_1.xsd

+ + ]]> +
+
+ + + + + + + + + + + tag-names must be unique within a document. + +

+ ]]> +
+
+ + +
+ + + + + + Behavior IDs must be unique within a document. + +

+ ]]> +
+
+ + +
+ + + + + + Converter IDs must be unique within a document. + +

+ ]]> +
+
+ + +
+ + + + + + Validator IDs must be unique within a document. + +

+ ]]> +
+
+ + +
+
+ + + + + + + + + + The top level XML element in a facelet tag library XML file. + +

+ ]]> +
+
+ + + + + + + + + + + + An advisory short name for usages of tags from this tag library. + +

+ ]]> +
+
+
+ + + + + +
+
+ +
+ + +
+ + + + + + + + + + Extension element for facelet-taglib. It may contain + implementation specific content. + +

+ ]]> +
+
+ + + + +
+ + + + + + + + If the tag library XML + file contains individual tag declarations rather than pointing + to a library-class or a declaring a composite-library name, the + individual tags are enclosed in tag elements.

+ + ]]> +
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + +

The attribute element defines an attribute for the nesting + tag. The attribute element may have several subelements + defining:

+ +
+ +
description

a description of the attribute +

+ +
name

the name of the attribute +

+ +
required

whether the attribute is required or + optional +

+ +
type

the type of the attribute +

+ +
+ +

+ ]]> +
+
+ + + + + + + Defines if the nesting attribute is required or + optional.

+ +

If not present then the default is "false", i.e + the attribute is optional.

+ + ]]> +
+
+
+ + + + + + + Defines the Java type of the attributes + value. If this element is omitted, the + expected type is assumed to be + "java.lang.Object".

+ + ]]> +
+
+
+ + + + + + Defines the method signature for a MethodExpression- + enabled attribute. The syntax of the method-signature + element is as follows (taken from the function-signature + EBNF in web-jsptaglibrary_2_1.xsd):

+ + + +

MethodSignature ::= ReturnType S MethodName S? '(' S? Parameters? S? ')'

+ +

ReturnType ::= Type

+ +

MethodName ::= Identifier

+ +

Parameters ::= Parameter | ( Parameter S? ',' S? Parameters )

+ +

Parameter ::= Type

+ +
+ +

Where:

+ +
    + +
  • Type is a basic type or a fully qualified + Java class name (including package name), as per the 'Type' + production in the Java Language Specification, Second Edition, + Chapter 18.

  • + +
  • Identifier is a Java identifier, as per the + 'Identifier' production in the Java Language Specification, + Second Edition, Chapter 18.

  • + +
+ +

Example:

+ +

java.lang.String nickName( java.lang.String, int )

+ + ]]> +
+
+
+
+
+ +
+ + + + + + + + + + Extension element for tag It may contain + implementation specific content. + +

+ ]]> +
+
+ + + + +
+ + + + + + + + + + If the tag library XML file contains individual function + declarations rather than pointing to a library-class or a + declaring a composite-library name, the individual functions are + enclosed in function elements. + +

+ ]]> +
+
+ + + + + + +
+ + + + + + + + + + Within a tag element, the behavior element encapsulates + information specific to a Faces Behavior. + +

+ ]]> +
+
+ + + + + + +
+ + + + + + + + + + Extension element for behavior. It may contain + implementation specific content. + +

+ ]]> +
+
+ + + + +
+ + + + + + + + Within a tag element, the component + element encapsulates information specific to a Faces UIComponent.

+ +
+ +

As of 3.0 of the specification, this requirement is no longer + present: This element must have exactly one of + <component-type>, <resource-id>, + or <handler-class> among its child elements.

+ +
+ + ]]> +
+
+ + + + + + + + + A valid resource identifier + as specified in the Jakarta Faces Specification Document section 2.6.1.3 "Resource Identifiers". + For example:

+ +

<resource-id>myCC/ccName.xhtml</resource-id>

+ + ]]> +
+
+
+ +
+
+ + + + + + + + + + Extension element for component It may contain + implementation specific content. + +

+ ]]> +
+
+ + + + +
+ + + + + + + + + + Within a tag element, the converter element encapsulates + information specific to a Faces Converter. + +

+ ]]> +
+
+ + + + + + +
+ + + + + + + + + + Extension element for converter It may contain + implementation specific content. + +

+ ]]> +
+
+ + + + +
+ + + + + + + + + + Within a tag element, the validator element encapsulates + information specific to a Faces Validator. + +

+ ]]> +
+
+ + + + + + +
+ + + + + + + + + + Extension element for validator It may contain + implementation specific content. + +

+ ]]> +
+
+ + + + +
+ + + + + + + This type contains the recognized versions of + facelet-taglib supported. + +

+ ]]> +
+
+ + + +
+ + + + + + + + + +

Defines the canonical name of a tag or attribute being + defined.

+ +

The name must conform to the lexical rules for an NCName

+ +

+ ]]> +
+
+ + + + + +
+ +
diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-faces-mime-resolver.xml b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-faces-mime-resolver.xml index b7750c68cdde..3d712f867e04 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-faces-mime-resolver.xml +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-faces-mime-resolver.xml @@ -112,4 +112,14 @@ + + + + + + + + + + diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_1.xsd b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_1.xsd new file mode 100644 index 000000000000..846951831dae --- /dev/null +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/resources/web-facesconfig_4_1.xsd @@ -0,0 +1,3447 @@ + + + + + + + + Copyright (c) 2009, 2021 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + + + + + + + The XML Schema for the Jakarta Faces Application + Configuration File (Version 4.1).

+ +

All Jakarta Faces configuration files must indicate + the Jakarta Faces schema by indicating the + Jakarta Faces namespace:

+ +

https://jakarta.ee/xml/ns/jakartaee

+ +

and by indicating the version of the schema by + using the version element as shown below:

+ +
<faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="..."
+      version="4.1">
+      ...
+      </faces-config>
+ +

The instance documents may indicate the published + version of the schema using xsi:schemaLocation attribute + for jakartaee namespace with the following location:

+ +

https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_1.xsd

+ + ]]> +
+
+ + + + + + + + The "faces-config" element is the root of the configuration + information hierarchy, and contains nested elements for all + of the other configuration settings.

+ + ]]> +
+
+ + + + Behavior IDs must be unique within a document.

+ + ]]> +
+
+ + +
+ + + + Converter IDs must be unique within a document.

+ + ]]> +
+
+ + +
+ + + + 'converter-for-class' element values must be unique + within a document.

+ + ]]> +
+
+ + +
+ + + + Validator IDs must be unique within a document.

+ + ]]> +
+
+ + +
+
+ + + + + + + + The "faces-config" element is the root of the configuration + information hierarchy, and contains nested elements for all + of the other configuration settings.

+ + ]]> +
+
+ + + + + + + + + + + + The "name" element + within the top level "faces-config" + element declares the name of this application + configuration resource. Such names are used + in the document ordering scheme specified in section + 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document.

+ +

This value is taken to be the + defining document id of any <flow-definition> elements + defined in this Application Configuration Resource file. If this + element is not specified, the runtime must take the empty string + as its value.

+ + ]]> +
+
+
+ + + + + + + + +
+ + + + + The metadata-complete attribute defines whether this + Faces application is complete, or whether + the class files available to this module and packaged with + this application should be examined for annotations + that specify configuration information. + + This attribute is only inspected on the application + configuration resource file located at "WEB-INF/faces-config.xml". + The presence of this attribute on any application configuration + resource other than the one located at "WEB-INF/faces-config.xml", + including any files named using the jakarta.faces.CONFIG_FILES + attribute, must be ignored. + + If metadata-complete is set to "true", the Faces + runtime must ignore any annotations that specify configuration + information, which might be present in the class files + of the application. + + If metadata-complete is not specified or is set to + "false", the Faces runtime must examine the class + files of the application for annotations, as specified by + the specification. + + If "WEB-INF/faces-config.xml" is not present, the + Faces runtime will assume metadata-complete to be "false". + + The value of this attribute will have no impact on + runtime annotations such as @ResourceDependency or + @ListenerFor. + + + + + + +
+ + + + + + + + Extension element for faces-config. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + Please see section + 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document + for the specification of this element.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + This element contains a sequence of "id" elements, each of which + refers to an application configuration resource by the "id" + declared on its faces-config element. This element can also contain + a single "others" element which specifies that this document comes + before or after other documents within the application.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + This element indicates that the ordering sub-element in which + it was placed should take special action regarding the ordering + of this application resource relative to other + application configuration resources. + See section 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document + for the complete specification.

+ + ]]> +
+
+ +
+ + + + + + + + Only relevant if this is placed within the /WEB-INF/faces-config.xml. + Please see + section 11.3.8 "Ordering of Artifacts" of the Jakarta Faces Specification Document + for the specification for details.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "application" element provides a mechanism to define the + various per-application-singleton implementation artifacts for + a particular web application that is utilizing + Jakarta Faces. For nested elements that are not specified, + the Jakarta Faces implementation must provide a suitable + default.

+ + ]]> +
+
+ + + + + The "action-listener" element contains the fully + qualified class name of the concrete + ActionListener implementation class that will be + called during the Invoke Application phase of the + request processing lifecycle.

+ + ]]> +
+
+
+ + + + The "default-render-kit-id" element allows the + application to define a renderkit to be used other + than the standard one.

+ + ]]> +
+
+
+ + + + The base name of a resource bundle representing + the message resources for this application. See + the JavaDocs for the "java.util.ResourceBundle" + class for more information on the syntax of + resource bundle names.

+ + ]]> +
+
+
+ + + + The "navigation-handler" element contains the + fully qualified class name of the concrete + NavigationHandler implementation class that will + be called during the Invoke Application phase + of the request processing lifecycle, if the + default ActionListener (provided by the Jakarta Faces + implementation) is used.

+ + ]]> +
+
+
+ + + + The "view-handler" element contains the fully + qualified class name of the concrete ViewHandler + implementation class that will be called during + the Restore View and Render Response phases of the + request processing lifecycle. The faces + implementation must provide a default + implementation of this class.

+ + ]]> +
+
+
+ + + + The "state-manager" element contains the fully + qualified class name of the concrete StateManager + implementation class that will be called during + the Restore View and Render Response phases of the + request processing lifecycle. The faces + implementation must provide a default + implementation of this class.

+ + ]]> +
+
+
+ + + + The "el-resolver" element contains the fully + qualified class name of the concrete + jakarta.el.ELResolver implementation class + that will be used during the processing of + EL expressions.

+ + ]]> +
+
+
+ + + + The "resource-handler" element contains the + fully qualified class name of the concrete + ResourceHandler implementation class that + will be used during rendering and decoding + of resource requests The standard + constructor based decorator pattern used for + other application singletons will be + honored.

+ + ]]> +
+
+
+ + + + The "resource-library-contracts" element + specifies the mappings between views in the application and resource + library contracts that, if present in the application, must be made + available for use as templates of the specified views. +

+ + ]]> +
+
+
+ + + + The "search-expression-handler" + element contains the fully qualified class name of the + concrete jakarta.faces.component.search.SearchExpressionHandler + implementation class that will be used for processing of a + search expression.

+ + ]]> +
+
+
+ + + + The "search-keyword-resolver" + element contains the fully qualified class name of the + concrete jakarta.faces.component.search.SearchKeywordResolver + implementation class that will be used during the processing + of a search expression keyword.

+ + ]]> +
+
+
+ + + + + +
+ +
+ + + + + + + + The resource-bundle element inside the application element + references a java.util.ResourceBundle instance by name + using the var element. ResourceBundles referenced in this + manner may be returned by a call to + Application.getResourceBundle() passing the current + FacesContext for this request and the value of the var + element below.

+ + ]]> +
+
+ + + + + + The fully qualified class name of the + java.util.ResourceBundle instance.

+ + ]]> +
+
+
+ + + + The name by which this ResourceBundle instance + is retrieved by a call to + Application.getResourceBundle().

+ + ]]> +
+
+
+
+ +
+ + + + + + + + The "resource-library-contracts" element + specifies the mappings between views in the application and resource + library contracts that, if present in the application, must be made + available for use as templates of the specified views. +

+ + ]]> +
+
+ + + + + + Declare a mapping between a collection + of views in the application and the list of contracts (if present in the application) + that may be used as a source for templates and resources for those views.

+ + ]]> +
+
+
+
+ +
+ + + + + + + + The "contract-mapping" element + specifies the mappings between a collection of views in the application and resource + library contracts that, if present in the application, must be made + available for use as templates of the specified views. +

+ + ]]> +
+
+ + + + + + The "url-pattern" element + specifies the collection of views in this application that + are allowed to use the corresponding contracts. +

+ + ]]> +
+
+
+ + + + The "contracts" element + is a comma separated list of resource library contracts that, + if available to the application, may be used by the views + matched by the corresponding "url-pattern" +

+ + ]]> +
+
+
+
+ +
+ + + + + + + + Extension element for application. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "factory" element provides a mechanism to define the + various Factories that comprise parts of the implementation + of Jakarta Faces. For nested elements that are not + specified, the Jakarta Faces implementation must provide a + suitable default.

+ + ]]> +
+
+ + + + + The "application-factory" element contains the + fully qualified class name of the concrete + ApplicationFactory implementation class that will + be called when + FactoryFinder.getFactory(APPLICATION_FACTORY) is + called.

+ + ]]> +
+
+
+ + + + The "exception-handler-factory" element contains the + fully qualified class name of the concrete + ExceptionHandlerFactory implementation class that will + be called when + FactoryFinder.getFactory(EXCEPTION_HANDLER_FACTORY) + is called.

+ + ]]> +
+
+
+ + + + The "external-context-factory" element contains the + fully qualified class name of the concrete + ExternalContextFactory implementation class that will + be called when + FactoryFinder.getFactory(EXTERNAL_CONTEXT_FACTORY) + is called.

+ + ]]> +
+
+
+ + + + The "faces-context-factory" element contains the + fully qualified class name of the concrete + FacesContextFactory implementation class that will + be called when + FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) + is called.

+ + ]]> +
+
+
+ + + + The "facelet-cache-factory" element contains the + fully qualified class name of the concrete + FaceletCacheFactory implementation class that will + be called when + FactoryFinder.getFactory(FACELET_CACHE_FACTORY) + is called.

+ + ]]> +
+
+
+ + + + The "partial-view-context-factory" element contains the + fully qualified class name of the concrete + PartialViewContextFactory implementation class that will + be called when FactoryFinder.getFactory + (FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY) is called.

+ + ]]> +
+
+
+ + + + The "lifecycle-factory" element contains the fully + qualified class name of the concrete LifecycleFactory + implementation class that will be called when + FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.

+ + ]]> +
+
+
+ + + + The "view-declaration-language-factory" element contains + the fully qualified class name of the concrete + ViewDeclarationLanguageFactory + implementation class that will be called when + FactoryFinder.getFactory(VIEW_DECLARATION_FACTORY) is called.

+ + ]]> +
+
+
+ + + + The "tag-handler-delegate-factory" element contains + the fully qualified class name of the concrete + ViewDeclarationLanguageFactory + implementation class that will be called when + FactoryFinder.getFactory(TAG_HANDLER_DELEGATE_FACTORY) is called.

+ + ]]> +
+
+
+ + + + The "render-kit-factory" element contains the fully + qualified class name of the concrete RenderKitFactory + implementation class that will be called when + FactoryFinder.getFactory(RENDER_KIT_FACTORY) is + called.

+ + ]]> +
+
+
+ + + + The "visit-context-factory" element contains the fully + qualified class name of the concrete VisitContextFactory + implementation class that will be called when + FactoryFinder.getFactory(VISIT_CONTEXT_FACTORY) is + called.

+ + ]]> +
+
+
+ + + + The "flash-factory" element contains the + fully qualified class name of the concrete + FaceletFactory implementation class that will + be called when + FactoryFinder.getFactory(FLASH_FACTORY) is + called.

+ + ]]> +
+
+
+ + + + The "flow-handler-factory" element contains the + fully qualified class name of the concrete + FlowHandlerFactory implementation class that will + be called when + FactoryFinder.getFactory(FLOW_HANDLER_FACTORY) is + called.

+ + ]]> +
+
+
+ + + + The "client-window-factory" element contains the fully + qualified class name of the concrete ClientWindowFactory implementation class that + will be called when FactoryFinder.getFactory(CLIENT_WINDOW_FACTORY) is called.

+ + ]]> +
+
+
+ + + + The + "search-expression-context-factory" element contains the + fully qualified class name of the concrete + SearchExpressionContextFactory implementation class that will + be called when + FactoryFinder.getFactory(SEARCH_EXPRESSION_CONTEXT_FACTORY) + is called.

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + Extension element for factory. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "attribute" element represents a named, typed, value + associated with the parent UIComponent via the generic + attributes mechanism.

+ +

Attribute names must be unique within the scope of the parent + (or related) component.

+ + ]]> +
+
+ + + + + + The "attribute-name" element represents the name under + which the corresponding value will be stored, in the + generic attributes of the UIComponent we are related + to.

+ + ]]> +
+
+
+ + + + The "attribute-class" element represents the Java type + of the value associated with this attribute name.

+ + ]]> +
+
+
+ + + +
+ +
+ + + + + + + + Extension element for attribute. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "component" element represents a concrete UIComponent + implementation class that should be registered under the + specified type identifier, along with its associated + properties and attributes. Component types must be unique + within the entire web application.

+ +

Nested "attribute" elements identify generic attributes that + are recognized by the implementation logic of this component. + Nested "property" elements identify JavaBeans properties of + the component class that may be exposed for manipulation + via tools.

+ + ]]> +
+
+ + + + + + The "component-type" element represents the name under + which the corresponding UIComponent class should be + registered.

+ + ]]> +
+
+
+ + + + The "component-class" element represents the fully + qualified class name of a concrete UIComponent + implementation class.

+ + ]]> +
+
+
+ + + + +
+ +
+ + + + + + + + Extension element for component. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "default-locale" element declares the default locale + for this application instance.

+ +

+ To facilitate BCP 47 this element first needs to be parsed by the + Locale.forLanguageTag method. If it does not return a Locale with + a language the old specification below needs to take effect. +

+ +

It must be specified as :language:[_:country:[_:variant:]] + without the colons, for example "ja_JP_SJIS". The + separators between the segments may be '-' or '_'.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "default-value" contains the value for the property or + attribute in which this element resides. This value differs + from the "suggested-value" in that the property or attribute + must take the value, whereas in "suggested-value" taking the + value is optional.

+ + ]]> +
+
+ + + + + +
+ + + + + EL expressions present within a faces config file + must start with the character sequence of '#{' and + end with '}'.

+ + ]]> +
+
+ + + +
+ + + + + + + + Define the name and other design-time information for a facet + that is associated with a renderer or a component.

+ + ]]> +
+
+ + + + + + The "facet-name" element represents the facet name + under which a UIComponent will be added to its parent. + It must be of type "Identifier".

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + Extension element for facet. It may contain implementation + specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The + value of from-view-id must contain one of the following + values:

+ +
    + +
  • The exact match for a view identifier that is recognized + by the the ViewHandler implementation being used (such as + "/index.jsp" if you are using the default ViewHandler).

  • + +
  • The exact match of a flow node id + in the current flow, or a flow id of another flow.

  • + +
  • A proper prefix of a view identifier, plus a trailing + "*" character. This pattern indicates that all view + identifiers that match the portion of the pattern up to the + asterisk will match the surrounding rule. When more than one + match exists, the match with the longest pattern is selected. +

  • + +
  • An "*" character, which means that this pattern applies + to all view identifiers.

  • + +
+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "from-action" element contains an action reference + expression that must have been executed (by the default + ActionListener for handling application level events) + in order to select the navigation rule. If not specified, + this rule will be relevant no matter which action reference + was executed (or if no action reference was executed).

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "if" element defines a condition that must resolve + to true in order for the navigation case on which it is + defined to be matched, with the existing match criteria + (action method and outcome) as a prerequiste, if present. + The condition is defined declaratively using a value + expression in the body of this element. The expression is + evaluated at the time the navigation case is being matched. + If the "from-outcome" is omitted and this element is + present, the navigation handler will match a null outcome + and use the condition return value to determine if the + case should be considered a match.

+ +
+ +

When used in a <switch> within a flow, if the + expresion returns true, the + <from-outcome> sibling element's outcome is used as + the id of the node in the flow graph to which control must be + passed.

+ +
+ + ]]> +
+
+ + + + + +
+ + + + + + + +

+ +
+ +
+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "converter" element represents a concrete Converter + implementation class that should be registered under the + specified converter identifier. Converter identifiers must + be unique within the entire web application.

+ +

Nested "attribute" elements identify generic attributes that + may be configured on the corresponding UIComponent in order + to affect the operation of the Converter. Nested "property" + elements identify JavaBeans properties of the Converter + implementation class that may be configured to affect the + operation of the Converter. "attribute" and "property" + elements are intended to allow component developers to + more completely describe their components to tools and users. + These elements have no required runtime semantics.

+ + ]]> +
+
+ + + + + + + The "converter-id" element represents the + identifier under which the corresponding + Converter class should be registered.

+ + ]]> +
+
+
+ + + + The "converter-for-class" element represents the + fully qualified class name for which a Converter + class will be registered.

+ + ]]> +
+
+
+
+ + + + The "converter-class" element represents the fully + qualified class name of a concrete Converter + implementation class.

+ + ]]> +
+
+
+ + + + Nested "attribute" elements identify generic + attributes that may be configured on the + corresponding UIComponent in order to affect the + operation of the Converter. This attribute is + primarily for design-time tools and is not + specified to have any meaning at runtime.

+ + ]]> +
+
+
+ + + + Nested "property" elements identify JavaBeans + properties of the Converter implementation class + that may be configured to affect the operation of + the Converter. This attribute is primarily for + design-time tools and is not specified to have + any meaning at runtime.

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + Extension element for converter. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "lifecycle" element provides a mechanism to specify + modifications to the behaviour of the default Lifecycle + implementation for this web application.

+ + ]]> +
+
+ + + + + The "phase-listener" element contains the fully + qualified class name of the concrete PhaseListener + implementation class that will be registered on + the Lifecycle.

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + Extension element for lifecycle. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + The localeType defines valid locale defined by ISO-639-1 + and ISO-3166.

+ + ]]> +
+
+ + + +
+ + + + + + + + The "locale-config" element allows the app developer to + declare the supported locales for this application.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "default-validators" element allows the app developer to + register a set of validators, referenced by identifier, that + are automatically assigned to any EditableValueHolder component + in the application, unless overridden or disabled locally.

+ + ]]> +
+
+ + + + + The "validator-id" element represents the identifier + of a registered validator.

+ + ]]> +
+
+
+
+ +
+ + + + + + + + + Top level element for a flow + definition.

+ +
+ +

If there is no <start-node> element declared, it + is assumed to be <flowName>.xhtml.

+ +
+ + ]]> +
+
+ + + + + + Declare the id of the starting node in the + flow graph. The start node may be any of the node types mentioned in + the class javadocs for FlowHandler.

+ + ]]> +
+
+
+ + + + + + + + + +
+ + + + The id of this flow. The id + must be unique within the Application configuration Resource + file in which this flow is defined. The value of this attribute, + combined with the value of the <faces-config><name> element + must globally identify the flow within the application.

+ + ]]> + + + + + + + + + + + + Invoke a method, passing parameters if necessary. + The return from the method is used as the outcome for where to go next in the + flow. If the method is a void method, the default outcome is used.

+ + ]]> + + + + + + + + + A parameter to pass when calling the method + identified in the "method" element that is a sibling of this element.

+ + ]]> + + + + + + + + + + + + + + + + + + + + + + + + A parameter to pass when calling the method + identified in the "method" element that is a sibling of this element.

+ + ]]> + + + + + + + The optional "class" element within a "parameter" element + will be interpreted as the fully qualified class name for the type + of the "value" element.

+ + ]]> +
+
+ + + + + The "value" element within an "parameter" + must be a literal string or an EL Expression whose "get" will be called when the "method" + associated with this element is invoked.

+ + ]]> +
+
+
+ +
+ + + + + + + + Define a view node in a flow graph.

+ +

This element must contain exactly one + <vdl-document> element.

+ + ]]> +
+
+ + + + + + Define the path to the vdl-document for the enclosing view. +

+ + ]]> + + + + + + + + The id of this view. It must be + unique within the flow.

+ + ]]> +
+
+ +
+ + + + + + + + Define a switch node in a flow graph.

+ +
+ +

This element must contain one or more + <case> elements. When control passes to the + <switch> node, each of the cases must be considered + in order and control must past to the <from-outcome> + of the first one whose <if> expression evaluates to + true.

+ +
+ + ]]> +
+
+ + + + + Defines a case that must be + considered in the list of cases in the + <switch>.

+ + ]]> +
+
+
+ + + + Defines the default case that will + be taken if none of the other cases in the + <switch> are taken.

+ + ]]> +
+
+
+
+ + + + The id of this switch. It must be + unique within the flow.

+ + ]]> +
+
+
+
+ + + + + + + + Defines a case that will + be considered in the <switch>.

+ + ]]> +
+
+ + + + + + If this EL expression evaluates to + true, the corresponding from-outcome will + be the outcome taken by the enclosing <switch>

+ + ]]> +
+
+
+ + + + The "from-outcome" element contains a logical outcome + string returned by the execution of an application + action method selected via an "actionRef" property + (or a literal value specified by an "action" property) + of a UICommand component. If specified, this rule + will be relevant only if the outcome value matches + this element's value. If not specified, this rule + will be relevant if the outcome value is non-null + or, if the "if" element is present, will be relevant + for any outcome value, with the assumption that the + condition specified in the "if" element ultimately + determines if this rule is a match.

+ +

If used in a faces flow, this element + represents the node id to which control will be passed.

+ + ]]> +
+
+
+
+ + +
+ + + + + + + + Define a return node in a flow graph.

+ +
+ +

This element must contain exactly one <from-outcome> element.

+
+ + ]]> +
+
+ + + + + This element + represents the node id to which control will be passed.

+ + ]]> +
+
+
+
+ + + + The id of this flow-return.

+ + ]]> +
+
+
+
+ + + + + + + + Define a call node in a flow graph.

+ +
+ +

This element must contain exactly one <flow-reference> element, + which must contain exactly one <flow-id> element.

+
+ + ]]> +
+
+ + + + + The flow id of the called flow.

+ + ]]> + + + + + + + A parameter to pass when calling the flow + identified in the "flow-reference" element that is a sibling of this element.

+ + ]]> + + + + + + + + The id of this flow-return.

+ + ]]> +
+
+ +
+ + + + + + + + Identifiy the called flow.

+ +
+ +
+ + ]]> +
+
+ + + + + The document id of the called flow.

+ + ]]> +
+
+
+ + + + The id of the called flow.

+ + ]]> +
+
+
+
+
+ + + + + + + + A MethodExpression that will be invoked when the flow is entered.

+ + ]]> + + + + + + + + + + + + + + + + A MethodExpression that will be invoked when the flow is exited.

+ + ]]> + + + + + + + + + + + + + + + + A named parameter whose value will be populated + with a correspondingly named parameter within an "outbound-parameter" element.

+ + ]]> + + + + + + + The "name" element within an "inbound-parameter" + element declares the name of this parameter + to be passed into a flow. There must be + a sibling "value" element in the same parent as this element.

+ + ]]> +
+
+ + + + + The "value" element within an "inbound-parameter" + must be an EL Expression whose value will be set with the correspondingly + named "outbound-parameter" when this flow is entered, if such a + parameter exists.

+ + ]]> +
+
+
+ +
+ + + + + + + + A named parameter whose value will be + passed to a correspondingly named parameter within an "inbound-parameter" element + on the target flow.

+ + ]]> + + + + + + + The "name" element within an "outbound-parameter" element + declares the name of this parameter to be passed out of a flow. There must be + a sibling "value" element in the same parent as this element.

+ + ]]> +
+
+ + + + + The "value" element within an "outbound-parameter" + must be a literal string or an EL Expression whose "get" will be called when the "flow-call" + containing this element is traversed to go to a new flow.

+ + ]]> +
+
+
+ +
+ + + + + + + + + The + "navigation-case" element describes a particular + combination of conditions that must match for this case to + be executed, and the view id of the component tree that + should be selected next.

+ + ]]> +
+
+ + + + + + + The "from-outcome" element contains a logical outcome + string returned by the execution of an application + action method selected via an "actionRef" property + (or a literal value specified by an "action" property) + of a UICommand component. If specified, this rule + will be relevant only if the outcome value matches + this element's value. If not specified, this rule + will be relevant if the outcome value is non-null + or, if the "if" element is present, will be relevant + for any outcome value, with the assumption that the + condition specified in the "if" element ultimately + determines if this rule is a match.

+ + ]]> +
+
+
+ + + + Please see section 7.4.2 "Default NavigationHandler Algorithm" of the Jakarta Faces Specification Document + for the specification of this element.

+ + ]]> +
+
+
+ + + + The "to-view-id" element + contains the view identifier (or + flow node id, or flow id) + of the next view (or flow node or + flow) that should be displayed if this + navigation rule is matched. If the contents is a + value expression, it should be resolved by the + navigation handler to obtain the view ( + or flow node or flow) + identifier.

+ + ]]> +
+
+
+ + + + The document id of the called flow. + If this element appears in a <navigation-case> nested within + a <flow-definition>, it must be ignored because navigation + cases within flows may only navigate among the view nodes of that + flow.

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + The "navigation-rule" element represents an individual + decision rule that will be utilized by the default + NavigationHandler implementation to make decisions on + what view should be displayed next, based on the + view id being processed.

+ + ]]> +
+
+ + + + + + + +
+ + + + + + + + Extension element for navigation-rule. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "null-value" element indicates that the managed + property in which we are nested will be explicitly + set to null if our managed bean is automatically + created. This is different from omitting the managed + property element entirely, which will cause no + property setter to be called for this property.

+ +

The "null-value" element can only be used when the + associated "property-class" identifies a Java class, + not a Java primitive.

+ + ]]> +
+
+ +
+ + + + + + + + The "property" element represents a JavaBean property of the + Java class represented by our parent element.

+ +

Property names must be unique within the scope of the Java + class that is represented by the parent element, and must + correspond to property names that will be recognized when + performing introspection against that class via + java.beans.Introspector.

+ + ]]> +
+
+ + + + + + The "property-name" element represents the JavaBeans + property name under which the corresponding value + may be stored.

+ + ]]> +
+
+
+ + + + The "property-class" element represents the Java type + of the value associated with this property name. + If not specified, it can be inferred from existing + classes; however, this element should be specified if + the configuration file is going to be the source for + generating the corresponding classes.

+ + ]]> +
+
+
+ + + +
+ +
+ + + + + + + + Any view that matches any of the + url-patterns in this element may only be reached from another Jakarta Faces + view in the same web application. Because the runtime is aware of + which views are protected, any navigation from an unprotected + view to a protected view is automatically subject to + protection.

+ + ]]> +
+
+ + + +
+ + + + + + + + Extension element for property. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "redirect" element indicates that navigation to the + specified "to-view-id" should be accomplished by + performing an HTTP redirect rather than the usual + ViewHandler mechanisms.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + This element was introduced due to a specification + error, and is now deprecated. The correct name for + this element is "redirect-param" and its meaning is + documented therein. The "view-param" element is + maintained to preserve backwards compatibility. + Implementations must treat this element the same as + "redirect-param".

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "redirect-param" element, only valid within + a "redirect" element, contains child "name" + and "value" elements that must be included in the + redirect url when the redirect is performed.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "referenced-bean" element represents at design time the + promise that a Java object of the specified type will exist at + runtime in some scope, under the specified key. This can be + used by design time tools to construct user interface dialogs + based on the properties of the specified class. The presence + or absence of a referenced bean element has no impact on the + Jakarta Faces runtime environment inside a web application.

+ + ]]> +
+
+ + + + + + The "referenced-bean-name" element represents the + attribute name under which the corresponding + referenced bean may be assumed to be stored, in one + of 'request', 'session', 'view', 'application' + or a custom scope.

+ + ]]> +
+
+
+ + + + The "referenced-bean-class" element represents the + fully qualified class name of the Java class + (either abstract or concrete) or Java interface + implemented by the corresponding referenced bean.

+ + ]]> +
+
+
+
+ +
+ + + + + + + + The "render-kit" element represents a concrete RenderKit + implementation that should be registered under the specified + render-kit-id. If no render-kit-id is specified, the + identifier of the default RenderKit + (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.

+ + ]]> +
+
+ + + + + + The "render-kit-id" element represents an identifier + for the RenderKit represented by the parent + "render-kit" element.

+ + ]]> +
+
+
+ + + + The "render-kit-class" element represents the fully + qualified class name of a concrete RenderKit + implementation class.

+ + ]]> +
+
+
+ + + +
+ +
+ + + + + + + + The "client-behavior-renderer" element represents a concrete + ClientBehaviorRenderer implementation class that should be + registered under the specified behavior renderer type identifier, + in the RenderKit associated with the parent "render-kit" + element. Client Behavior renderer type must be unique within the RenderKit + associated with the parent "render-kit" element.

+ +

Nested "attribute" elements identify generic component + attributes that are recognized by this renderer.

+ + ]]> +
+
+ + + + + The "client-behavior-renderer-type" element represents a renderer type + identifier for the Client Behavior Renderer represented by the parent + "client-behavior-renderer" element.

+ + ]]> +
+
+
+ + + + The "client-behavior-renderer-class" element represents the fully + qualified class name of a concrete Client Behavior Renderer + implementation class.

+ + ]]> +
+
+
+
+ +
+ + + + + + + + The "renderer" element represents a concrete Renderer + implementation class that should be registered under the + specified component family and renderer type identifiers, + in the RenderKit associated with the parent "render-kit" + element. Combinations of component family and + renderer type must be unique within the RenderKit + associated with the parent "render-kit" element.

+ +

Nested "attribute" elements identify generic component + attributes that are recognized by this renderer.

+ + ]]> +
+
+ + + + + + The "component-family" element represents the + component family for which the Renderer represented + by the parent "renderer" element will be used.

+ + ]]> +
+
+
+ + + + The "renderer-type" element represents a renderer type + identifier for the Renderer represented by the parent + "renderer" element.

+ + ]]> +
+
+
+ + + + The "renderer-class" element represents the fully + qualified class name of a concrete Renderer + implementation class.

+ + ]]> +
+
+
+ + + +
+ +
+ + + + + + + + Extension element for renderer. It may contain implementation + specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + Extension element for render-kit. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "suggested-value" contains the value for the property or + attribute in which this element resides. This value is + advisory only and is intended for tools to use when + populating pallettes.

+ + ]]> +
+
+ + + +
+ + + + + + + + The "supported-locale" element allows authors to declare + which locales are supported in this application instance.

+ +

+ To facilitate BCP 47 this element first needs to be parsed by the + Locale.forLanguageTag method. If it does not return a Locale with + a language the old specification below needs to take effect. +

+ +

It must be specified as :language:[_:country:[_:variant:]] + without the colons, for example "ja_JP_SJIS". The + separators between the segments may be '-' or '_'.

+ + ]]> +
+
+ + + + + +
+ + + + + + + + The "behavior" element represents a concrete Behavior + implementation class that should be registered under the + specified behavior identifier. Behavior identifiers must + be unique within the entire web application.

+ +

Nested "attribute" elements identify generic attributes that + may be configured on the corresponding UIComponent in order + to affect the operation of the Behavior. Nested "property" + elements identify JavaBeans properties of the Behavior + implementation class that may be configured to affect the + operation of the Behavior. "attribute" and "property" + elements are intended to allow component developers to + more completely describe their components to tools and users. + These elements have no required runtime semantics.

+ + ]]> +
+
+ + + + + + The "behavior-id" element represents the identifier + under which the corresponding Behavior class should + be registered.

+ + ]]> +
+
+
+ + + + The "behavior-class" element represents the fully + qualified class name of a concrete Behavior + implementation class.

+ + ]]> +
+
+
+ + + + Nested "attribute" elements identify generic + attributes that may be configured on the + corresponding UIComponent in order to affect the + operation of the Behavior. This attribute is + primarily for design-time tools and is not + specified to have any meaning at runtime.

+ + ]]> +
+
+
+ + + + Nested "property" elements identify JavaBeans + properties of the Behavior implementation class + that may be configured to affect the operation of + the Behavior. This attribute is primarily for + design-time tools and is not specified to have + any meaning at runtime.

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + Extension element for behavior. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + + + + The "validator" element represents a concrete Validator + implementation class that should be registered under the + specified validator identifier. Validator identifiers must + be unique within the entire web application.

+ +

Nested "attribute" elements identify generic attributes that + may be configured on the corresponding UIComponent in order + to affect the operation of the Validator. Nested "property" + elements identify JavaBeans properties of the Validator + implementation class that may be configured to affect the + operation of the Validator. "attribute" and "property" + elements are intended to allow component developers to + more completely describe their components to tools and users. + These elements have no required runtime semantics.

+ + ]]> +
+
+ + + + + + The "validator-id" element represents the identifier + under which the corresponding Validator class should + be registered.

+ + ]]> +
+
+
+ + + + The "validator-class" element represents the fully + qualified class name of a concrete Validator + implementation class.

+ + ]]> +
+
+
+ + + + Nested "attribute" elements identify generic + attributes that may be configured on the + corresponding UIComponent in order to affect the + operation of the Validator. This attribute is + primarily for design-time tools and is not + specified to have any meaning at runtime.

+ + ]]> +
+
+
+ + + + Nested "property" elements identify JavaBeans + properties of the Validator implementation class + that may be configured to affect the operation of + the Validator. This attribute is primarily for + design-time tools and is not specified to have + any meaning at runtime.

+ + ]]> +
+
+
+ +
+ +
+ + + + + + + + Extension element for validator. It may contain + implementation specific content.

+ + ]]> +
+
+ + + + +
+ + + + + The "value" element is the String representation of + a literal value to which a scalar managed property + will be set, or a value binding expression ("#{...}") + that will be used to calculate the required value. + It will be converted as specified for the actual + property type.

+ + ]]> +
+
+ +
+ + + + + + + + The presence of this element within the "application" element in + an application configuration resource file indicates the + developer wants to add an SystemEventListener to this + application instance. Elements nested within this element allow + selecting the kinds of events that will be delivered to the + listener instance, and allow selecting the kinds of classes that + can be the source of events that are delivered to the listener + instance.

+ + ]]> +
+
+ + + + + The "system-event-listener-class" element contains + the fully qualified class name of the concrete + SystemEventListener implementation class that will be + called when events of the type specified by the + "system-event-class" are sent by the runtime.

+ + ]]> +
+
+
+ + + + The "system-event-class" element contains the fully + qualified class name of the SystemEvent subclass for + which events will be delivered to the class whose fully + qualified class name is given by the + "system-event-listener-class" element.

+ + ]]> +
+
+
+ + + + The "source-class" element, if present, contains the + fully qualified class name of the class that will be the + source for the event to be delivered to the class whose + fully qualified class name is given by the + "system-event-listener-class" element.

+ + ]]> +
+
+
+
+ +
+ + + + + This type contains the recognized versions of + faces-config supported.

+ + ]]> +
+
+ + + +
+ +
diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/CompositeComponentWizardIterator.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/CompositeComponentWizardIterator.java index afc4f8a25629..b82c3b32404c 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/CompositeComponentWizardIterator.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/CompositeComponentWizardIterator.java @@ -72,7 +72,11 @@ public Set instantiate(TemplateWizard wiz) throws IOException { WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); if (webModule != null) { JsfVersion version = JsfVersionUtils.forWebModule(webModule); - if (version != null && version.isAtLeast(JsfVersion.JSF_3_0)) { + if (version != null && version.isAtLeast(JsfVersion.JSF_4_1)) { + templateProperties.put("isJSF41", Boolean.TRUE); //NOI18N + } else if (version != null && version.isAtLeast(JsfVersion.JSF_4_0)) { + templateProperties.put("isJSF40", Boolean.TRUE); //NOI18N + } else if (version != null && version.isAtLeast(JsfVersion.JSF_3_0)) { templateProperties.put("isJSF30", Boolean.TRUE); //NOI18N } else if (version != null && version.isAtLeast(JsfVersion.JSF_2_2)) { templateProperties.put("isJSF22", Boolean.TRUE); //NOI18N diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/FacesConfigIterator.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/FacesConfigIterator.java index a094e2730d1b..bd6106c6e2eb 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/FacesConfigIterator.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/FacesConfigIterator.java @@ -153,7 +153,8 @@ public static FileObject createFacesConfig(Project project, FileObject targetDir } if (!found) { InitParam contextParam = (InitParam) ddRoot.createBean(INIT_PARAM); - if(WebApp.VERSION_6_0.equals(ddRoot.getVersion()) || WebApp.VERSION_5_0.equals(ddRoot.getVersion())) { + if(WebApp.VERSION_6_1.equals(ddRoot.getVersion()) || WebApp.VERSION_6_0.equals(ddRoot.getVersion()) || + WebApp.VERSION_5_0.equals(ddRoot.getVersion())) { contextParam.setParamName(JAKARTAEE_FACES_CONFIG_PARAM); } else { contextParam.setParamName(FACES_CONFIG_PARAM); @@ -190,7 +191,9 @@ private static String findFacesConfigTemplate(WebModule wm) { // not found on project classpath (case of Maven project with JSF in deps) if (jsfVersion == null) { Profile profile = wm.getJ2eeProfile(); - if (profile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) { + if (profile.isAtLeast(Profile.JAKARTA_EE_11_WEB)) { + return JSFCatalog.RES_FACES_CONFIG_4_1; + } else if (profile.isAtLeast(Profile.JAKARTA_EE_10_WEB)) { return JSFCatalog.RES_FACES_CONFIG_4_0; } else if (profile.isAtLeast(Profile.JAKARTA_EE_9_WEB)) { return JSFCatalog.RES_FACES_CONFIG_3_0; @@ -224,6 +227,8 @@ private static String findFacesConfigTemplate(WebModule wm) { private static String facesConfigForVersion(JsfVersion jsfVersion) { switch (jsfVersion) { + case JSF_4_1: + return JSFCatalog.RES_FACES_CONFIG_4_1; case JSF_4_0: return JSFCatalog.RES_FACES_CONFIG_4_0; case JSF_3_0: diff --git a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java index df44767eafa6..48c6db52a8d9 100644 --- a/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java +++ b/enterprise/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java @@ -1808,7 +1808,9 @@ public void run() { setServerLibraryModel(serverJsfLibraries); if (serverJsfLibraries.isEmpty()) { Library preferredLibrary; - if (getProfile() != null && getProfile().isAtLeast(Profile.JAKARTA_EE_10_WEB)) { + if (getProfile() != null && getProfile().isAtLeast(Profile.JAKARTA_EE_11_WEB)) { + preferredLibrary = LibraryManager.getDefault().getLibrary(JSFUtils.DEFAULT_JSF_4_1_NAME); + } else if (getProfile() != null && getProfile().isAtLeast(Profile.JAKARTA_EE_10_WEB)) { preferredLibrary = LibraryManager.getDefault().getLibrary(JSFUtils.DEFAULT_JSF_4_0_NAME); } else if (getProfile() != null && getProfile().isAtLeast(Profile.JAKARTA_EE_9_WEB)) { preferredLibrary = LibraryManager.getDefault().getLibrary(JSFUtils.DEFAULT_JSF_3_0_NAME); diff --git a/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/JsfVersion.java b/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/JsfVersion.java index c112201d82c6..3d7df12c03f9 100644 --- a/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/JsfVersion.java +++ b/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/JsfVersion.java @@ -34,7 +34,8 @@ public enum JsfVersion { JSF_2_2("2.2"), JSF_2_3("2.3"), JSF_3_0("3.0"), - JSF_4_0("4.0"); + JSF_4_0("4.0"), + JSF_4_1("4.1"); private final String version; @@ -49,9 +50,27 @@ public String getShortName() { return "JSF " + version; } + /** + * Find out if the version of the JsfVersion is equal or higher to given + * JsfVersion. + * @param jsfVersion + * @return true if this JsfVersion is equal or higher to given one, + * false otherwise + */ public boolean isAtLeast(@NonNull JsfVersion jsfVersion) { return this.ordinal() >= jsfVersion.ordinal(); } + + /** + * Find out if the version of the JsfVersion is equal or lower to given + * JsfVersion. + * @param jsfVersion + * @return true if this JsfVersion is equal or lower to given one, + * false otherwise + */ + public boolean isAtMost(@NonNull JsfVersion jsfVersion) { + return this.ordinal() <= jsfVersion.ordinal(); + } public static JsfVersion latest() { return values()[values().length - 1]; diff --git a/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/NamespaceUtils.java b/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/NamespaceUtils.java index d46602b136ef..7dc971d6f91c 100644 --- a/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/NamespaceUtils.java +++ b/enterprise/web.jsfapi/src/org/netbeans/modules/web/jsfapi/api/NamespaceUtils.java @@ -31,6 +31,9 @@ */ public final class NamespaceUtils { + /** Location of namespaces since JSF 4.0. */ + public static final String JAKARTA_ORG_LOCATION = "jakarta.faces"; //NOI18N + /** Location of namespaces since JSF 2.2. */ public static final String JCP_ORG_LOCATION = "http://xmlns.jcp.org"; //NOI18N @@ -38,7 +41,7 @@ public final class NamespaceUtils { public static final String SUN_COM_LOCATION = "http://java.sun.com"; //NOI18N /** Mapping of the new namespace to the legacy one. */ - public static final Map NS_MAPPING = new HashMap<>(8); + public static final Map NS_MAPPING = new HashMap<>(16); static { NS_MAPPING.put("http://xmlns.jcp.org/jsf/html", "http://java.sun.com/jsf/html"); //NOI18N @@ -50,6 +53,22 @@ public final class NamespaceUtils { NS_MAPPING.put("http://xmlns.jcp.org/jsf", "http://java.sun.com/jsf"); //NOI18N NS_MAPPING.put("http://xmlns.jcp.org/jsf/passthrough", "http://java.sun.com/jsf/passthrough"); //NOI18N } + + /** Mapping of the new Jakarta EE namespace to the JCP. */ + public static final Map JAKARTA_NS_MAPPING = new HashMap<>(16); + + static { + JAKARTA_NS_MAPPING.put("jakarta.faces.html", "http://xmlns.jcp.org/jsf/html"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.faces.core", "http://xmlns.jcp.org/jsf/core"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.tags.core", "http://xmlns.jcp.org/jsp/jstl/core"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.tags.fmt", "http://xmlns.jcp.org/jsp/jstl/fmt"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.tags.functions", "http://xmlns.jcp.org/jsp/jstl/functions"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.faces.facelets", "http://xmlns.jcp.org/jsf/facelets"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.faces.composite", "http://xmlns.jcp.org/jsf/composite"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.faces", "http://xmlns.jcp.org/jsf"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.faces.passthrough", "http://xmlns.jcp.org/jsf/passthrough"); //NOI18N + JAKARTA_NS_MAPPING.put("jakarta.faces.component", "http://xmlns.jcp.org/jsf/component"); //NOI18N + } /** * Takes map of libraries and namespace and return library for the namespace or its legacy version. diff --git a/enterprise/web.jsfapi/test/unit/src/org/netbeans/modules/web/jsfapi/api/JsfVersionTest.java b/enterprise/web.jsfapi/test/unit/src/org/netbeans/modules/web/jsfapi/api/JsfVersionTest.java index e58f61419511..51996c1b30a6 100644 --- a/enterprise/web.jsfapi/test/unit/src/org/netbeans/modules/web/jsfapi/api/JsfVersionTest.java +++ b/enterprise/web.jsfapi/test/unit/src/org/netbeans/modules/web/jsfapi/api/JsfVersionTest.java @@ -42,6 +42,7 @@ public void testVersionComparison_JSF_1_0() { assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -57,6 +58,7 @@ public void testVersionComparison_JSF_1_1() { assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -72,6 +74,7 @@ public void testVersionComparison_JSF_1_2() { assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -87,6 +90,7 @@ public void testVersionComparison_JSF_2_0() { assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -102,6 +106,7 @@ public void testVersionComparison_JSF_2_1() { assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -117,6 +122,7 @@ public void testVersionComparison_JSF_2_2() { assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -132,6 +138,7 @@ public void testVersionComparison_JSF_2_3() { assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -147,6 +154,7 @@ public void testVersionComparison_JSF_3_0() { assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -162,6 +170,23 @@ public void testVersionComparison_JSF_4_0() { assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertFalse(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); + } + + @Test + public void testVersionComparison_JSF_4_1() { + JsfVersion jsfVersion = JsfVersion.JSF_4_1; + + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_1_0)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_1_1)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_1_2)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_0)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_1)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_2)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_2_3)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_3_0)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_4_0)); + assertTrue(jsfVersion.isAtLeast(JsfVersion.JSF_4_1)); } @Test @@ -175,10 +200,11 @@ public void testShortName() { assertEquals("JSF 2.3", JsfVersion.JSF_2_3.getShortName()); assertEquals("JSF 3.0", JsfVersion.JSF_3_0.getShortName()); assertEquals("Faces 4.0", JsfVersion.JSF_4_0.getShortName()); + assertEquals("Faces 4.1", JsfVersion.JSF_4_1.getShortName()); } @Test public void testLatest() { - assertEquals(JsfVersion.JSF_4_0, JsfVersion.latest()); + assertEquals(JsfVersion.JSF_4_1, JsfVersion.latest()); } } diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/ProjectWebModule.java b/enterprise/web.project/src/org/netbeans/modules/web/project/ProjectWebModule.java index fd400aeaa164..4a2530c13bcd 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/ProjectWebModule.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/ProjectWebModule.java @@ -558,25 +558,37 @@ public J2eeModule.Type getModuleType () { public String getModuleVersion () { // return a version based on the Java EE version Profile platformVersion = getJ2eeProfile(); - if (Profile.JAKARTA_EE_10_FULL.equals(platformVersion) || Profile.JAKARTA_EE_10_WEB.equals(platformVersion)) { - return WebApp.VERSION_6_0; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(platformVersion) || Profile.JAKARTA_EE_9_1_WEB.equals(platformVersion) - || Profile.JAKARTA_EE_9_FULL.equals(platformVersion) || Profile.JAKARTA_EE_9_WEB.equals(platformVersion)) { - return WebApp.VERSION_5_0; - } else if (Profile.JAKARTA_EE_8_FULL.equals(platformVersion) || Profile.JAKARTA_EE_8_WEB.equals(platformVersion) - || Profile.JAVA_EE_8_FULL.equals(platformVersion) || Profile.JAVA_EE_8_WEB.equals(platformVersion)) { - return WebApp.VERSION_4_0; - } else if (Profile.JAVA_EE_7_FULL.equals(platformVersion) || Profile.JAVA_EE_7_WEB.equals(platformVersion)) { - return WebApp.VERSION_3_1; - } else if (Profile.JAVA_EE_6_FULL.equals(platformVersion) || Profile.JAVA_EE_6_WEB.equals(platformVersion)) { - return WebApp.VERSION_3_0; - } else if (Profile.JAVA_EE_5.equals(platformVersion)) { - return WebApp.VERSION_2_5; - } else if (Profile.J2EE_14.equals(platformVersion)) { - return WebApp.VERSION_2_4; - } else { - // return 3.1 as default value + if (null == platformVersion) { return WebApp.VERSION_3_1; + } else switch (platformVersion) { + case JAKARTA_EE_11_FULL: + case JAKARTA_EE_11_WEB: + return WebApp.VERSION_6_1; + case JAKARTA_EE_10_FULL: + case JAKARTA_EE_10_WEB: + return WebApp.VERSION_6_0; + case JAKARTA_EE_9_1_FULL: + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_FULL: + case JAKARTA_EE_9_WEB: + return WebApp.VERSION_5_0; + case JAKARTA_EE_8_FULL: + case JAKARTA_EE_8_WEB: + case JAVA_EE_8_FULL: + case JAVA_EE_8_WEB: + return WebApp.VERSION_4_0; + case JAVA_EE_7_FULL: + case JAVA_EE_7_WEB: + return WebApp.VERSION_3_1; + case JAVA_EE_6_FULL: + case JAVA_EE_6_WEB: + return WebApp.VERSION_3_0; + case JAVA_EE_5: + return WebApp.VERSION_2_5; + case J2EE_14: + return WebApp.VERSION_2_4; + default: + return WebApp.VERSION_3_1; } } diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/WebJPAModuleInfo.java b/enterprise/web.project/src/org/netbeans/modules/web/project/WebJPAModuleInfo.java index 3a77c4ed53a6..0ed936156ba7 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/WebJPAModuleInfo.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/WebJPAModuleInfo.java @@ -64,7 +64,8 @@ public Boolean isJPAVersionSupported(String version) { JpaSupport support = JpaSupport.getInstance(platform); JpaProvider provider = support.getDefaultProvider(); if (provider != null) { - return (Persistence.VERSION_3_1.equals(version) && provider.isJpa31Supported()) + return (Persistence.VERSION_3_2.equals(version) && provider.isJpa32Supported()) + || (Persistence.VERSION_3_1.equals(version) && provider.isJpa31Supported()) || (Persistence.VERSION_3_0.equals(version) && provider.isJpa30Supported()) || (Persistence.VERSION_2_2.equals(version) && provider.isJpa22Supported()) || (Persistence.VERSION_2_1.equals(version) && provider.isJpa21Supported()) diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/WebProject.java b/enterprise/web.project/src/org/netbeans/modules/web/project/WebProject.java index 6890003403fb..c7e301d22206 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/WebProject.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/WebProject.java @@ -1581,14 +1581,19 @@ private void checkEnvironment() { } projectCap = J2eeProjectCapabilities.forProject(project); Profile profile = Profile.fromPropertiesString(eval.getProperty(WebProjectProperties.J2EE_PLATFORM)); - isEE5 = profile == Profile.JAVA_EE_5; - serverSupportsEJB31 = ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_6_FULL) || - ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_7_FULL) || - ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_8_FULL) || - ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_8_FULL); - serverSupportsEJB40 = ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_9_1_FULL) - || ProjectUtil.getSupportedProfiles(project).contains(Profile.JAKARTA_EE_10_FULL); + isEE5 = (profile == Profile.JAVA_EE_5); + + for (Profile _profile : ProjectUtil.getSupportedProfiles(project)) { + if (_profile.isFullProfile()) { + if (_profile.isAtLeast(Profile.JAKARTA_EE_9_FULL)) { + serverSupportsEJB40 = true; + break; + } else if (_profile.isAtLeast(Profile.JAVA_EE_6_FULL)) { + serverSupportsEJB31 = true; + break; + } + } + } checked = true; } } @@ -2439,7 +2444,8 @@ private void updateLookup(){ || Profile.JAKARTA_EE_8_FULL.equals(profile) || Profile.JAKARTA_EE_8_WEB.equals(profile) || Profile.JAKARTA_EE_9_FULL.equals(profile) || Profile.JAKARTA_EE_9_WEB.equals(profile) || Profile.JAKARTA_EE_9_1_FULL.equals(profile) || Profile.JAKARTA_EE_9_1_WEB.equals(profile) - || Profile.JAKARTA_EE_10_FULL.equals(profile) || Profile.JAKARTA_EE_10_WEB.equals(profile)) { + || Profile.JAKARTA_EE_10_FULL.equals(profile) || Profile.JAKARTA_EE_10_WEB.equals(profile) + || Profile.JAKARTA_EE_11_FULL.equals(profile) || Profile.JAKARTA_EE_11_WEB.equals(profile)) { lookups.add(ee6); } if ("true".equals(project.evaluator().getProperty(WebProjectProperties.DISPLAY_BROWSER))) { diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java b/enterprise/web.project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java index 52eb608385bc..a82de138649b 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java @@ -835,11 +835,8 @@ private static AntProjectHelper setupProject(FileObject dirFO, String name, } public static void upgradeJ2EEProfile(WebProject project){ - if (Profile.JAVA_EE_6_WEB.equals(project.getAPIEjbJar().getJ2eeProfile()) || - Profile.JAVA_EE_7_WEB.equals(project.getAPIEjbJar().getJ2eeProfile()) || - Profile.JAVA_EE_8_WEB.equals(project.getAPIEjbJar().getJ2eeProfile()) || - Profile.JAKARTA_EE_8_WEB.equals(project.getAPIEjbJar().getJ2eeProfile()) || - Profile.JAKARTA_EE_9_WEB.equals(project.getAPIEjbJar().getJ2eeProfile())){ + Profile profile = project.getAPIEjbJar().getJ2eeProfile(); + if (profile.isWebProfile() && profile.isAtLeast(Profile.JAVA_EE_6_WEB)) { //check the J2EE 6/7 Full profile specific functionality Boolean isFullRequired = Boolean.FALSE; try{ @@ -871,7 +868,7 @@ public Boolean run(EjbJarMetadata metadata) { //change profile if required if (isFullRequired){ boolean ee7 = false; - if (Profile.JAVA_EE_7_WEB.equals(project.getAPIEjbJar().getJ2eeProfile())) { + if (Profile.JAVA_EE_7_WEB.equals(profile)) { ee7 = true; } if ((ee7 && ProjectUtil.getSupportedProfiles(project).contains(Profile.JAVA_EE_7_FULL)) || diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSClientSupport.java b/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSClientSupport.java index 952597f0ac66..adb5439bfd86 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSClientSupport.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSClientSupport.java @@ -110,36 +110,35 @@ protected FileObject getXmlArtifactsRoot() { protected String getProjectJavaEEVersion() { WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); if (webModule != null) { - if (Profile.JAVA_EE_6_WEB.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_6_FULL.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_7_WEB.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_7_FULL.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_8_WEB.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAVA_EE_8_FULL.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAKARTA_EE_8_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_8_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_9_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_1_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_10_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAKARTA_EE_10_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAVA_EE_5.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_15; + switch (webModule.getJ2eeProfile()) { + case JAVA_EE_6_WEB: + case JAVA_EE_6_FULL: + return JAVA_EE_VERSION_16; + case JAVA_EE_7_WEB: + case JAVA_EE_7_FULL: + return JAVA_EE_VERSION_17; + case JAVA_EE_8_WEB: + case JAVA_EE_8_FULL: + return JAVA_EE_VERSION_18; + case JAKARTA_EE_8_WEB: + case JAKARTA_EE_8_FULL: + return JAKARTA_EE_VERSION_8; + case JAKARTA_EE_9_WEB: + case JAKARTA_EE_9_FULL: + return JAKARTA_EE_VERSION_9; + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_1_FULL: + return JAKARTA_EE_VERSION_91; + case JAKARTA_EE_10_WEB: + case JAKARTA_EE_10_FULL: + return JAKARTA_EE_VERSION_10; + case JAKARTA_EE_11_WEB: + case JAKARTA_EE_11_FULL: + return JAKARTA_EE_VERSION_11; + case JAVA_EE_5: + return JAVA_EE_VERSION_15; + default: + break; } } return JAVA_EE_VERSION_NONE; diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSSupport.java b/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSSupport.java index cdf5ffa04096..8513b5da041e 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSSupport.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/jaxws/WebProjectJAXWSSupport.java @@ -595,36 +595,35 @@ private void logWsDetected() { protected String getProjectJavaEEVersion() { WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); if (webModule != null) { - if (Profile.JAVA_EE_6_WEB.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_6_FULL.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_16; - } else if (Profile.JAVA_EE_7_WEB.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_7_FULL.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_17; - } else if (Profile.JAVA_EE_8_WEB.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAVA_EE_8_FULL.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_18; - } else if (Profile.JAKARTA_EE_8_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_8_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_8; - } else if (Profile.JAKARTA_EE_9_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_9; - } else if (Profile.JAKARTA_EE_9_1_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_9_1_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_91; - } else if (Profile.JAKARTA_EE_10_WEB.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAKARTA_EE_10_FULL.equals(webModule.getJ2eeProfile())) { - return JAKARTA_EE_VERSION_10; - } else if (Profile.JAVA_EE_5.equals(webModule.getJ2eeProfile())) { - return JAVA_EE_VERSION_15; + switch (webModule.getJ2eeProfile()) { + case JAVA_EE_6_WEB: + case JAVA_EE_6_FULL: + return JAVA_EE_VERSION_16; + case JAVA_EE_7_WEB: + case JAVA_EE_7_FULL: + return JAVA_EE_VERSION_17; + case JAVA_EE_8_WEB: + case JAVA_EE_8_FULL: + return JAVA_EE_VERSION_18; + case JAKARTA_EE_8_WEB: + case JAKARTA_EE_8_FULL: + return JAKARTA_EE_VERSION_8; + case JAKARTA_EE_9_WEB: + case JAKARTA_EE_9_FULL: + return JAKARTA_EE_VERSION_9; + case JAKARTA_EE_9_1_WEB: + case JAKARTA_EE_9_1_FULL: + return JAKARTA_EE_VERSION_91; + case JAKARTA_EE_10_WEB: + case JAKARTA_EE_10_FULL: + return JAKARTA_EE_VERSION_10; + case JAKARTA_EE_11_WEB: + case JAKARTA_EE_11_FULL: + return JAKARTA_EE_VERSION_11; + case JAVA_EE_5: + return JAVA_EE_VERSION_15; + default: + break; } } return JAVA_EE_VERSION_NONE; diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java index 8ea7280ab630..9e56416f4839 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java @@ -375,16 +375,30 @@ private void init() { PLATFORM_LIST_RENDERER = PlatformUiSupport.createPlatformListCellRenderer(); SpecificationVersion minimalSourceLevel = null; Profile profile = Profile.fromPropertiesString(evaluator.getProperty(J2EE_PLATFORM)); - if (Profile.JAKARTA_EE_9_1_FULL.equals(profile) || Profile.JAKARTA_EE_10_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("11"); - } else if (Profile.JAKARTA_EE_8_FULL.equals(profile) || Profile.JAVA_EE_8_FULL.equals(profile) || Profile.JAKARTA_EE_9_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.8"); - } else if (Profile.JAVA_EE_7_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.7"); - } else if (Profile.JAVA_EE_6_FULL.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.6"); - } else if (Profile.JAVA_EE_5.equals(profile)) { - minimalSourceLevel = new SpecificationVersion("1.5"); + switch (profile) { + case JAKARTA_EE_11_FULL: + minimalSourceLevel = new SpecificationVersion("21"); + break; + case JAKARTA_EE_10_FULL: + case JAKARTA_EE_9_1_FULL: + minimalSourceLevel = new SpecificationVersion("11"); + break; + case JAKARTA_EE_9_FULL: + case JAKARTA_EE_8_FULL: + case JAVA_EE_8_FULL: + minimalSourceLevel = new SpecificationVersion("1.8"); + break; + case JAVA_EE_7_FULL: + minimalSourceLevel = new SpecificationVersion("1.7"); + break; + case JAVA_EE_6_FULL: + minimalSourceLevel = new SpecificationVersion("1.6"); + break; + case JAVA_EE_5: + minimalSourceLevel = new SpecificationVersion("1.5"); + break; + default: + break; } JAVAC_SOURCE_MODEL = PlatformUiSupport.createSourceLevelComboBoxModel (PLATFORM_MODEL, evaluator.getProperty(JAVAC_SOURCE), evaluator.getProperty(JAVAC_TARGET), minimalSourceLevel); JAVAC_SOURCE_RENDERER = PlatformUiSupport.createSourceLevelListCellRenderer (); diff --git a/enterprise/web.project/test/unit/src/org/netbeans/modules/web/project/WebProjectTest.java b/enterprise/web.project/test/unit/src/org/netbeans/modules/web/project/WebProjectTest.java index 61a52f0813c0..f4a970b2f82e 100644 --- a/enterprise/web.project/test/unit/src/org/netbeans/modules/web/project/WebProjectTest.java +++ b/enterprise/web.project/test/unit/src/org/netbeans/modules/web/project/WebProjectTest.java @@ -117,6 +117,8 @@ public void testJavaEEProjectSettingsInWebProject() throws Exception { JavaEEProjectSettings.setProfile(webProject, Profile.JAKARTA_EE_10_WEB); Profile obtainedProfileJakartaEE10 = JavaEEProjectSettings.getProfile(webProject); assertEquals(Profile.JAKARTA_EE_10_WEB, obtainedProfileJakartaEE10); + Profile obtainedProfileJakartaEE11 = JavaEEProjectSettings.getProfile(webProject); + assertEquals(Profile.JAKARTA_EE_11_WEB, obtainedProfileJakartaEE11); } /** diff --git a/enterprise/websocket/src/org/netbeans/modules/websocket/editor/WebSocketMethodsTask.java b/enterprise/websocket/src/org/netbeans/modules/websocket/editor/WebSocketMethodsTask.java index 76faede4c25b..bad4339d3d69 100644 --- a/enterprise/websocket/src/org/netbeans/modules/websocket/editor/WebSocketMethodsTask.java +++ b/enterprise/websocket/src/org/netbeans/modules/websocket/editor/WebSocketMethodsTask.java @@ -124,14 +124,7 @@ private boolean isApplicable(FileObject fileObject) { return false; } Profile profile = webModule.getJ2eeProfile(); - if (!Profile.JAVA_EE_7_WEB.equals(profile) - && !Profile.JAVA_EE_7_FULL.equals(profile) - && !Profile.JAVA_EE_8_WEB.equals(profile) - && !Profile.JAVA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_1_FULL.equals(profile) - && !Profile.JAKARTA_EE_10_FULL.equals(profile)) { + if (profile.isAtMost(Profile.JAVA_EE_6_FULL)) { return false; } return true; diff --git a/enterprise/websocket/src/org/netbeans/modules/websocket/wizard/WebSocketPanel.java b/enterprise/websocket/src/org/netbeans/modules/websocket/wizard/WebSocketPanel.java index 17a7cb17609e..00473fb676b3 100644 --- a/enterprise/websocket/src/org/netbeans/modules/websocket/wizard/WebSocketPanel.java +++ b/enterprise/websocket/src/org/netbeans/modules/websocket/wizard/WebSocketPanel.java @@ -78,18 +78,7 @@ public boolean isValid() { WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); if (webModule != null) { Profile profile = webModule.getJ2eeProfile(); - if (!Profile.JAVA_EE_7_FULL.equals(profile) - && !Profile.JAVA_EE_7_WEB.equals(profile) - && !Profile.JAVA_EE_8_FULL.equals(profile) - && !Profile.JAVA_EE_8_WEB.equals(profile) - && !Profile.JAKARTA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_8_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_1_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_1_FULL.equals(profile) - && !Profile.JAKARTA_EE_10_WEB.equals(profile) - && !Profile.JAKARTA_EE_10_FULL.equals(profile)) { + if (profile.isAtMost(Profile.JAVA_EE_6_FULL)) { setErrorMessage(NbBundle.getMessage(WebSocketPanel.class, "MSG_NoJEE7Profile")); // NOI18N return false; diff --git a/enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/spi/jaxws/client/ProjectJAXWSClientSupport.java b/enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/spi/jaxws/client/ProjectJAXWSClientSupport.java index 757d67ddd11c..61fc07f5754d 100644 --- a/enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/spi/jaxws/client/ProjectJAXWSClientSupport.java +++ b/enterprise/websvc.clientapi/src/org/netbeans/modules/websvc/spi/jaxws/client/ProjectJAXWSClientSupport.java @@ -86,6 +86,7 @@ public abstract class ProjectJAXWSClientSupport implements JAXWSClientSupportImp protected static final String JAKARTA_EE_VERSION_9="jakarta-ee-version-9"; //NOI18N protected static final String JAKARTA_EE_VERSION_91="jakarta-ee-version-91"; //NOI18N protected static final String JAKARTA_EE_VERSION_10="jakarta-ee-version-10"; //NOI18N + protected static final String JAKARTA_EE_VERSION_11="jakarta-ee-version-11"; //NOI18N Project project; private AntProjectHelper helper; diff --git a/enterprise/websvc.jaxwsapi/src/org/netbeans/modules/websvc/jaxws/spi/ProjectJAXWSSupport.java b/enterprise/websvc.jaxwsapi/src/org/netbeans/modules/websvc/jaxws/spi/ProjectJAXWSSupport.java index c6bacfa58e08..cc8bbe18aa9c 100644 --- a/enterprise/websvc.jaxwsapi/src/org/netbeans/modules/websvc/jaxws/spi/ProjectJAXWSSupport.java +++ b/enterprise/websvc.jaxwsapi/src/org/netbeans/modules/websvc/jaxws/spi/ProjectJAXWSSupport.java @@ -82,6 +82,7 @@ public abstract class ProjectJAXWSSupport implements JAXWSSupportImpl { protected static final String JAKARTA_EE_VERSION_9="jakarta-ee-version-9"; //NOI18N protected static final String JAKARTA_EE_VERSION_91="jakarta-ee-version-91"; //NOI18N protected static final String JAKARTA_EE_VERSION_10="jakarta-ee-version-10"; //NOI18N + protected static final String JAKARTA_EE_VERSION_11="jakarta-ee-version-11"; //NOI18N private Project project; private AntProjectHelper antProjectHelper; diff --git a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/editor/AsyncConverter.java b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/editor/AsyncConverter.java index 0940038b71ce..b388923649fc 100644 --- a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/editor/AsyncConverter.java +++ b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/editor/AsyncConverter.java @@ -95,19 +95,7 @@ boolean isApplicable(FileObject fileObject){ return false; } Profile profile = webModule.getJ2eeProfile(); - if (!Profile.JAVA_EE_7_WEB.equals(profile) - && !Profile.JAVA_EE_7_FULL.equals( profile) - && !Profile.JAVA_EE_8_WEB.equals(profile) - && !Profile.JAVA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_8_WEB.equals(profile) - && !Profile.JAKARTA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_1_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_1_FULL.equals(profile) - && !Profile.JAKARTA_EE_10_WEB.equals(profile) - && !Profile.JAKARTA_EE_10_FULL.equals(profile)) - { + if (profile.isAtMost(Profile.JAVA_EE_6_FULL)) { return false; } return true; diff --git a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/InterceptorPanel.java b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/InterceptorPanel.java index d86c324bb4f7..1ec9ee4a7cc2 100644 --- a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/InterceptorPanel.java +++ b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/InterceptorPanel.java @@ -80,18 +80,7 @@ public boolean isValid() { WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); if (webModule != null) { Profile profile = webModule.getJ2eeProfile(); - if (!Profile.JAVA_EE_7_FULL.equals(profile) - && !Profile.JAVA_EE_7_WEB.equals(profile) - && !Profile.JAVA_EE_8_FULL.equals(profile) - && !Profile.JAVA_EE_8_WEB.equals(profile) - && !Profile.JAKARTA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_8_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_1_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_1_WEB.equals(profile) - && !Profile.JAKARTA_EE_10_FULL.equals(profile) - && !Profile.JAKARTA_EE_10_WEB.equals(profile)) { + if (profile.isAtMost(Profile.JAVA_EE_6_FULL)) { setErrorMessage(NbBundle.getMessage(InterceptorPanel.class, "MSG_NoJEE7Profile")); // NOI18N return false; diff --git a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/JaxRsFilterPanel.java b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/JaxRsFilterPanel.java index dad4c5b568ab..acdf7b3f5294 100644 --- a/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/JaxRsFilterPanel.java +++ b/enterprise/websvc.rest/src/org/netbeans/modules/websvc/rest/wizard/JaxRsFilterPanel.java @@ -89,18 +89,7 @@ public boolean isValid() { WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); if (webModule != null) { Profile profile = webModule.getJ2eeProfile(); - if (!Profile.JAKARTA_EE_10_FULL.equals(profile) - && !Profile.JAKARTA_EE_10_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_1_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_1_WEB.equals(profile) - && !Profile.JAKARTA_EE_9_FULL.equals(profile) - && !Profile.JAKARTA_EE_9_WEB.equals(profile) - && !Profile.JAKARTA_EE_8_FULL.equals(profile) - && !Profile.JAKARTA_EE_8_WEB.equals(profile) - && !Profile.JAVA_EE_8_FULL.equals(profile) - && !Profile.JAVA_EE_8_WEB.equals(profile) - && !Profile.JAVA_EE_7_FULL.equals(profile) - && !Profile.JAVA_EE_7_WEB.equals(profile)) { + if (profile.isAtMost(Profile.JAVA_EE_6_FULL)) { setErrorMessage(NbBundle.getMessage(JaxRsFilterPanel.class, "MSG_NoJEE7Profile")); // NOI18N return false; diff --git a/enterprise/websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/RestSupport.java b/enterprise/websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/RestSupport.java index 5ba7a602d196..2dd61bdd2ba3 100644 --- a/enterprise/websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/RestSupport.java +++ b/enterprise/websvc.restapi/src/org/netbeans/modules/websvc/rest/spi/RestSupport.java @@ -494,22 +494,23 @@ public boolean isEESpecWithJaxRS(){ Profile profile = webModule.getJ2eeProfile(); boolean isJee6 = Profile.JAVA_EE_6_WEB.equals(profile) || Profile.JAVA_EE_6_FULL.equals(profile); - boolean isJee7 = Profile.JAVA_EE_7_WEB.equals(profile) || - Profile.JAVA_EE_7_FULL.equals(profile); - boolean isJee8 = Profile.JAVA_EE_8_WEB.equals(profile) || - Profile.JAVA_EE_8_FULL.equals(profile); - boolean isJakartaee8 = Profile.JAKARTA_EE_8_WEB.equals(profile) || - Profile.JAKARTA_EE_8_FULL.equals(profile); - boolean isJakartaee9 = Profile.JAKARTA_EE_9_WEB.equals(profile) || - Profile.JAKARTA_EE_9_FULL.equals(profile); - boolean isJakartaee91 = Profile.JAKARTA_EE_9_1_WEB.equals(profile) || - Profile.JAKARTA_EE_9_1_FULL.equals(profile); - boolean isJakartaee10 = Profile.JAKARTA_EE_10_WEB.equals(profile) || - Profile.JAKARTA_EE_10_FULL.equals(profile); // Fix for BZ#216345: JAVA_EE_6_WEB profile doesn't contain JAX-RS API - return (isJee6 && MiscPrivateUtilities.supportsTargetProfile(project, Profile.JAVA_EE_6_FULL)) || isJee7 || isJee8 || isJakartaee8 || isJakartaee9 || isJakartaee91 || isJakartaee10; + return (isJee6 && MiscPrivateUtilities.supportsTargetProfile(project, Profile.JAVA_EE_6_FULL)) || profile.isAtLeast(Profile.JAVA_EE_7_WEB); } + /** + * Is this a Jakarta EE 11 profile project? + */ + public boolean isJakartaEE11() { + WebModule webModule = WebModule.getWebModule(project.getProjectDirectory()); + if ( webModule == null ){ + return false; + } + Profile profile = webModule.getJ2eeProfile(); + return Profile.JAKARTA_EE_11_WEB.equals(profile) || + Profile.JAKARTA_EE_11_FULL.equals(profile); + } + /** * Is this JAKARTAEE10 profile project? */ diff --git a/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/IndexerCache.java b/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/IndexerCache.java index 5473d5e9c35b..e8e61687e5c5 100644 --- a/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/IndexerCache.java +++ b/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/IndexerCache.java @@ -260,12 +260,14 @@ public boolean equals(Object obj) { "text/x-persistence2.2", //NOI18N "text/x-persistence3.0", //NOI18N "text/x-persistence3.1", //NOI18N + "text/x-persistence3.2", //NOI18N "text/x-orm1.0", //NOI18N "text/x-orm2.0", //NOI18N "text/x-orm2.1", //NOI18N "text/x-orm2.2", //NOI18N "text/x-orm3.0", //NOI18N "text/x-orm3.1", //NOI18N + "text/x-orm3.2", //NOI18N "application/xhtml+xml", //NOI18N "text/x-maven-pom+xml", //NOI18N "text/x-maven-profile+xml", //NOI18N @@ -283,11 +285,13 @@ public boolean equals(Object obj) { "text/x-dd-servlet4.0", //NOI18N "text/x-dd-servlet5.0", //NOI18N "text/x-dd-servlet6.0", //NOI18N + "text/x-dd-servlet6.1", //NOI18N "text/x-dd-servlet-fragment3.0", //NOI18N "text/x-dd-servlet-fragment3.1", //NOI18N "text/x-dd-servlet-fragment4.0", //NOI18N "text/x-dd-servlet-fragment5.0", //NOI18N "text/x-dd-servlet-fragment6.0", //NOI18N + "text/x-dd-servlet-fragment6.1", //NOI18N "text/x-dd-ejbjar2.0", //NOI18N "text/x-dd-ejbjar2.1", //NOI18N "text/x-dd-ejbjar3.0", //NOI18N @@ -302,6 +306,7 @@ public boolean equals(Object obj) { "text/x-dd-client8.0", //NOI18N "text/x-dd-client9.0", //NOI18N "text/x-dd-client10.0", //NOI18N + "text/x-dd-client11.0", //NOI18N "text/x-dd-application1.4", //NOI18N "text/x-dd-application5.0", //NOI18N "text/x-dd-application6.0", //NOI18N @@ -309,6 +314,7 @@ public boolean equals(Object obj) { "text/x-dd-application8.0", //NOI18N "text/x-dd-application9.0", //NOI18N "text/x-dd-application10.0", //NOI18N + "text/x-dd-application11.0", //NOI18N "text/x-dd-sun-web+xml", //NOI18N "text/x-dd-sun-ejb-jar+xml", //NOI18N "text/x-dd-sun-application+xml", //NOI18N diff --git a/java/j2ee.persistence/licenseinfo.xml b/java/j2ee.persistence/licenseinfo.xml index a82acacb99a3..da8619e6fa97 100644 --- a/java/j2ee.persistence/licenseinfo.xml +++ b/java/j2ee.persistence/licenseinfo.xml @@ -65,7 +65,9 @@ src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_0.xsd src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_1.xsd + src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.xsd src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_0.xsd + src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.xsd Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. @@ -78,6 +80,7 @@ src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-2.2.xml src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-3.0.xml src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-3.1.xml + src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-3.2.xml src/org/netbeans/modules/j2ee/persistence/wizard/jpacontroller/resources/IllegalOrphanException.java.txt src/org/netbeans/modules/j2ee/persistence/wizard/jpacontroller/resources/NonexistentEntityException.java.txt src/org/netbeans/modules/j2ee/persistence/wizard/jpacontroller/resources/PreexistingEntityException.java.txt diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceMetadata.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceMetadata.java index f29ffd73097c..7d9d743268b0 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceMetadata.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceMetadata.java @@ -79,7 +79,9 @@ public Persistence getRoot(FileObject fo) throws java.io.IOException { } try (InputStream is=fo.getInputStream()) { - if(Persistence.VERSION_3_1.equals(version)) { + if (Persistence.VERSION_3_2.equals(version)) { + persistence = org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.Persistence.createGraph(is); + } else if(Persistence.VERSION_3_1.equals(version)) { persistence = org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.Persistence.createGraph(is); } else if(Persistence.VERSION_3_0.equals(version)) { persistence = org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.Persistence.createGraph(is); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceUtils.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceUtils.java index a91148653152..29283e85ec87 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceUtils.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/PersistenceUtils.java @@ -213,7 +213,9 @@ public static String getJPAVersion(Project target) SourceGroup firstGroup=groups[0]; FileObject fo=firstGroup.getRootFolder(); ClassPath compile=ClassPath.getClassPath(fo, ClassPath.COMPILE); - if(compile.findResource("jakarta/persistence/spi/TransformerException.class")!=null) { + if(compile.findResource("jakarta/persistence/criteria/CriteriaSelect.class")!=null) { + version=Persistence.VERSION_3_2; + } else if(compile.findResource("jakarta/persistence/spi/TransformerException.class")!=null) { version=Persistence.VERSION_3_1; } else if(compile.findResource("jakarta/persistence/Entity.class")!=null) { version=Persistence.VERSION_3_0; @@ -233,7 +235,9 @@ public static String getJPAVersion(Library lib) { List roots=lib.getContent("classpath"); ClassPath cp = ClassPathSupport.createClassPath(roots.toArray(new URL[0])); String version=null; - if(cp.findResource("jakarta/persistence/spi/TransformerException.class")!=null) { + if(cp.findResource("jakarta/persistence/criteria/CriteriaSelect.class")!=null) { + version=Persistence.VERSION_3_2; + } else if(cp.findResource("jakarta/persistence/spi/TransformerException.class")!=null) { version=Persistence.VERSION_3_1; } else if(cp.findResource("jakarta/persistence/Entity.class")!=null) { version=Persistence.VERSION_3_0; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/JPAParseUtils.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/JPAParseUtils.java index 97d340ffec97..3cd978ac0373 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/JPAParseUtils.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/JPAParseUtils.java @@ -95,7 +95,9 @@ public InputSource resolveEntity(String publicId, String systemId) { } String resource=null; // return a proper input source - if (systemId!=null && systemId.endsWith("persistence_3_0.xsd")) { + if (systemId!=null && systemId.endsWith("persistence_3_2.xsd")) { + resource="/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.xsd"; //NOI18N + } else if (systemId!=null && systemId.endsWith("persistence_3_0.xsd")) { resource="/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_0.xsd"; //NOI18N } else if (systemId!=null && systemId.endsWith("persistence_2_2.xsd")) { resource="/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_2_2.xsd"; //NOI18N diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Persistence.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Persistence.java index 310414b03092..ef2c481ca19c 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Persistence.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/common/Persistence.java @@ -29,9 +29,17 @@ public interface Persistence { static public final String VERSION = "Version"; // NOI18N static public final String PERSISTENCE_UNIT = "PersistenceUnit"; // NOI18N - // Jakarta EE 10 - JPA 3.1 (Schema v3.0) + /** + * Jakarta EE 11 - JPA 3.2 (Schema v3.2) + */ + public static final String VERSION_3_2="3.2"; //NOI18N + /** + * Jakarta EE 10 - JPA 3.1 (Schema v3.0) + */ public static final String VERSION_3_1="3.1"; //NOI18N - // Jakarta EE 9 - JPA 3.0 (Schema v3.0) + /** + * Jakarta EE 9/9.1 - JPA 3.0 (Schema v3.0) + */ public static final String VERSION_3_0="3.0"; //NOI18N // Jakarta EE 8 public static final String VERSION_2_2="2.2"; //NOI18N diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/orm/model_3_2/package-info.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/orm/model_3_2/package-info.java new file mode 100644 index 000000000000..b056713cab1a --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/orm/model_3_2/package-info.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +@Schema2Beans( + schema="../../resources/orm_3_2.xsd", + docRoot="entity-mappings", + mddFile="../../resources/orm_3_2.mdd", + schemaType=SchemaType.XML_SCHEMA, + outputType=OutputType.TRADITIONAL_BASEBEAN, + useInterfaces=true, + validate=true, + attrProp=true, + removeUnreferencedNodes=true, + java5=true +) +@org.netbeans.api.annotations.common.SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification="Generated implementation classes") +package org.netbeans.modules.j2ee.persistence.dd.orm.model_3_2; + +import org.netbeans.modules.schema2beans.Schema2Beans; +import org.netbeans.modules.schema2beans.Schema2Beans.OutputType; +import org.netbeans.modules.schema2beans.Schema2Beans.SchemaType; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/persistence/model_3_2/package-info.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/persistence/model_3_2/package-info.java new file mode 100644 index 000000000000..b777ec587497 --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/persistence/model_3_2/package-info.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +@Schema2Beans( + schema="../../resources/persistence_3_2.xsd", + mddFile="../../resources/persistence_3_2.mdd", + schemaType=SchemaType.XML_SCHEMA, + outputType=OutputType.TRADITIONAL_BASEBEAN, + useInterfaces=true, + validate=true, + attrProp=true, + removeUnreferencedNodes=true, + java5=true +) +@org.netbeans.api.annotations.common.SuppressWarnings(value="NM_SAME_SIMPLE_NAME_AS_INTERFACE", justification="Generated implementation classes") +package org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2; + +import org.netbeans.modules.schema2beans.Schema2Beans; +import org.netbeans.modules.schema2beans.Schema2Beans.OutputType; +import org.netbeans.modules.schema2beans.Schema2Beans.SchemaType; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.mdd b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.mdd new file mode 100644 index 000000000000..efbdd8208c00 --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.mdd @@ -0,0 +1,377 @@ + + + + + entity-mappings + https://jakarta.ee/xml/ns/persistence/orm + EntityMappings + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EntityMappings + + + string + http://www.w3.org/2001/XMLSchema + String + java.lang.String + + + persistence-unit-metadata + https://jakarta.ee/xml/ns/persistence/orm + PersistenceUnitMetadata + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PersistenceUnitMetadata + + + access-type + https://jakarta.ee/xml/ns/persistence/orm + AccessType + java.lang.String + + + sequence-generator + https://jakarta.ee/xml/ns/persistence/orm + SequenceGenerator + org.netbeans.modules.j2ee.persistence.api.metadata.orm.SequenceGenerator + + + table-generator + https://jakarta.ee/xml/ns/persistence/orm + TableGenerator + org.netbeans.modules.j2ee.persistence.api.metadata.orm.TableGenerator + + + named-query + https://jakarta.ee/xml/ns/persistence/orm + NamedQuery + org.netbeans.modules.j2ee.persistence.api.metadata.orm.NamedQuery + + + named-native-query + https://jakarta.ee/xml/ns/persistence/orm + NamedNativeQuery + org.netbeans.modules.j2ee.persistence.api.metadata.orm.NamedNativeQuery + + + sql-result-set-mapping + https://jakarta.ee/xml/ns/persistence/orm + SqlResultSetMapping + org.netbeans.modules.j2ee.persistence.api.metadata.orm.SqlResultSetMapping + + + mapped-superclass + https://jakarta.ee/xml/ns/persistence/orm + MappedSuperclass + org.netbeans.modules.j2ee.persistence.api.metadata.orm.MappedSuperclass + + + entity + https://jakarta.ee/xml/ns/persistence/orm + Entity + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Entity + + + embeddable + https://jakarta.ee/xml/ns/persistence/orm + Embeddable + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Embeddable + + + embeddable-attributes + https://jakarta.ee/xml/ns/persistence/orm + EmbeddableAttributes + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EmbeddableAttributes + + + basic + https://jakarta.ee/xml/ns/persistence/orm + Basic + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Basic + + + transient + https://jakarta.ee/xml/ns/persistence/orm + Transient + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Transient + + + column + https://jakarta.ee/xml/ns/persistence/orm + Column + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Column + + + lob + https://jakarta.ee/xml/ns/persistence/orm + Lob + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Lob + + + temporal + https://jakarta.ee/xml/ns/persistence/orm + Temporal + java.lang.String + + + enumerated + https://jakarta.ee/xml/ns/persistence/orm + Enumerated + java.lang.String + + + table + https://jakarta.ee/xml/ns/persistence/orm + Table + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Table + + + secondary-table + https://jakarta.ee/xml/ns/persistence/orm + SecondaryTable + org.netbeans.modules.j2ee.persistence.api.metadata.orm.SecondaryTable + + + primary-key-join-column + https://jakarta.ee/xml/ns/persistence/orm + PrimaryKeyJoinColumn + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PrimaryKeyJoinColumn + + + id-class + https://jakarta.ee/xml/ns/persistence/orm + IdClass + org.netbeans.modules.j2ee.persistence.api.metadata.orm.IdClass + + + inheritance + https://jakarta.ee/xml/ns/persistence/orm + Inheritance + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Inheritance + + + discriminator-value + https://jakarta.ee/xml/ns/persistence/orm + DiscriminatorValue + java.lang.String + + + discriminator-column + https://jakarta.ee/xml/ns/persistence/orm + DiscriminatorColumn + org.netbeans.modules.j2ee.persistence.api.metadata.orm.DiscriminatorColumn + + + emptyType + https://jakarta.ee/xml/ns/persistence/orm + EmptyType + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EmptyType + + + entity-listeners + https://jakarta.ee/xml/ns/persistence/orm + EntityListeners + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EntityListeners + + + pre-persist + https://jakarta.ee/xml/ns/persistence/orm + PrePersist + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PrePersist + + + post-persist + https://jakarta.ee/xml/ns/persistence/orm + PostPersist + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PostPersist + + + pre-remove + https://jakarta.ee/xml/ns/persistence/orm + PreRemove + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PreRemove + + + post-remove + https://jakarta.ee/xml/ns/persistence/orm + PostRemove + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PostRemove + + + pre-update + https://jakarta.ee/xml/ns/persistence/orm + PreUpdate + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PreUpdate + + + post-update + https://jakarta.ee/xml/ns/persistence/orm + PostUpdate + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PostUpdate + + + post-load + https://jakarta.ee/xml/ns/persistence/orm + PostLoad + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PostLoad + + + attribute-override + https://jakarta.ee/xml/ns/persistence/orm + AttributeOverride + org.netbeans.modules.j2ee.persistence.api.metadata.orm.AttributeOverride + + + association-override + https://jakarta.ee/xml/ns/persistence/orm + AssociationOverride + org.netbeans.modules.j2ee.persistence.api.metadata.orm.AssociationOverride + + + attributes + https://jakarta.ee/xml/ns/persistence/orm + Attributes + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Attributes + + + version + https://jakarta.ee/xml/ns/persistence/orm + Version + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Version + + + many-to-one + https://jakarta.ee/xml/ns/persistence/orm + ManyToOne + org.netbeans.modules.j2ee.persistence.api.metadata.orm.ManyToOne + + + one-to-many + https://jakarta.ee/xml/ns/persistence/orm + OneToMany + org.netbeans.modules.j2ee.persistence.api.metadata.orm.OneToMany + + + one-to-one + https://jakarta.ee/xml/ns/persistence/orm + OneToOne + org.netbeans.modules.j2ee.persistence.api.metadata.orm.OneToOne + + + many-to-many + https://jakarta.ee/xml/ns/persistence/orm + ManyToMany + org.netbeans.modules.j2ee.persistence.api.metadata.orm.ManyToMany + + + embedded + https://jakarta.ee/xml/ns/persistence/orm + Embedded + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Embedded + + + order-by + https://jakarta.ee/xml/ns/persistence/orm + OrderBy + java.lang.String + + + map-key + https://jakarta.ee/xml/ns/persistence/orm + MapKey + org.netbeans.modules.j2ee.persistence.api.metadata.orm.MapKey + + + join-table + https://jakarta.ee/xml/ns/persistence/orm + JoinTable + org.netbeans.modules.j2ee.persistence.api.metadata.orm.JoinTable + + + cascade-type + https://jakarta.ee/xml/ns/persistence/orm + CascadeType + org.netbeans.modules.j2ee.persistence.api.metadata.orm.CascadeType + + + join-column + https://jakarta.ee/xml/ns/persistence/orm + JoinColumn + org.netbeans.modules.j2ee.persistence.api.metadata.orm.JoinColumn + + + unique-constraint + https://jakarta.ee/xml/ns/persistence/orm + UniqueConstraint + org.netbeans.modules.j2ee.persistence.api.metadata.orm.UniqueConstraint + + + id + https://jakarta.ee/xml/ns/persistence/orm + Id + org.netbeans.modules.j2ee.persistence.api.metadata.orm.Id + + + embedded-id + https://jakarta.ee/xml/ns/persistence/orm + EmbeddedId + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EmbeddedId + + + generated-value + https://jakarta.ee/xml/ns/persistence/orm + GeneratedValue + org.netbeans.modules.j2ee.persistence.api.metadata.orm.GeneratedValue + + + entity-listener + https://jakarta.ee/xml/ns/persistence/orm + EntityListener + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EntityListener + + + entity-result + https://jakarta.ee/xml/ns/persistence/orm + EntityResult + org.netbeans.modules.j2ee.persistence.api.metadata.orm.EntityResult + + + column-result + https://jakarta.ee/xml/ns/persistence/orm + ColumnResult + org.netbeans.modules.j2ee.persistence.api.metadata.orm.ColumnResult + + + field-result + https://jakarta.ee/xml/ns/persistence/orm + FieldResult + org.netbeans.modules.j2ee.persistence.api.metadata.orm.FieldResult + + + query-hint + https://jakarta.ee/xml/ns/persistence/orm + QueryHint + org.netbeans.modules.j2ee.persistence.api.metadata.orm.QueryHint + + + persistence-unit-defaults + https://jakarta.ee/xml/ns/persistence/orm + PersistenceUnitDefaults + org.netbeans.modules.j2ee.persistence.api.metadata.orm.PersistenceUnitDefaults + + \ No newline at end of file diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.xsd b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.xsd new file mode 100644 index 000000000000..2856862caae8 --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/orm_3_2.xsd @@ -0,0 +1,2447 @@ + + + + + + + + ... + + + + ]]> + + + + + + + + + + + + + + + + + + The entity-mappings element is the root element of a mapping + file. It contains the following four types of elements: + + 1. The persistence-unit-metadata element contains metadata + for the entire persistence unit. It is undefined if this element + occurs in multiple mapping files within the same persistence unit. + + 2. The package, schema, catalog and access elements apply to all of + the entity, mapped-superclass and embeddable elements defined in + the same file in which they occur. + + 3. The sequence-generator, table-generator, converter, named-query, + named-native-query, named-stored-procedure-query, and + sql-result-set-mapping elements are global to the persistence + unit. It is undefined to have more than one sequence-generator + or table-generator of the same name in the same or different + mapping files in a persistence unit. It is undefined to have + more than one named-query, named-native-query, sql-result-set-mapping, + or named-stored-procedure-query of the same name in the same + or different mapping files in a persistence unit. It is also + undefined to have more than one converter for the same target + type in the same or different mapping files in a persistence unit. + + 4. The entity, mapped-superclass and embeddable elements each define + the mapping information for a managed persistent class. The mapping + information contained in these elements may be complete or it may + be partial. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Metadata that applies to the persistence unit and not just to + the mapping file in which it is contained. + + If the xml-mapping-metadata-complete element is specified, + the complete set of mapping metadata for the persistence unit + is contained in the XML mapping files for the persistence unit. + + + + + + + + + + + + + + + + + These defaults are applied to the persistence unit as a whole + unless they are overridden by local annotation or XML + element settings. + + schema - Used as the schema for all tables, secondary tables, join + tables, collection tables, sequence generators, and table + generators that apply to the persistence unit + catalog - Used as the catalog for all tables, secondary tables, join + tables, collection tables, sequence generators, and table + generators that apply to the persistence unit + delimited-identifiers - Used to treat database identifiers as + delimited identifiers. + access - Used as the access type for all managed classes in + the persistence unit + cascade-persist - Adds cascade-persist to the set of cascade options + in all entity relationships of the persistence unit + entity-listeners - List of default entity listeners to be invoked + on each entity in the persistence unit. + + + + + + + + + + + + + + + + + + + + Defines the settings and mappings for an entity. Is allowed to be + sparsely populated and used in conjunction with the annotations. + Alternatively, the metadata-complete attribute can be used to + indicate that no annotations on the entity class (and its fields + or properties) are to be processed. If this is the case then + the defaulting rules for the entity and its subelements will + be recursively applied. + + @Target(TYPE) @Retention(RUNTIME) + public @interface Entity { + String name() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This element determines how the persistence provider accesses the + state of an entity or embedded object. + + + + + + + + + + + + + + + + @Repeatable(AssociationOverrides.class) + @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) + public @interface AssociationOverride { + String name(); + JoinColumn[] joinColumns() default{}; + ForeignKey foreignKey() default @ForeignKey(PROVIDER_DEFAULT); + JoinTable joinTable() default @JoinTable; + } + + + + + + + + + + + + + + + + + + + + + + + @Repeatable(AttributeOverrides.class) + @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) + public @interface AttributeOverride { + String name(); + Column column(); + } + + + + + + + + + + + + + + + + + This element contains the entity field or property mappings. + It may be sparsely populated to include only a subset of the + fields or properties. If metadata-complete for the entity is true + then the remainder of the attributes will be defaulted according + to the default rules. + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Basic { + FetchType fetch() default FetchType.EAGER; + boolean optional() default true; + } + + + + + + + + + + + + + + + + + + + + + + + + + public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH, DETACH } + + + + + + + + + + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface CheckConstraint { + String name() default ""; + String constraint(); + String options() default ""; + } + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface CollectionTable { + String name() default ""; + String catalog() default ""; + String schema() default ""; + JoinColumn[] joinColumns() default {}; + ForeignKey foreignKey() default @ForeignKey(ConstraintMode.PROVIDER_DEFAULT); + UniqueConstraint[] uniqueConstraints() default {}; + Index[] indexes() default {}; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Column { + String name() default ""; + boolean unique() default false; + boolean nullable() default true; + boolean insertable() default true; + boolean updatable() default true; + String columnDefinition() default ""; + String options() default ""; + String table() default ""; + int length() default 255; + int precision() default 0; // decimal precision + int scale() default 0; // decimal scale + CheckConstraint[] check() default {}; + String comment() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + type() default void.class; + } + + ]]> + + + + + + + + + + + + public enum ConstraintMode { CONSTRAINT, NO_CONSTRAINT, PROVIDER_DEFAULT } + + + + + + + + + + + + + + + + targetClass(); + ColumnResult[] columns(); + } + + ]]> + + + + + + + + + + + + converter() default AttributeConverter.class; + String attributeName() default ""; + boolean disableConversion() default false; + } + + ]]> + + + + + + + + + + + + + + + + @Target({TYPE}) @Retention(RUNTIME) + public @interface Converter { + boolean autoApply() default false; + } + + + + + + + + + + + + + + + + + @Target({TYPE}) @Retention(RUNTIME) + public @interface DiscriminatorColumn { + String name() default "DTYPE"; + DiscriminatorType discriminatorType() default STRING; + String columnDefinition() default ""; + String options() default ""; + int length() default 31; + } + + + + + + + + + + + + + + + + + public enum DiscriminatorType { STRING, CHAR, INTEGER } + + + + + + + + + + + + + + + + + @Target({TYPE}) @Retention(RUNTIME) + public @interface DiscriminatorValue { + String value(); + } + + + + + + + + + + + targetClass() default void.class; + FetchType fetch() default FetchType.LAZY; + } + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Defines the settings and mappings for embeddable objects. Is + allowed to be sparsely populated and used in conjunction with + the annotations. Alternatively, the metadata-complete attribute + can be used to indicate that no annotations are to be processed + in the class. If this is the case then the defaulting rules will + be recursively applied. + + @Target({TYPE}) @Retention(RUNTIME) + public @interface Embeddable {} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Embedded {} + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface EmbeddedId {} + + + + + + + + + + + + + + + + + Defines an entity listener to be invoked at lifecycle events + for the entities that list this listener. + + + + + + + + + + + + + + + + + + + + + [] value(); + } + + ]]> + + + + + + + + + + + entityClass(); + LockModeType lockMode() default LockModeType.OPTIMISTIC; + FieldResult[] fields() default {}; + String discriminatorColumn() default ""; + } + + ]]> + + + + + + + + + + + + + + + + public enum EnumType { ORDINAL, STRING } + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Enumerated { + EnumType value() default ORDINAL; + } + + + + + + + + + + + + + public enum FetchType { LAZY, EAGER } + + + + + + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface FieldResult { + String name(); + String column(); + } + + + + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface ForeignKey { + String name() default ""; + ConstraintMode value() default CONSTRAINT; + String foreign-key-definition() default ""; + String options() default ""; + } + + Note that the elements that embed the use of the annotation + default this use as @ForeignKey(PROVIDER_DEFAULT). + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface GeneratedValue { + GenerationType strategy() default AUTO; + String generator() default ""; + } + + + + + + + + + + + + + + public enum GenerationType { TABLE, SEQUENCE, IDENTITY, UUID, AUTO } + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Id {} + + + + + + + + + + + + + + + + + + + value(); + } + + ]]> + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface Index { + String name() default ""; + String columnList(); + boolean unique() default false; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + @Target({TYPE}) @Retention(RUNTIME) + public @interface Inheritance { + InheritanceType strategy() default InheritanceType.SINGLE_TABLE; + } + + + + + + + + + + + + + public enum InheritanceType { SINGLE_TABLE, TABLE_PER_CLASS, JOINED } + + + + + + + + + + + + + + + + + @Repeatable(JoinColumns.class) + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface JoinColumn { + String name() default ""; + String referencedColumnName() default ""; + boolean unique() default false; + boolean nullable() default true; + boolean insertable() default true; + boolean updatable() default true; + String columnDefinition() default ""; + String options() default ""; + String table() default ""; + ForeignKey foreignKey() default @ForeignKey(); + CheckConstraint[] check() default {}; + String comment() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface JoinTable { + String name() default ""; + String catalog() default ""; + String schema() default ""; + JoinColumn[] joinColumns() default {}; + JoinColumn[] inverseJoinColumns() default {}; + ForeignKey foreignKey() default @ForeignKey(ConstraintMode.PROVIDER_DEFAULT); + ForeignKey inverseForeignKey() default @ForeignKey(ConstraintMode.PROVIDER_DEFAULT); + UniqueConstraint[] uniqueConstraints() default {}; + Index[] indexes() default {}; + CheckConstraint[] check() default {}; + String comment() default ""; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Lob {} + + + + + + + + + + + + public enum LockModeType implements FindOption, RefreshOption { READ, WRITE, OPTIMISTIC, OPTIMISTIC_FORCE_INCREMENT, PESSIMISTIC_READ, PESSIMISTIC_WRITE, PESSIMISTIC_FORCE_INCREMENT, NONE} + + + + + + + + + + + + + + + + + + + + + targetEntity() default void.class; + CascadeType[] cascade() default {}; + FetchType fetch() default FetchType.LAZY; + String mappedBy() default ""; + } + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + targetEntity() default void.class; + CascadeType[] cascade() default {}; + FetchType fetch() default FetchType.EAGER; + boolean optional() default true; + } + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface MapKey { + String name() default ""; + } + + + + + + + + + + + value(); + } + + ]]> + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface MapKeyColumn { + String name() default ""; + boolean unique() default false; + boolean nullable() default false; + boolean insertable() default true; + boolean updatable() default true; + String columnDefinition() default ""; + String options() default ""; + String table() default ""; + int length() default 255; + int precision() default 0; // decimal precision + int scale() default 0; // decimal scale + } + + + + + + + + + + + + + + + + + + + + + + + @Repeatable(MapKeyJoinColumns.class) + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface MapKeyJoinColumn { + String name() default ""; + String referencedColumnName() default ""; + boolean unique() default false; + boolean nullable() default false; + boolean insertable() default true; + boolean updatable() default true; + String columnDefinition() default ""; + String options() default ""; + String table() default ""; + ForeignKey foreignKey() default @ForeignKey(ConstraintMode.PROVIDER_DEFAULT); + } + + + + + + + + + + + + + + + + + + + + + + + + + Defines the settings and mappings for a mapped superclass. Is + allowed to be sparsely populated and used in conjunction with + the annotations. Alternatively, the metadata-complete attribute + can be used to indicate that no annotations are to be processed + If this is the case then the defaulting rules will be recursively + applied. + + @Target(TYPE) @Retention(RUNTIME) + public @interface MappedSuperclass {} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface NamedAttributeNode { + String value(); + String subgraph() default ""; + String keySubgraph() default ""; + } + + + + + + + + + + + + + + + @Repeatable(NamedEntityGraphs.class) + @Target({TYPE}) @Retention(RUNTIME) + public @interface NamedEntityGraph { + String name() default ""; + NamedAttributeNode[] attributeNodes() default {}; + boolean includeAllAttributes() default false; + NamedSubgraph[] subgraphs() default {}; + NamedSubGraph[] subclassSubgraphs() default {}; + } + + + + + + + + + + + + + + + + + + resultClass() default void.class; + String resultSetMapping() default ""; //named SqlResultSetMapping + EntityResult[] entities() default {}; + ConstructorResult[] classes() default {}; + ColumnResult[] columns() default {}; + } + + ]]> + + + + + + + + + + + + + + + + + + + + + @Repeatable(NamedQueries.class) + @Target({TYPE}) @Retention(RUNTIME) + public @interface NamedQuery { + String name(); + String query(); + LockModeType lockMode() default LockModeType.NONE; + QueryHint[] hints() default {}; + } + + + + + + + + + + + + + + + + + + + @Repeatable(NamedStoredProcedureQueries.class) + @Target({TYPE}) @Retention(RUNTIME) + public @interface NamedStoredProcedureQuery { + String name(); + String procedureName(); + StoredProcedureParameter[] parameters() default {}; + Class[] resultClasses() default {}; + String[] resultSetMappings() default{}; + QueryHint[] hints() default {}; + } + + + + + + + + + + + + + + + + + + + type() default void.class; + NamedAttributeNode[] attributeNodes(); + } + + ]]> + + + + + + + + + + + + + targetEntity() default void.class; + CascadeType[] cascade() default {}; + FetchType fetch() default FetchType.LAZY; + String mappedBy() default ""; + boolean orphanRemoval() default false; + } + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + targetEntity() default void.class; + CascadeType[] cascade() default {}; + FetchType fetch() default FetchType.EAGER; + boolean optional() default true; + String mappedBy() default ""; + boolean orphanRemoval() default false; + } + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface OrderBy { + String value() default ""; + } + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface OrderColumn { + String name() default ""; + boolean nullable() default true; + boolean insertable() default true; + boolean updatable() default true; + String columnDefinition() default ""; + String options() default ""; + } + + + + + + + + + + + + + + + + + + public enum ParameterMode { IN, INOUT, OUT, REF_CURSOR } + + + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PostLoad {} + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PostPersist {} + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PostRemove {} + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PostUpdate {} + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PrePersist {} + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PreRemove {} + + + + + + + + + + + + + + + + @Target({METHOD}) @Retention(RUNTIME) + public @interface PreUpdate {} + + + + + + + + + + + + + + + + @Repeatable(PrimaryKeyJoinColumns.class) + @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME) + public @interface PrimaryKeyJoinColumn { + String name() default ""; + String referencedColumnName() default ""; + String columnDefinition() default ""; + String options() default ""; + ForeignKey foreignKey() default @ForeignKey(PROVIDER_DEFAULT); + } + + + + + + + + + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface QueryHint { + String name(); + String value(); + } + + + + + + + + + + + + + + + + + @Repeatable(SecondaryTables.class) + @Target({TYPE}) @Retention(RUNTIME) + public @interface SecondaryTable { + String name(); + String catalog() default ""; + String schema() default ""; + PrimaryKeyJoinColumn[] pkJoinColumns() default {}; + ForeignKey foreignKey() default @ForeignKey(ConstraintMode.PROVIDER_DEFAULT); + UniqueConstraint[] uniqueConstraints() default {}; + Index[] indexes() default {}; + CheckConstraint[] check() default {}; + String comment() default ""; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + @Repeatable(SequenceGenerators.class) + @Target({TYPE, METHOD, FIELD, PACKAGE}) @Retention(RUNTIME) + public @interface SequenceGenerator { + String name() default ""; + String sequenceName() default ""; + String catalog() default ""; + String schema() default ""; + int initialValue() default 1; + int allocationSize() default 50; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + + + + @Repeatable(SqlResultSetMappings.class) + @Target({TYPE}) @Retention(RUNTIME) + public @interface SqlResultSetMapping { + String name(); + EntityResult[] entities() default {}; + ConstructorResult[] classes() default{}; + ColumnResult[] columns() default {}; + } + + + + + + + + + + + + + + + + + type(); + } + + ]]> + + + + + + + + + + + + + + + + @Target({TYPE}) @Retention(RUNTIME) + public @interface Table { + String name() default ""; + String catalog() default ""; + String schema() default ""; + UniqueConstraint[] uniqueConstraints() default {}; + Index[] indexes() default {}; + CheckConstraint[] check() default {}; + String comment() default ""; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + + + + @Repeatable(TableGenerators.class) + @Target({TYPE, METHOD, FIELD, PACKAGE}) @Retention(RUNTIME) + public @interface TableGenerator { + String name() default ""; + String table() default ""; + String catalog() default ""; + String schema() default ""; + String pkColumnName() default ""; + String valueColumnName() default ""; + String pkColumnValue() default ""; + int initialValue() default 0; + int allocationSize() default 50; + UniqueConstraint[] uniqueConstraints() default {}; + Indexes[] indexes() default {}; + String options() default ""; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Temporal { + TemporalType value(); + } + + + + + + + + + + + + + @Deprecated(since = "3.2") + public enum TemporalType { + DATE, // java.sql.Date + TIME, // java.sql.Time + TIMESTAMP // java.sql.Timestamp + } + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Transient {} + + + + + + + + + + + + + @Target({}) @Retention(RUNTIME) + public @interface UniqueConstraint { + String name() default ""; + String[] columnNames(); + String options() default ""; + } + + + + + + + + + + + + + + + + + @Target({METHOD, FIELD}) @Retention(RUNTIME) + public @interface Version {} + + + + + + + + + + + + diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.mdd b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.mdd new file mode 100644 index 000000000000..09375b8799c0 --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.mdd @@ -0,0 +1,100 @@ + + + + + persistence + https://jakarta.ee/xml/ns/persistence + Persistence + + PersistenceUnit + + + org.netbeans.modules.j2ee.persistence.dd.common.Persistence + + + + persistence-unit + https://jakarta.ee/xml/ns/persistence + PersistenceUnit + + Description + + + Provider + + + JtaDataSource + + + NonJtaDataSource + + + MappingFile + + + JarFile + + + Class2 + + + ExcludeUnlistedClasses + + + Properties + + + org.netbeans.modules.j2ee.persistence.dd.common.PersistenceUnit + + + + string + http://www.w3.org/2001/XMLSchema + String + java.lang.String + + + boolean + http://www.w3.org/2001/XMLSchema + Boolean + boolean + + + properties + https://jakarta.ee/xml/ns/persistence + Properties + + Property2 + + + org.netbeans.modules.j2ee.persistence.dd.common.Properties + + + + property + https://jakarta.ee/xml/ns/persistence + Property + + org.netbeans.modules.j2ee.persistence.dd.common.Property + + + diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.xsd b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.xsd new file mode 100644 index 000000000000..d4f98f8f7d04 --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/dd/resources/persistence_3_2.xsd @@ -0,0 +1,342 @@ + + + + + + + + + ... + + + ]]> + + + + + + + + + + + + + + + + + + + + + + Configuration of a persistence unit. + + + + + + + + + + + + Description of this persistence unit. + + + + + + + + + + + + Provider class that supplies EntityManagers for this + persistence unit. + + + + + + + + + + + + The container-specific name of the JTA datasource to use. + + + + + + + + + + + + The container-specific name of a non-JTA datasource to use. + + + + + + + + + + + + File containing mapping information. Loaded as a resource + by the persistence provider. + + + + + + + + + + + + Jar file that is to be scanned for managed classes. + + + + + + + + + + + + Managed class to be included in the persistence unit and + to scan for annotations. It should be annotated + with either @Entity, @Embeddable or @MappedSuperclass. + + + + + + + + + + + + When set to true then only listed classes and jars will + be scanned for persistent classes, otherwise the + enclosing jar or directory will also be scanned. + Not applicable to Java SE persistence units. + + + + + + + + + + + + Defines whether caching is enabled for the + persistence unit if caching is supported by the + persistence provider. When set to ALL, all entities + will be cached. When set to NONE, no entities will + be cached. When set to ENABLE_SELECTIVE, only entities + specified as cacheable will be cached. When set to + DISABLE_SELECTIVE, entities specified as not cacheable + will not be cached. When not specified or when set to + UNSPECIFIED, provider defaults may apply. + + + + + + + + + + + + The validation mode to be used for the persistence unit. + + + + + + + + + + + + + A list of standard and vendor-specific properties + and hints. + + + + + + + + + A name-value pair. + + + + + + + + + + + + + + + + + + + + Name used in code to reference this persistence unit. + + + + + + + + + + + + Type of transactions used by EntityManagers from this + persistence unit. + + + + + + + + + + + + + + + + + + + public enum PersistenceUnitTransactionType {JTA, RESOURCE_LOCAL}; + + + + + + + + + + + + + + + + public enum SharedCacheMode { ALL, NONE, ENABLE_SELECTIVE, DISABLE_SELECTIVE, UNSPECIFIED}; + + + + + + + + + + + + + + + + + + + public enum ValidationMode { AUTO, CALLBACK, NONE}; + + + + + + + + + + + diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/Provider.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/Provider.java index 41ad72980a0d..f95a429ede68 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/Provider.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/Provider.java @@ -83,7 +83,9 @@ public boolean isOnClassPath(ClassPath cp) boolean ret = cp.findResource(classRelativePath) != null; if(ret && version != null) { - if(Persistence.VERSION_3_1.equals(version)){ + if(Persistence.VERSION_3_2.equals(version)) { + ret &= cp.findResource("jakarta/persistence/criteria/CriteriaSelect.class") != null; + } else if(Persistence.VERSION_3_1.equals(version)){ ret &= cp.findResource("jakarta/persistence/spi/TransformerException.class") != null; } else if(Persistence.VERSION_3_0.equals(version)){ ret &= cp.findResource("jakarta/persistence/Entity.class") != null; @@ -140,7 +142,9 @@ public final Property getTableGenerationProperty(String strategy, String version return null; } Property result; - if (Persistence.VERSION_3_1.equals(version)) { + if (Persistence.VERSION_3_2.equals(version)) { + result = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.Property(); + } else if (Persistence.VERSION_3_1.equals(version)) { result = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.Property(); } else if (Persistence.VERSION_3_0.equals(version)) { result = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.Property(); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ProviderUtil.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ProviderUtil.java index 8d9720d8e455..eca1564d3782 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ProviderUtil.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/provider/ProviderUtil.java @@ -68,6 +68,7 @@ public class ProviderUtil { public static final Provider HIBERNATE_PROVIDER2_2 = new HibernateProvider(Persistence.VERSION_2_2); public static final Provider HIBERNATE_PROVIDER3_0 = new HibernateProvider(Persistence.VERSION_3_0); public static final Provider HIBERNATE_PROVIDER3_1 = new HibernateProvider(Persistence.VERSION_3_1); + public static final Provider HIBERNATE_PROVIDER3_2 = new HibernateProvider(Persistence.VERSION_3_2); public static final Provider TOPLINK_PROVIDER1_0 = ToplinkProvider.create(Persistence.VERSION_1_0); public static final Provider ECLIPSELINK_PROVIDER1_0 = new EclipseLinkProvider(Persistence.VERSION_1_0); public static final Provider ECLIPSELINK_PROVIDER2_0 = new EclipseLinkProvider(Persistence.VERSION_2_0); @@ -75,6 +76,7 @@ public class ProviderUtil { public static final Provider ECLIPSELINK_PROVIDER2_2 = new EclipseLinkProvider(Persistence.VERSION_2_2); public static final Provider ECLIPSELINK_PROVIDER3_0 = new EclipseLinkProvider(Persistence.VERSION_3_0); public static final Provider ECLIPSELINK_PROVIDER3_1 = new EclipseLinkProvider(Persistence.VERSION_3_1); + public static final Provider ECLIPSELINK_PROVIDER3_2 = new EclipseLinkProvider(Persistence.VERSION_3_2); public static final Provider KODO_PROVIDER = new KodoProvider(); public static final Provider DATANUCLEUS_PROVIDER1_0 = new DataNucleusProvider(Persistence.VERSION_1_0); public static final Provider DATANUCLEUS_PROVIDER2_0 = new DataNucleusProvider(Persistence.VERSION_2_0); @@ -82,6 +84,7 @@ public class ProviderUtil { public static final Provider DATANUCLEUS_PROVIDER2_2 = new DataNucleusProvider(Persistence.VERSION_2_2); public static final Provider DATANUCLEUS_PROVIDER3_0 = new DataNucleusProvider(Persistence.VERSION_3_0); public static final Provider DATANUCLEUS_PROVIDER3_1 = new DataNucleusProvider(Persistence.VERSION_3_1); + public static final Provider DATANUCLEUS_PROVIDER3_2 = new DataNucleusProvider(Persistence.VERSION_3_2); public static final Provider OPENJPA_PROVIDER1_0 = new OpenJPAProvider(Persistence.VERSION_1_0); public static final Provider OPENJPA_PROVIDER2_0 = new OpenJPAProvider(Persistence.VERSION_2_0); public static final Provider OPENJPA_PROVIDER2_1 = new OpenJPAProvider(Persistence.VERSION_2_1); @@ -92,6 +95,7 @@ public class ProviderUtil { public static final Provider DEFAULT_PROVIDER2_2 = new DefaultProvider(Persistence.VERSION_2_2); public static final Provider DEFAULT_PROVIDER3_0 = new DefaultProvider(Persistence.VERSION_3_0); public static final Provider DEFAULT_PROVIDER3_1 = new DefaultProvider(Persistence.VERSION_3_1); + public static final Provider DEFAULT_PROVIDER3_2 = new DefaultProvider(Persistence.VERSION_3_2); /** * TopLink provider using the provider class that was used in NetBeans 5.5. Needed * for maintaining backwards compatibility with persistence units created in 5.5. @@ -120,29 +124,32 @@ public static Provider getProvider(String providerClass, Project project) { return getContainerManagedProvider(project); } - String ver = PersistenceUtils.getJPAVersion(project); - ver = ver == null ? Persistence.VERSION_3_1 : ver; - - Provider ret = null; - switch(ver) { - case Persistence.VERSION_1_0: - ret = DEFAULT_PROVIDER; - break; - case Persistence.VERSION_2_0: - ret = DEFAULT_PROVIDER2_0; - break; - case Persistence.VERSION_2_1: - ret = DEFAULT_PROVIDER2_1; - break; - case Persistence.VERSION_2_2: - ret = DEFAULT_PROVIDER2_2; - break; - case Persistence.VERSION_3_0: - ret = DEFAULT_PROVIDER3_0; - break; - case Persistence.VERSION_3_1: - ret = DEFAULT_PROVIDER3_1; - }// some unknown provider + String ver = PersistenceUtils.getJPAVersion(project); + ver = ver == null ? Persistence.VERSION_3_1 : ver; + + Provider ret = null; + switch(ver) { + case Persistence.VERSION_1_0: + ret = DEFAULT_PROVIDER; + break; + case Persistence.VERSION_2_0: + ret = DEFAULT_PROVIDER2_0; + break; + case Persistence.VERSION_2_1: + ret = DEFAULT_PROVIDER2_1; + break; + case Persistence.VERSION_2_2: + ret = DEFAULT_PROVIDER2_2; + break; + case Persistence.VERSION_3_0: + ret = DEFAULT_PROVIDER3_0; + break; + case Persistence.VERSION_3_1: + ret = DEFAULT_PROVIDER3_1; + break; + case Persistence.VERSION_3_2: + ret = DEFAULT_PROVIDER3_2; + }// some unknown provider for (Provider each : getAllProviders()) { if (each.getProviderClass().equals(providerClass.trim())) { @@ -296,7 +303,9 @@ public static void setTableGeneration(PersistenceUnit persistenceUnit, String ta return; } String version = Persistence.VERSION_1_0; - if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { + if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) { + version = Persistence.VERSION_3_2; + } else if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { version = Persistence.VERSION_3_1; } else if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) { version = Persistence.VERSION_3_0; @@ -394,7 +403,9 @@ public static PersistenceUnit buildPersistenceUnit(String name, Provider provide Parameters.notNull("provider", provider); Parameters.notNull("connection", connection); PersistenceUnit persistenceUnit = null; - if (Persistence.VERSION_3_1.equals(version)) { + if (Persistence.VERSION_3_2.equals(version)) { + persistenceUnit = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit(); + } else if (Persistence.VERSION_3_1.equals(version)) { persistenceUnit = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit(); } else if (Persistence.VERSION_3_0.equals(version)) { persistenceUnit = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit(); @@ -468,7 +479,9 @@ public static void setDatabaseConnection(PersistenceUnit persistenceUnit, Provid Property[] properties = getProperties(persistenceUnit); String version = Persistence.VERSION_1_0; - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) {// we have persistence unit with specific version, should use it + version = Persistence.VERSION_3_2; + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_1; } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_0; @@ -579,7 +592,9 @@ public static Provider getProvider(PersistenceUnit persistenceUnit) { public static Provider getProvider(PersistenceUnit persistenceUnit, Provider[] providers) { Parameters.notNull("persistenceUnit", persistenceUnit); //NOI18N String version = Persistence.VERSION_1_0; - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) {// we have persistence unit with specific version, should use it + version = Persistence.VERSION_3_2; + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_1; } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_0; @@ -627,23 +642,25 @@ public static Provider getProvider(PersistenceUnit persistenceUnit, Provider[] p } } } - if(top_provider == null) { - switch (version) { - case Persistence.VERSION_1_0: - return DEFAULT_PROVIDER; - case Persistence.VERSION_2_0: - return DEFAULT_PROVIDER2_0; - case Persistence.VERSION_2_1: - return DEFAULT_PROVIDER2_1; - case Persistence.VERSION_2_2: - return DEFAULT_PROVIDER2_2; - case Persistence.VERSION_3_0: - return DEFAULT_PROVIDER3_0; - default: - return DEFAULT_PROVIDER3_1; - }// some unknown provider - } - return top_provider; + if(top_provider == null) { + switch (version) { + case Persistence.VERSION_1_0: + return DEFAULT_PROVIDER; + case Persistence.VERSION_2_0: + return DEFAULT_PROVIDER2_0; + case Persistence.VERSION_2_1: + return DEFAULT_PROVIDER2_1; + case Persistence.VERSION_2_2: + return DEFAULT_PROVIDER2_2; + case Persistence.VERSION_3_0: + return DEFAULT_PROVIDER3_0; + case Persistence.VERSION_3_2: + return DEFAULT_PROVIDER3_2; + default: + return DEFAULT_PROVIDER3_1; + }// some unknown provider + } + return top_provider; } //analize properties for best match provider version @@ -802,7 +819,9 @@ public static void addPersistenceUnit(PersistenceUnit persistenceUnit, Project p */ public static void addPersistenceUnit(PersistenceUnit persistenceUnit, Project project, FileObject root) throws InvalidPersistenceXmlException { String version = Persistence.VERSION_1_0; - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) {// we have persistence unit with specific version, should use it + version = Persistence.VERSION_3_2; + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_1; } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_0; @@ -1017,6 +1036,9 @@ public static String getDatasourceName(PersistenceUnit pu) { */ public static Provider[] getAllProviders() { return new Provider[] { + DATANUCLEUS_PROVIDER3_2, + ECLIPSELINK_PROVIDER3_2, + HIBERNATE_PROVIDER3_2, DATANUCLEUS_PROVIDER3_1, ECLIPSELINK_PROVIDER3_1, HIBERNATE_PROVIDER3_1, diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/entitymanagergenerator/EntityManagerGenerationStrategySupport.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/entitymanagergenerator/EntityManagerGenerationStrategySupport.java index 1927e1a33e7e..847f1434aea5 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/entitymanagergenerator/EntityManagerGenerationStrategySupport.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/spi/entitymanagergenerator/EntityManagerGenerationStrategySupport.java @@ -459,7 +459,9 @@ private String getPersistenceVersion() { } else { version = Persistence.VERSION_1_0; } - if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it + if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) {// we have persistence unit with specific version, should use it + version = Persistence.VERSION_3_2; + } else if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_1; } else if (persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) {// we have persistence unit with specific version, should use it version = Persistence.VERSION_3_0; diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/layer.xml b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/layer.xml index a6dd6b2d443d..d0200cc1dc9f 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/layer.xml +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/layer.xml @@ -222,6 +222,7 @@ + diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-3.2.xml b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-3.2.xml new file mode 100644 index 000000000000..c0726c2267b7 --- /dev/null +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/ui/resources/persistence-3.2.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PUDataObject.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PUDataObject.java index 0c82fb35c9f2..7a2fdfca63f2 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PUDataObject.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PUDataObject.java @@ -184,7 +184,10 @@ public boolean parseDocument() { Persistence newPersistence; Persistence cleanPersistence; try (InputStream is = getEditorSupport().getInputStream()) { - if(Persistence.VERSION_3_1.equals(version)) { + if(Persistence.VERSION_3_2.equals(version)) { + newPersistence = org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.Persistence.createGraph(is); + cleanPersistence = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.Persistence(); + } else if(Persistence.VERSION_3_1.equals(version)) { newPersistence = org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.Persistence.createGraph(is); cleanPersistence = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.Persistence(); } else if(Persistence.VERSION_3_0.equals(version)) { diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCatalog.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCatalog.java index 8841f85dcef9..273dd90ece32 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCatalog.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCatalog.java @@ -60,6 +60,7 @@ private void initialize(){ schemas.add(new SchemaInfo("persistence_2_1.xsd", RESOURCE_PATH, PERSISTENCE_NS)); schemas.add(new SchemaInfo("persistence_2_2.xsd", RESOURCE_PATH, PERSISTENCE_NS)); schemas.add(new SchemaInfo("persistence_3_0.xsd", RESOURCE_PATH, PERSISTENCE_JAKARTA_NS)); + schemas.add(new SchemaInfo("persistence_3_2.xsd", RESOURCE_PATH, PERSISTENCE_JAKARTA_NS)); // orm schemas.add(new SchemaInfo("orm_1_0.xsd", RESOURCE_PATH, ORM_OLD_NS)); schemas.add(new SchemaInfo("orm_2_0.xsd", RESOURCE_PATH, ORM_OLD_NS)); @@ -67,6 +68,7 @@ private void initialize(){ schemas.add(new SchemaInfo("orm_2_2.xsd", RESOURCE_PATH, ORM_NS)); schemas.add(new SchemaInfo("orm_3_0.xsd", RESOURCE_PATH, ORM_JAKARTA_NS)); schemas.add(new SchemaInfo("orm_3_1.xsd", RESOURCE_PATH, ORM_JAKARTA_NS)); + schemas.add(new SchemaInfo("orm_3_2.xsd", RESOURCE_PATH, ORM_JAKARTA_NS)); } @Override diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java index 15ca760ca94f..0fa119bd5420 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceCfgProperties.java @@ -198,6 +198,10 @@ public class PersistenceCfgProperties { //EclipseLink JPA 3.1 (initially just copy of 3.0) possiblePropertyValues.put(ProviderUtil.ECLIPSELINK_PROVIDER3_1, new HashMap<>()); possiblePropertyValues.get(ProviderUtil.ECLIPSELINK_PROVIDER3_1).putAll(possiblePropertyValues.get(ProviderUtil.ECLIPSELINK_PROVIDER3_0)); + + //EclipseLink JPA 3.2 (initially just copy of 3.0) + possiblePropertyValues.put(ProviderUtil.ECLIPSELINK_PROVIDER3_2, new HashMap<>()); + possiblePropertyValues.get(ProviderUtil.ECLIPSELINK_PROVIDER3_2).putAll(possiblePropertyValues.get(ProviderUtil.ECLIPSELINK_PROVIDER3_0)); //Hibernate JPA 1.0 possiblePropertyValues.put(ProviderUtil.HIBERNATE_PROVIDER1_0, new HashMap()); @@ -244,6 +248,10 @@ public class PersistenceCfgProperties { possiblePropertyValues.put(ProviderUtil.HIBERNATE_PROVIDER3_1, new HashMap()); possiblePropertyValues.get(ProviderUtil.HIBERNATE_PROVIDER3_1).putAll(possiblePropertyValues.get(ProviderUtil.HIBERNATE_PROVIDER3_0)); + //Hibernate JPA 3.2 (initially just copy of 3.0) + possiblePropertyValues.put(ProviderUtil.HIBERNATE_PROVIDER3_2, new HashMap()); + possiblePropertyValues.get(ProviderUtil.HIBERNATE_PROVIDER3_2).putAll(possiblePropertyValues.get(ProviderUtil.HIBERNATE_PROVIDER3_0)); + //OpenJPA JPA 1.0 possiblePropertyValues.put(ProviderUtil.OPENJPA_PROVIDER1_0, new HashMap()); possiblePropertyValues.get(ProviderUtil.OPENJPA_PROVIDER1_0).put(ProviderUtil.OPENJPA_PROVIDER1_0.getJdbcUrl(), null); @@ -601,6 +609,10 @@ public class PersistenceCfgProperties { possiblePropertyValues.put(ProviderUtil.DATANUCLEUS_PROVIDER3_1, new HashMap()); possiblePropertyValues.get(ProviderUtil.DATANUCLEUS_PROVIDER3_1).putAll(possiblePropertyValues.get(ProviderUtil.DATANUCLEUS_PROVIDER3_0)); + //DataNucleus JPA 3.2 (initially just copy of 3.0) + possiblePropertyValues.put(ProviderUtil.DATANUCLEUS_PROVIDER3_2, new HashMap()); + possiblePropertyValues.get(ProviderUtil.DATANUCLEUS_PROVIDER3_2).putAll(possiblePropertyValues.get(ProviderUtil.DATANUCLEUS_PROVIDER3_0)); + //toplink 1.0 possiblePropertyValues.put(ProviderUtil.TOPLINK_PROVIDER1_0, new HashMap()); possiblePropertyValues.get(ProviderUtil.TOPLINK_PROVIDER1_0).put(ProviderUtil.TOPLINK_PROVIDER1_0.getJdbcUrl(), null); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceToolBarMVElement.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceToolBarMVElement.java index 186f4a0d41b6..6dd8c8368a3d 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceToolBarMVElement.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceToolBarMVElement.java @@ -404,7 +404,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { PersistenceUnit punit; boolean useModelgen = false; String modelGenLib = null; - if(Persistence.VERSION_3_1.equals(version)) { + if(Persistence.VERSION_3_2.equals(version)) { + useModelgen = true; + punit = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit(); + } else if(Persistence.VERSION_3_1.equals(version)) { useModelgen = true; punit = new org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit(); } else if(Persistence.VERSION_3_0.equals(version)) { diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceUnitPanel.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceUnitPanel.java index 31d7dc0f25cc..960cf2df6ce0 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceUnitPanel.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/PersistenceUnitPanel.java @@ -211,7 +211,9 @@ private void setVisiblePanel(){ } private void initCache(){ String caching = ""; - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) { + caching = ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) persistenceUnit).getSharedCacheMode(); + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { caching = ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) persistenceUnit).getSharedCacheMode(); } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) { caching = ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) persistenceUnit).getSharedCacheMode(); @@ -249,7 +251,9 @@ else if(cachingTypes[3].equals(caching)) private void initValidation(){ String validation = ""; - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) { + validation = ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) persistenceUnit).getValidationMode(); + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { validation = ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) persistenceUnit).getValidationMode(); } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) { validation = ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) persistenceUnit).getValidationMode(); @@ -532,7 +536,9 @@ else if(source==ddNoValidation) vMode = validationModes[2]; } if(!"".equals(cType)) { - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) { + ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) persistenceUnit).setSharedCacheMode(cType); + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) persistenceUnit).setSharedCacheMode(cType); } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) { ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) persistenceUnit).setSharedCacheMode(cType); @@ -544,7 +550,9 @@ else if(source==ddNoValidation) ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_2_0.PersistenceUnit) persistenceUnit).setSharedCacheMode(cType); } } else if(!"".equals(vMode)) { - if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { + if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) { + ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_2.PersistenceUnit) persistenceUnit).setValidationMode(vMode); + } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) { ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_1.PersistenceUnit) persistenceUnit).setValidationMode(vMode); } else if(persistenceUnit instanceof org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) { ((org.netbeans.modules.j2ee.persistence.dd.persistence.model_3_0.PersistenceUnit) persistenceUnit).setValidationMode(vMode); diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/Util.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/Util.java index 4101fca1ee3d..01f71945a303 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/Util.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/unit/Util.java @@ -80,7 +80,8 @@ public static ArrayList getAvailPropNames(Persistence persistence, Provi } } } - if(Persistence.VERSION_3_1.equals(persistence.getVersion()) + if(Persistence.VERSION_3_2.equals(persistence.getVersion()) + || Persistence.VERSION_3_1.equals(persistence.getVersion()) || Persistence.VERSION_3_0.equals(persistence.getVersion())) { availProps.replaceAll(s -> s.replace(PersistenceUnit.JAVAX_NAMESPACE, PersistenceUnit.JAKARTA_NAMESPACE)); } diff --git a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java index 30ae85ea9d66..5b7f1d219fda 100644 --- a/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java +++ b/java/j2ee.persistence/src/org/netbeans/modules/j2ee/persistence/util/PersistenceProviderComboboxHelper.java @@ -180,7 +180,8 @@ private void initCombo(JComboBox providerCombo) { || Util.isJPAVersionSupported(project, Persistence.VERSION_2_1) || Util.isJPAVersionSupported(project, Persistence.VERSION_2_2) || Util.isJPAVersionSupported(project, Persistence.VERSION_3_0) - || Util.isJPAVersionSupported(project, Persistence.VERSION_3_1)) + || Util.isJPAVersionSupported(project, Persistence.VERSION_3_1) + || Util.isJPAVersionSupported(project, Persistence.VERSION_3_2)) && (defProviderVersion == null || defProviderVersion.equals(Persistence.VERSION_1_0));//jpa 3.1 is supported by default (or first) is jpa1.0 or udefined version provider if(specialCase){ for (int i = 1; i