[368506] Allow to change the default package for interfaces when creating new session EJBs
diff --git a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF index db1db08..9819e2b 100644 --- a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF
@@ -78,7 +78,7 @@ org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)", org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)", org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)", - org.eclipse.wst.web;bundle-version="[1.1.401,1.2.0)", + org.eclipse.wst.web;bundle-version="[1.1.500,1.2.0)", com.ibm.icu;bundle-version="3.8.1", org.eclipse.wst.common.environment;bundle-version="[1.0.100,1.1.0)", org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java index 31f9493..daaf38f 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java +++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/JavaEEPreferencesInitializer.java
@@ -1,3 +1,14 @@ +/******************************************************************************* + * Copyright (c) 2009, 2012 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ + package org.eclipse.jst.j2ee.internal.plugin; @@ -126,6 +137,16 @@ * Used to determine if the business interface annotations should be to the business interfaces during EJB creation. */ static final String EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE = IProductConstants.EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE; + + /** + * Indicates a suffix that should be used for the package of all the interfaces when creating session beans. + * For example, if the qualified bean class name is com.test.Bean1, and the value of #EJB_INTERFACE_PACKAGE_SUFFIX is + * test2, then the default local business interface name will be com.test.test2.Bean1Local + * Default value is an empty string. + */ + static final String EJB_INTERFACE_PACKAGE_SUFFIX = IProductConstants.EJB_INTERFACE_PACKAGE_SUFFIX; + + } @@ -250,6 +271,8 @@ String ejbBusinessInterfaceAnnotationInInterface = ProductManager.getProperty(IProductConstants.EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE); boolean ejbBusinessInterfaceAnnotationInInterfaceDefault = (ejbBusinessInterfaceAnnotationInInterface != null )? Boolean.parseBoolean(ejbBusinessInterfaceAnnotationInInterface) : Defaults.EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE; node.putBoolean(Keys.EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE, ejbBusinessInterfaceAnnotationInInterfaceDefault); + + node.put(Keys.EJB_INTERFACE_PACKAGE_SUFFIX, ProductManager.getProperty(IProductConstants.EJB_INTERFACE_PACKAGE_SUFFIX)); }
diff --git a/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/IProductConstants.java b/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/IProductConstants.java index 3f84491..de3d0d8 100644 --- a/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/IProductConstants.java +++ b/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/IProductConstants.java
@@ -40,6 +40,8 @@ public static final String EE6_CONNECTOR_GENERATE_DD = "ee6_connector_generate_dd"; //$NON-NLS-1$ public static final String EJB_BUSINESS_INTERFACE_ANNOTATION_IN_BEAN = "ejb_business_interaface_annotation_in_bean"; //$NON-NLS-1$ public static final String EJB_BUSINESS_INTERFACE_ANNOTATION_IN_INTERFACE = "ejb_business_interaface_annotation_in_interface"; //$NON-NLS-1$ + public static final String EJB_INTERFACE_PACKAGE_SUFFIX = "ejb_interface_package_suffix"; //$NON-NLS-1$ + /** * @deprecated Do not use. The ALLOW_CLASSPATH_DEP preference has been deprecated and its ability to disable dynamic manifest updates will soon be removed.
diff --git a/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/ProductManager.java b/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/ProductManager.java index 1a54a74..53583f5 100644 --- a/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/ProductManager.java +++ b/plugins/org.eclipse.wst.web/static_web_project/org/eclipse/wst/project/facet/ProductManager.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2006 IBM Corporation and others. + * Copyright (c) 2005, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -107,6 +107,8 @@ return SHOW_JAVA_EE_MODULE_DEPENDENCY_PAGE; else if (key.equals(IProductConstants.DYNAMIC_WEB_GENERATE_DD)) return DYNAMIC_WEB_GENERATE_DD; + else if (key.equals(IProductConstants.EJB_INTERFACE_PACKAGE_SUFFIX)) + return ""; //$NON-NLS-1$ } return value; }