Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 241667 | Differences between
and this patch

Collapse All | Expand All

(-)ejb_ui/org/eclipse/jst/ejb/ui/internal/wizard/NewSessionBeanClassWizardPage.java (-6 / +11 lines)
Lines 12-17 Link Here
12
12
13
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL;
13
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL;
14
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_BUSINESS_INTERFACE;
14
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_BUSINESS_INTERFACE;
15
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.NO_INTERFACE;
15
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE;
16
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE;
16
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_BUSINESS_INTERFACE;
17
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_BUSINESS_INTERFACE;
17
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.STATE_TYPE;
18
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.STATE_TYPE;
Lines 38-43 Link Here
38
	private Combo stateTypeCombo;
39
	private Combo stateTypeCombo;
39
	private Button remoteCheckbox;
40
	private Button remoteCheckbox;
40
	private Button localCheckbox;
41
	private Button localCheckbox;
42
	private Button noInterfaceCheckbox;
41
	private Text remoteInterfaceName;
43
	private Text remoteInterfaceName;
42
	private Text localInterfaceName;
44
	private Text localInterfaceName;
43
45
Lines 79-90 Link Here
79
		remoteCheckbox = new Button(group, SWT.CHECK);
81
		remoteCheckbox = new Button(group, SWT.CHECK);
80
		remoteCheckbox.setLayoutData(gdhspan(1));
82
		remoteCheckbox.setLayoutData(gdhspan(1));
81
		remoteCheckbox.setText(IEjbWizardConstants.REMOTE_BUSINESS_INTERFACE);
83
		remoteCheckbox.setText(IEjbWizardConstants.REMOTE_BUSINESS_INTERFACE);
82
		GridData data2 = new GridData(GridData.FILL_HORIZONTAL);
83
		data2.horizontalSpan = 1;
84
		remoteInterfaceName = new Text(group, SWT.SINGLE | SWT.BORDER);
85
		synchHelper.synchCheckbox(remoteCheckbox, REMOTE, null);
84
		synchHelper.synchCheckbox(remoteCheckbox, REMOTE, null);
86
		
85
		remoteInterfaceName = new Text(group, SWT.SINGLE | SWT.BORDER);
87
		remoteInterfaceName.setLayoutData(data2);
86
		remoteInterfaceName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
88
		synchHelper.synchText(remoteInterfaceName, REMOTE_BUSINESS_INTERFACE, null);
87
		synchHelper.synchText(remoteInterfaceName, REMOTE_BUSINESS_INTERFACE, null);
89
88
90
		localCheckbox = new Button(group, SWT.CHECK);
89
		localCheckbox = new Button(group, SWT.CHECK);
Lines 92-99 Link Here
92
		localCheckbox.setText(IEjbWizardConstants.LOCAL_BUSINESS_INTERFACE);
91
		localCheckbox.setText(IEjbWizardConstants.LOCAL_BUSINESS_INTERFACE);
93
		synchHelper.synchCheckbox(localCheckbox, LOCAL, null);
92
		synchHelper.synchCheckbox(localCheckbox, LOCAL, null);
94
		localInterfaceName = new Text(group, SWT.SINGLE | SWT.BORDER);
93
		localInterfaceName = new Text(group, SWT.SINGLE | SWT.BORDER);
95
		localInterfaceName.setLayoutData(data2);
94
		localInterfaceName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
96
		synchHelper.synchText(localInterfaceName, LOCAL_BUSINESS_INTERFACE, null);
95
		synchHelper.synchText(localInterfaceName, LOCAL_BUSINESS_INTERFACE, null);
96
		
97
		noInterfaceCheckbox = new Button(group, SWT.CHECK);
98
		noInterfaceCheckbox.setLayoutData(gdhspan(2));
99
		noInterfaceCheckbox.setText(IEjbWizardConstants.NO_INTERFACE);
100
		synchHelper.synchCheckbox(noInterfaceCheckbox, NO_INTERFACE, null);
97
	}
101
	}
98
102
99
	private static GridData gdhspan(int span) {
103
	private static GridData gdhspan(int span) {
Lines 111-116 Link Here
111
		names.add(INTERFACES);
115
		names.add(INTERFACES);
112
		names.add(LOCAL_BUSINESS_INTERFACE);
116
		names.add(LOCAL_BUSINESS_INTERFACE);
113
		names.add(REMOTE_BUSINESS_INTERFACE);
117
		names.add(REMOTE_BUSINESS_INTERFACE);
118
		names.add(NO_INTERFACE);
114
		
119
		
115
		return names.toArray(new String[0]);
120
		return names.toArray(new String[0]);
116
	}
121
	}
(-)ejb_ui/org/eclipse/jst/ejb/ui/internal/wizard/IEjbWizardConstants.java (+1 lines)
Lines 27-32 Link Here
27
	public static final String REMOTE_BUSINESS_INTERFACE_LABEL = EJBUIMessages.REMOTE_BUSINESS_INTERFACE_LABEL;
27
	public static final String REMOTE_BUSINESS_INTERFACE_LABEL = EJBUIMessages.REMOTE_BUSINESS_INTERFACE_LABEL;
28
	public static final String LOCAL_BUSINESS_INTERFACE = EJBUIMessages.LOCAL_BUSINESS_INTERFACE;
28
	public static final String LOCAL_BUSINESS_INTERFACE = EJBUIMessages.LOCAL_BUSINESS_INTERFACE;
29
	public static final String LOCAL_BUSINESS_INTERFACE_LABEL = EJBUIMessages.LOCAL_BUSINESS_INTERFACE_LABEL;
29
	public static final String LOCAL_BUSINESS_INTERFACE_LABEL = EJBUIMessages.LOCAL_BUSINESS_INTERFACE_LABEL;
30
	public static final String NO_INTERFACE = EJBUIMessages.NO_INTERFACE;
30
	public static final String EJB_NAME = EJBUIMessages.EJB_NAME;
31
	public static final String EJB_NAME = EJBUIMessages.EJB_NAME;
31
	
32
	
32
	public final static String TRANSACTION_TYPE_CONTAINER = EJBUIMessages.TRANSACTION_TYPE_CONTAINER;
33
	public final static String TRANSACTION_TYPE_CONTAINER = EJBUIMessages.TRANSACTION_TYPE_CONTAINER;
(-)property_files/ejb_ui.properties (+1 lines)
Lines 58-63 Link Here
58
REMOTE_HOME_INTERFACE_LABEL=Remote Home Interface:
58
REMOTE_HOME_INTERFACE_LABEL=Remote Home Interface:
59
LOCAL_BUSINESS_INTERFACE=&Local
59
LOCAL_BUSINESS_INTERFACE=&Local
60
LOCAL_BUSINESS_INTERFACE_LABEL=Local Business Interface:
60
LOCAL_BUSINESS_INTERFACE_LABEL=Local Business Interface:
61
NO_INTERFACE=No-&interface
61
LOCAL_HOME_INTERFACE_LABEL=Local Home Interface:
62
LOCAL_HOME_INTERFACE_LABEL=Local Home Interface:
62
LOCAL_COMPONENT_INTERFACE_CODE=L
63
LOCAL_COMPONENT_INTERFACE_CODE=L
63
LOCAL_HOME_INTERFACE_CODE=LH
64
LOCAL_HOME_INTERFACE_CODE=LH
(-)ejb_ui/org/eclipse/jst/ejb/ui/internal/util/EJBUIMessages.java (+1 lines)
Lines 73-78 Link Here
73
	public static String LOCAL_BUSINESS_INTERFACE;
73
	public static String LOCAL_BUSINESS_INTERFACE;
74
	public static String LOCAL_BUSINESS_INTERFACE_LABEL;
74
	public static String LOCAL_BUSINESS_INTERFACE_LABEL;
75
	public static String LOCAL_HOME_INTERFACE_LABEL;
75
	public static String LOCAL_HOME_INTERFACE_LABEL;
76
	public static String NO_INTERFACE;
76
	public static String EJB_NAME;
77
	public static String EJB_NAME;
77
	public static String TRANSACTION_TYPE_CONTAINER;
78
	public static String TRANSACTION_TYPE_CONTAINER;
78
	public static String TRANSACTION_TYPE_BEAN;
79
	public static String TRANSACTION_TYPE_BEAN;
(-)ejb/org/eclipse/jst/j2ee/ejb/internal/operations/CreateSessionBeanTemplateModel.java (-1 / +10 lines)
Lines 14-20 Link Here
14
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewEnterpriseBeanClassDataModelProperties.MAPPED_NAME;
14
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewEnterpriseBeanClassDataModelProperties.MAPPED_NAME;
15
import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES;
15
import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES;
16
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_HOME;
16
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_HOME;
17
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_HOME;
17
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.*;
18
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.STATE_TYPE;
18
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.STATE_TYPE;
19
19
20
import java.util.ArrayList;
20
import java.util.ArrayList;
Lines 32-37 Link Here
32
	public static final String QUALIFIED_STATELESS = "javax.ejb.Stateless"; //$NON-NLS-1$
32
	public static final String QUALIFIED_STATELESS = "javax.ejb.Stateless"; //$NON-NLS-1$
33
	public static final String QUALIFIED_STATEFUL = "javax.ejb.Stateful"; //$NON-NLS-1$
33
	public static final String QUALIFIED_STATEFUL = "javax.ejb.Stateful"; //$NON-NLS-1$
34
	public static final String QUALIFIED_SINGLETON = "javax.ejb.Singleton"; //$NON-NLS-1$
34
	public static final String QUALIFIED_SINGLETON = "javax.ejb.Singleton"; //$NON-NLS-1$
35
	public static final String QUALIFIED_LOCAL_BEAN = "javax.ejb.LocalBean"; //$NON-NLS-1$
35
	public static final String QUALIFIED_LOCAL = "javax.ejb.Local"; //$NON-NLS-1$
36
	public static final String QUALIFIED_LOCAL = "javax.ejb.Local"; //$NON-NLS-1$
36
	public static final String QUALIFIED_REMOTE = "javax.ejb.Remote"; //$NON-NLS-1$
37
	public static final String QUALIFIED_REMOTE = "javax.ejb.Remote"; //$NON-NLS-1$
37
	public static final String QUALIFIED_REMOTE_HOME = "javax.ejb.RemoteHome"; //$NON-NLS-1$
38
	public static final String QUALIFIED_REMOTE_HOME = "javax.ejb.RemoteHome"; //$NON-NLS-1$
Lines 83-88 Link Here
83
			collection.add(localHomeClassName);
84
			collection.add(localHomeClassName);
84
		}
85
		}
85
		
86
		
87
		if (isNoInterfaceChecked()) {
88
			collection.add(QUALIFIED_LOCAL_BEAN);
89
		}
90
		
86
		List<BusinessInterface> interfaces = getBusinessInterfaces();
91
		List<BusinessInterface> interfaces = getBusinessInterfaces();
87
		for (BusinessInterface iface : interfaces) {
92
		for (BusinessInterface iface : interfaces) {
88
			if (iface.isLocal() && iface.exists()) {
93
			if (iface.isLocal() && iface.exists()) {
Lines 160-165 Link Here
160
	public boolean isRemoteHomeChecked() {
165
	public boolean isRemoteHomeChecked() {
161
		return dataModel.getBooleanProperty(REMOTE_HOME);
166
		return dataModel.getBooleanProperty(REMOTE_HOME);
162
	}
167
	}
168
169
	public boolean isNoInterfaceChecked() {
170
		return dataModel.getBooleanProperty(NO_INTERFACE);
171
	}
163
	
172
	
164
	public Map<String, String> getClassAnnotationParams() {
173
	public Map<String, String> getClassAnnotationParams() {
165
		Map<String, String> result = new Hashtable<String, String>();
174
		Map<String, String> result = new Hashtable<String, String>();
(-)ejb/org/eclipse/jst/j2ee/ejb/internal/operations/INewSessionBeanClassDataModelProperties.java (-2 / +12 lines)
Lines 29-40 Link Here
29
	 * business interface. The default is false.
29
	 * business interface. The default is false.
30
	 */
30
	 */
31
	public static final String REMOTE = "INewSessionBeanClassDataModelProperties.REMOTE"; //$NON-NLS-1$
31
	public static final String REMOTE = "INewSessionBeanClassDataModelProperties.REMOTE"; //$NON-NLS-1$
32
	
32
33
	/**
33
	/**
34
	 * Optional, boolean property used to specify whether to generate a local
34
	 * Optional, boolean property used to specify whether to generate a local
35
	 * business interface. The default is true.
35
	 * business interface. The default is true for EJB 3.0 projects, otherwise -
36
	 * false.
36
	 */
37
	 */
37
	public static final String LOCAL = "INewSessionBeanClassDataModelProperties.LOCAL"; //$NON-NLS-1$
38
	public static final String LOCAL = "INewSessionBeanClassDataModelProperties.LOCAL"; //$NON-NLS-1$
39
40
	/**
41
	 * Optional, boolean property used to specify whether to generate a
42
	 * no-interface client view. The default is true for EJB 3.1 projects and
43
	 * later, otherwise - false.
44
	 * 
45
	 * @since 3.2
46
	 */
47
	public static final String NO_INTERFACE = "INewSessionBeanClassDataModelProperties.NO_INTERFACE"; //$NON-NLS-1$
38
	
48
	
39
	/**
49
	/**
40
	 * Optional, boolean property used to specify whether to generate a EJB 2.x
50
	 * Optional, boolean property used to specify whether to generate a EJB 2.x
(-)ejb/org/eclipse/jst/j2ee/ejb/internal/operations/SessionBeanTemplate.java (-64 / +71 lines)
Lines 39-77 Link Here
39
  protected final String TEXT_22 = ", "; //$NON-NLS-1$
39
  protected final String TEXT_22 = ", "; //$NON-NLS-1$
40
  protected final String TEXT_23 = ".class"; //$NON-NLS-1$
40
  protected final String TEXT_23 = ".class"; //$NON-NLS-1$
41
  protected final String TEXT_24 = " })"; //$NON-NLS-1$
41
  protected final String TEXT_24 = " })"; //$NON-NLS-1$
42
  protected final String TEXT_25 = NL + "@LocalHome("; //$NON-NLS-1$
42
  protected final String TEXT_25 = NL + "@LocalBean"; //$NON-NLS-1$
43
  protected final String TEXT_26 = ".class)"; //$NON-NLS-1$
43
  protected final String TEXT_26 = NL + "@LocalHome("; //$NON-NLS-1$
44
  protected final String TEXT_27 = NL + "@RemoteHome("; //$NON-NLS-1$
44
  protected final String TEXT_27 = ".class)"; //$NON-NLS-1$
45
  protected final String TEXT_28 = ".class)"; //$NON-NLS-1$
45
  protected final String TEXT_28 = NL + "@RemoteHome("; //$NON-NLS-1$
46
  protected final String TEXT_29 = NL + "public "; //$NON-NLS-1$
46
  protected final String TEXT_29 = ".class)"; //$NON-NLS-1$
47
  protected final String TEXT_30 = "abstract "; //$NON-NLS-1$
47
  protected final String TEXT_30 = NL + "public "; //$NON-NLS-1$
48
  protected final String TEXT_31 = "final "; //$NON-NLS-1$
48
  protected final String TEXT_31 = "abstract "; //$NON-NLS-1$
49
  protected final String TEXT_32 = "class "; //$NON-NLS-1$
49
  protected final String TEXT_32 = "final "; //$NON-NLS-1$
50
  protected final String TEXT_33 = " extends "; //$NON-NLS-1$
50
  protected final String TEXT_33 = "class "; //$NON-NLS-1$
51
  protected final String TEXT_34 = " implements "; //$NON-NLS-1$
51
  protected final String TEXT_34 = " extends "; //$NON-NLS-1$
52
  protected final String TEXT_35 = ", "; //$NON-NLS-1$
52
  protected final String TEXT_35 = " implements "; //$NON-NLS-1$
53
  protected final String TEXT_36 = " {"; //$NON-NLS-1$
53
  protected final String TEXT_36 = ", "; //$NON-NLS-1$
54
  protected final String TEXT_37 = NL + NL + "    /**" + NL + "     * Default constructor. " + NL + "     */" + NL + "    public "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
54
  protected final String TEXT_37 = " {"; //$NON-NLS-1$
55
  protected final String TEXT_38 = "() {" + NL + "        // TODO Auto-generated constructor stub" + NL + "    }"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
55
  protected final String TEXT_38 = NL + NL + "    /**" + NL + "     * Default constructor. " + NL + "     */" + NL + "    public "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
56
  protected final String TEXT_39 = NL + "       " + NL + "    /**" + NL + "     * @see "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
56
  protected final String TEXT_39 = "() {" + NL + "        // TODO Auto-generated constructor stub" + NL + "    }";  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
57
  protected final String TEXT_40 = "#"; //$NON-NLS-1$
57
  protected final String TEXT_40 = NL + "       " + NL + "    /**" + NL + "     * @see "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
58
  protected final String TEXT_41 = "("; //$NON-NLS-1$
58
  protected final String TEXT_41 = "#"; //$NON-NLS-1$
59
  protected final String TEXT_42 = ")" + NL + "     */" + NL + "    public "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
59
  protected final String TEXT_42 = "("; //$NON-NLS-1$
60
  protected final String TEXT_43 = "("; //$NON-NLS-1$
60
  protected final String TEXT_43 = ")" + NL + "     */" + NL + "    public "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
61
  protected final String TEXT_44 = ") {" + NL + "        super("; //$NON-NLS-1$ //$NON-NLS-2$
61
  protected final String TEXT_44 = "("; //$NON-NLS-1$
62
  protected final String TEXT_45 = ");" + NL + "        // TODO Auto-generated constructor stub" + NL + "    }"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
62
  protected final String TEXT_45 = ") {" + NL + "        super("; //$NON-NLS-1$ //$NON-NLS-2$
63
  protected final String TEXT_46 = NL + NL + "\t/**" + NL + "     * @see "; //$NON-NLS-1$ //$NON-NLS-2$
63
  protected final String TEXT_46 = ");" + NL + "        // TODO Auto-generated constructor stub" + NL + "    }";  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
64
  protected final String TEXT_47 = "#"; //$NON-NLS-1$
64
  protected final String TEXT_47 = NL + NL + "\t/**" + NL + "     * @see ";  //$NON-NLS-1$//$NON-NLS-2$
65
  protected final String TEXT_48 = "("; //$NON-NLS-1$
65
  protected final String TEXT_48 = "#"; //$NON-NLS-1$
66
  protected final String TEXT_49 = ")" + NL + "     */" + NL + "    public "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
66
  protected final String TEXT_49 = "("; //$NON-NLS-1$
67
  protected final String TEXT_50 = " "; //$NON-NLS-1$
67
  protected final String TEXT_50 = ")" + NL + "     */" + NL + "    public "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
68
  protected final String TEXT_51 = "("; //$NON-NLS-1$
68
  protected final String TEXT_51 = " "; //$NON-NLS-1$
69
  protected final String TEXT_52 = ") {" + NL + "        // TODO Auto-generated method stub"; //$NON-NLS-1$ //$NON-NLS-2$
69
  protected final String TEXT_52 = "("; //$NON-NLS-1$
70
  protected final String TEXT_53 = NL + "\t\t\treturn "; //$NON-NLS-1$
70
  protected final String TEXT_53 = ") {" + NL + "        // TODO Auto-generated method stub"; //$NON-NLS-1$ //$NON-NLS-2$
71
  protected final String TEXT_54 = ";"; //$NON-NLS-1$
71
  protected final String TEXT_54 = NL + "\t\t\treturn "; //$NON-NLS-1$
72
  protected final String TEXT_55 = NL + "    }"; //$NON-NLS-1$
72
  protected final String TEXT_55 = ";"; //$NON-NLS-1$
73
  protected final String TEXT_56 = NL + NL + "}"; //$NON-NLS-1$
73
  protected final String TEXT_56 = NL + "    }"; //$NON-NLS-1$
74
  protected final String TEXT_57 = NL;
74
  protected final String TEXT_57 = NL + NL + "}"; //$NON-NLS-1$
75
  protected final String TEXT_58 = NL;
75
76
76
  public String generate(Object argument)
77
  public String generate(Object argument)
77
  {
78
  {
Lines 188-235 Link Here
188
    
189
    
189
	}
190
	}
190
	
191
	
191
	if (model.isLocalHomeChecked()) {
192
	if (model.isNoInterfaceChecked()) {
192
193
193
    stringBuffer.append(TEXT_25);
194
    stringBuffer.append(TEXT_25);
194
    stringBuffer.append(model.getLocalHomeClassSimpleName());
195
    
196
	}
197
		
198
	if (model.isLocalHomeChecked()) {
199
195
    stringBuffer.append(TEXT_26);
200
    stringBuffer.append(TEXT_26);
201
    stringBuffer.append(model.getLocalHomeClassSimpleName());
202
    stringBuffer.append(TEXT_27);
196
    
203
    
197
	}
204
	}
198
205
199
	if (model.isRemoteHomeChecked()) {
206
	if (model.isRemoteHomeChecked()) {
200
207
201
    stringBuffer.append(TEXT_27);
202
    stringBuffer.append(model.getRemoteHomeClassSimpleName());
203
    stringBuffer.append(TEXT_28);
208
    stringBuffer.append(TEXT_28);
209
    stringBuffer.append(model.getRemoteHomeClassSimpleName());
210
    stringBuffer.append(TEXT_29);
204
    
211
    
205
	}
212
	}
206
213
207
    
214
    
208
	if (model.isPublic()) { 
215
	if (model.isPublic()) { 
209
216
210
    stringBuffer.append(TEXT_29);
217
    stringBuffer.append(TEXT_30);
211
     
218
     
212
	} 
219
	} 
213
220
214
	if (model.isAbstract()) { 
221
	if (model.isAbstract()) { 
215
222
216
    stringBuffer.append(TEXT_30);
223
    stringBuffer.append(TEXT_31);
217
    
224
    
218
	}
225
	}
219
226
220
	if (model.isFinal()) {
227
	if (model.isFinal()) {
221
228
222
    stringBuffer.append(TEXT_31);
229
    stringBuffer.append(TEXT_32);
223
    
230
    
224
	}
231
	}
225
232
226
    stringBuffer.append(TEXT_32);
233
    stringBuffer.append(TEXT_33);
227
    stringBuffer.append( model.getClassName() );
234
    stringBuffer.append( model.getClassName() );
228
    
235
    
229
	String superClass = model.getSuperclassName();
236
	String superClass = model.getSuperclassName();
230
 	if (superClass != null && superClass.length() > 0) {
237
 	if (superClass != null && superClass.length() > 0) {
231
238
232
    stringBuffer.append(TEXT_33);
239
    stringBuffer.append(TEXT_34);
233
    stringBuffer.append( superClass );
240
    stringBuffer.append( superClass );
234
    
241
    
235
	}
242
	}
Lines 237-243 Link Here
237
	List<String> interfaces = model.getInterfaces(); 
244
	List<String> interfaces = model.getInterfaces(); 
238
 	if ( interfaces.size() > 0) { 
245
 	if ( interfaces.size() > 0) { 
239
246
240
    stringBuffer.append(TEXT_34);
247
    stringBuffer.append(TEXT_35);
241
    
248
    
242
	}
249
	}
243
	
250
	
Lines 245-251 Link Here
245
   		String INTERFACE = interfaces.get(i);
252
   		String INTERFACE = interfaces.get(i);
246
   		if (i > 0) {
253
   		if (i > 0) {
247
254
248
    stringBuffer.append(TEXT_35);
255
    stringBuffer.append(TEXT_36);
249
    
256
    
250
		}
257
		}
251
258
Lines 253-265 Link Here
253
    
260
    
254
	}
261
	}
255
262
256
    stringBuffer.append(TEXT_36);
263
    stringBuffer.append(TEXT_37);
257
     
264
     
258
	if (!model.hasEmptySuperclassConstructor()) { 
265
	if (!model.hasEmptySuperclassConstructor()) { 
259
266
260
    stringBuffer.append(TEXT_37);
261
    stringBuffer.append( model.getClassName() );
262
    stringBuffer.append(TEXT_38);
267
    stringBuffer.append(TEXT_38);
268
    stringBuffer.append( model.getClassName() );
269
    stringBuffer.append(TEXT_39);
263
     
270
     
264
	} 
271
	} 
265
272
Lines 268-286 Link Here
268
		for (Constructor constructor : constructors) {
275
		for (Constructor constructor : constructors) {
269
			if (constructor.isPublic() || constructor.isProtected()) { 
276
			if (constructor.isPublic() || constructor.isProtected()) { 
270
277
271
    stringBuffer.append(TEXT_39);
272
    stringBuffer.append( model.getSuperclassName() );
273
    stringBuffer.append(TEXT_40);
278
    stringBuffer.append(TEXT_40);
274
    stringBuffer.append( model.getSuperclassName() );
279
    stringBuffer.append( model.getSuperclassName() );
275
    stringBuffer.append(TEXT_41);
280
    stringBuffer.append(TEXT_41);
276
    stringBuffer.append( constructor.getParamsForJavadoc() );
281
    stringBuffer.append( model.getSuperclassName() );
277
    stringBuffer.append(TEXT_42);
282
    stringBuffer.append(TEXT_42);
278
    stringBuffer.append( model.getClassName() );
283
    stringBuffer.append( constructor.getParamsForJavadoc() );
279
    stringBuffer.append(TEXT_43);
284
    stringBuffer.append(TEXT_43);
280
    stringBuffer.append( constructor.getParamsForDeclaration() );
285
    stringBuffer.append( model.getClassName() );
281
    stringBuffer.append(TEXT_44);
286
    stringBuffer.append(TEXT_44);
282
    stringBuffer.append( constructor.getParamsForCall() );
287
    stringBuffer.append( constructor.getParamsForDeclaration() );
283
    stringBuffer.append(TEXT_45);
288
    stringBuffer.append(TEXT_45);
289
    stringBuffer.append( constructor.getParamsForCall() );
290
    stringBuffer.append(TEXT_46);
284
    
291
    
285
			} 
292
			} 
286
		} 
293
		} 
Lines 290-325 Link Here
290
	if (model.shouldImplementAbstractMethods()) {
297
	if (model.shouldImplementAbstractMethods()) {
291
		for (Method method : model.getUnimplementedMethods()) { 
298
		for (Method method : model.getUnimplementedMethods()) { 
292
299
293
    stringBuffer.append(TEXT_46);
294
    stringBuffer.append( method.getContainingJavaClass() );
295
    stringBuffer.append(TEXT_47);
300
    stringBuffer.append(TEXT_47);
296
    stringBuffer.append( method.getName() );
301
    stringBuffer.append( method.getContainingJavaClass() );
297
    stringBuffer.append(TEXT_48);
302
    stringBuffer.append(TEXT_48);
298
    stringBuffer.append( method.getParamsForJavadoc() );
303
    stringBuffer.append( method.getName() );
299
    stringBuffer.append(TEXT_49);
304
    stringBuffer.append(TEXT_49);
300
    stringBuffer.append( method.getReturnType() );
305
    stringBuffer.append( method.getParamsForJavadoc() );
301
    stringBuffer.append(TEXT_50);
306
    stringBuffer.append(TEXT_50);
302
    stringBuffer.append( method.getName() );
307
    stringBuffer.append( method.getReturnType() );
303
    stringBuffer.append(TEXT_51);
308
    stringBuffer.append(TEXT_51);
304
    stringBuffer.append( method.getParamsForDeclaration() );
309
    stringBuffer.append( method.getName() );
305
    stringBuffer.append(TEXT_52);
310
    stringBuffer.append(TEXT_52);
311
    stringBuffer.append( method.getParamsForDeclaration() );
312
    stringBuffer.append(TEXT_53);
306
     
313
     
307
			String defaultReturnValue = method.getDefaultReturnValue();
314
			String defaultReturnValue = method.getDefaultReturnValue();
308
			if (defaultReturnValue != null) { 
315
			if (defaultReturnValue != null) { 
309
316
310
    stringBuffer.append(TEXT_53);
311
    stringBuffer.append( defaultReturnValue );
312
    stringBuffer.append(TEXT_54);
317
    stringBuffer.append(TEXT_54);
318
    stringBuffer.append( defaultReturnValue );
319
    stringBuffer.append(TEXT_55);
313
    
320
    
314
			} 
321
			} 
315
322
316
    stringBuffer.append(TEXT_55);
323
    stringBuffer.append(TEXT_56);
317
     
324
     
318
		}
325
		}
319
	} 
326
	} 
320
327
321
    stringBuffer.append(TEXT_56);
322
    stringBuffer.append(TEXT_57);
328
    stringBuffer.append(TEXT_57);
329
    stringBuffer.append(TEXT_58);
323
    return stringBuffer.toString();
330
    return stringBuffer.toString();
324
  }
331
  }
325
}
332
}
(-)ejb/org/eclipse/jst/j2ee/ejb/internal/operations/NewSessionBeanClassDataModelProvider.java (-44 / +49 lines)
Lines 15-20 Link Here
15
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_COMPONENT_INTERFACE;
15
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_COMPONENT_INTERFACE;
16
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_HOME;
16
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_HOME;
17
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_HOME_INTERFACE;
17
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.LOCAL_HOME_INTERFACE;
18
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.NO_INTERFACE;
18
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE;
19
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE;
19
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_BUSINESS_INTERFACE;
20
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_BUSINESS_INTERFACE;
20
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_COMPONENT_INTERFACE;
21
import static org.eclipse.jst.j2ee.ejb.internal.operations.INewSessionBeanClassDataModelProperties.REMOTE_COMPONENT_INTERFACE;
Lines 32-38 Link Here
32
33
33
import org.eclipse.core.resources.IProject;
34
import org.eclipse.core.resources.IProject;
34
import org.eclipse.core.resources.ResourcesPlugin;
35
import org.eclipse.core.resources.ResourcesPlugin;
35
import org.eclipse.core.runtime.CoreException;
36
import org.eclipse.core.runtime.IStatus;
36
import org.eclipse.core.runtime.IStatus;
37
import org.eclipse.core.runtime.Status;
37
import org.eclipse.core.runtime.Status;
38
import org.eclipse.jdt.core.IJavaProject;
38
import org.eclipse.jdt.core.IJavaProject;
Lines 57-63 Link Here
57
import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
57
import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
58
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
58
import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
59
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
59
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
60
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
61
60
62
public class NewSessionBeanClassDataModelProvider extends NewEnterpriseBeanClassDataModelProvider {
61
public class NewSessionBeanClassDataModelProvider extends NewEnterpriseBeanClassDataModelProvider {
63
62
Lines 89-94 Link Here
89
		propertyNames.add(LOCAL_BUSINESS_INTERFACE);
88
		propertyNames.add(LOCAL_BUSINESS_INTERFACE);
90
		propertyNames.add(REMOTE);
89
		propertyNames.add(REMOTE);
91
		propertyNames.add(LOCAL);
90
		propertyNames.add(LOCAL);
91
		propertyNames.add(NO_INTERFACE);
92
		propertyNames.add(STATE_TYPE);
92
		propertyNames.add(STATE_TYPE);
93
		propertyNames.add(REMOTE_HOME);
93
		propertyNames.add(REMOTE_HOME);
94
		propertyNames.add(LOCAL_HOME);
94
		propertyNames.add(LOCAL_HOME);
Lines 120-136 Link Here
120
		else if (propertyName.equals(REMOTE))
120
		else if (propertyName.equals(REMOTE))
121
			return Boolean.FALSE;
121
			return Boolean.FALSE;
122
		else if (propertyName.equals(LOCAL))
122
		else if (propertyName.equals(LOCAL))
123
			return Boolean.TRUE;
123
			return new Boolean(!ejb31OrLater());
124
		else if (propertyName.equals(NO_INTERFACE)) 
125
			return new Boolean(ejb31OrLater());
124
		else if (propertyName.equals(STATE_TYPE))
126
		else if (propertyName.equals(STATE_TYPE))
125
			return StateType.STATELESS.toString(); 
127
			return StateType.STATELESS.toString(); 
126
		else if (propertyName.equals(INTERFACES)) {
128
		else if (propertyName.equals(INTERFACES)) {
127
			List<BusinessInterface> listResult = new ArrayList<BusinessInterface>();
129
			List<BusinessInterface> listResult = new ArrayList<BusinessInterface>();
128
			String className = getStringProperty(QUALIFIED_CLASS_NAME);
130
			String className = getStringProperty(QUALIFIED_CLASS_NAME);
129
			if ((Boolean) getProperty(REMOTE) && className.length() > 0) {
131
			if (getBooleanProperty(REMOTE) && className.length() > 0) {
130
				BusinessInterface remoteInterface = new BusinessInterface(getStringProperty(REMOTE_BUSINESS_INTERFACE), BusinessInterfaceType.REMOTE);
132
				BusinessInterface remoteInterface = new BusinessInterface(getStringProperty(REMOTE_BUSINESS_INTERFACE), BusinessInterfaceType.REMOTE);
131
				listResult.add(remoteInterface);
133
				listResult.add(remoteInterface);
132
			}
134
			}
133
			if ((Boolean) getProperty(LOCAL) && className.length() > 0) {
135
			if (getBooleanProperty(LOCAL) && className.length() > 0) {
134
				BusinessInterface localInterface = new BusinessInterface(getStringProperty(LOCAL_BUSINESS_INTERFACE), BusinessInterfaceType.LOCAL);
136
				BusinessInterface localInterface = new BusinessInterface(getStringProperty(LOCAL_BUSINESS_INTERFACE), BusinessInterfaceType.LOCAL);
135
				listResult.add(localInterface);
137
				listResult.add(localInterface);
136
			}
138
			}
Lines 188-194 Link Here
188
		// Call super to set the property on the data model
190
		// Call super to set the property on the data model
189
		boolean result = super.propertySet(propertyName, propertyValue);
191
		boolean result = super.propertySet(propertyName, propertyValue);
190
192
191
		if (propertyName.equals(REMOTE)) {
193
		if (PROJECT_NAME.equals(propertyName)) {
194
			IDataModel dataModel = getDataModel();
195
			dataModel.notifyPropertyChange(REMOTE, IDataModel.DEFAULT_CHG);
196
			dataModel.notifyPropertyChange(LOCAL, IDataModel.DEFAULT_CHG);
197
			dataModel.notifyPropertyChange(NO_INTERFACE, IDataModel.DEFAULT_CHG);
198
			dataModel.notifyPropertyChange(REMOTE_BUSINESS_INTERFACE, IDataModel.DEFAULT_CHG);
199
			dataModel.notifyPropertyChange(LOCAL_BUSINESS_INTERFACE, IDataModel.DEFAULT_CHG);
200
		} else if (CLASS_NAME.equals(propertyName) || JAVA_PACKAGE.equals(propertyName)) {
201
			IDataModel dataModel = getDataModel();
202
			dataModel.notifyPropertyChange(REMOTE_BUSINESS_INTERFACE, IDataModel.DEFAULT_CHG);
203
			dataModel.notifyPropertyChange(LOCAL_BUSINESS_INTERFACE, IDataModel.DEFAULT_CHG);
204
			dataModel.notifyPropertyChange(REMOTE_HOME_INTERFACE, IDataModel.DEFAULT_CHG);
205
			dataModel.notifyPropertyChange(LOCAL_HOME_INTERFACE, IDataModel.DEFAULT_CHG);
206
			dataModel.notifyPropertyChange(REMOTE_COMPONENT_INTERFACE, IDataModel.DEFAULT_CHG);
207
			dataModel.notifyPropertyChange(LOCAL_COMPONENT_INTERFACE, IDataModel.DEFAULT_CHG);
208
		} else if (propertyName.equals(REMOTE)) {
192
			if (!getDataModel().isPropertySet(INTERFACES)) {
209
			if (!getDataModel().isPropertySet(INTERFACES)) {
193
				getDataModel().notifyPropertyChange(INTERFACES, IDataModel.DEFAULT_CHG);
210
				getDataModel().notifyPropertyChange(INTERFACES, IDataModel.DEFAULT_CHG);
194
			} else {
211
			} else {
Lines 196-232 Link Here
196
			}
213
			}
197
			getDataModel().notifyPropertyChange(REMOTE_BUSINESS_INTERFACE, IDataModel.ENABLE_CHG);
214
			getDataModel().notifyPropertyChange(REMOTE_BUSINESS_INTERFACE, IDataModel.ENABLE_CHG);
198
215
199
		}
216
		} else if (propertyName.equals(LOCAL)) {
200
		if (propertyName.equals(LOCAL)) {
201
			if (!getDataModel().isPropertySet(INTERFACES)) {
217
			if (!getDataModel().isPropertySet(INTERFACES)) {
202
				getDataModel().notifyPropertyChange(INTERFACES, IDataModel.DEFAULT_CHG);
218
				getDataModel().notifyPropertyChange(INTERFACES, IDataModel.DEFAULT_CHG);
203
			} else {
219
			} else {
204
				updateBusinessInterfaces(LOCAL);
220
				updateBusinessInterfaces(LOCAL);
205
			}
221
			}
206
			getDataModel().notifyPropertyChange(LOCAL_BUSINESS_INTERFACE, IDataModel.ENABLE_CHG);
222
			getDataModel().notifyPropertyChange(LOCAL_BUSINESS_INTERFACE, IDataModel.ENABLE_CHG);
207
		}
223
		} else if (REMOTE_BUSINESS_INTERFACE.equals(propertyName)) {
208
		if (REMOTE_BUSINESS_INTERFACE.equals(propertyName))
209
		{
210
			if(getRemoteProperty() != null){
224
			if(getRemoteProperty() != null){
211
				getRemoteProperty().setFullyQualifiedName(propertyValue.toString());
225
				getRemoteProperty().setFullyQualifiedName(propertyValue.toString());
212
			}
226
			}
213
		}
227
		} else if (LOCAL_BUSINESS_INTERFACE.equals(propertyName)) {
214
		else if (LOCAL_BUSINESS_INTERFACE.equals(propertyName))
215
		{
216
			if(getLocalProperty() != null){
228
			if(getLocalProperty() != null){
217
				getLocalProperty().setFullyQualifiedName(propertyValue.toString());
229
				getLocalProperty().setFullyQualifiedName(propertyValue.toString());
218
			}
230
			}
219
		}
231
		} 
220
		else if (CLASS_NAME.equals(propertyName) || JAVA_PACKAGE.equals(propertyName))
221
		{
222
			IDataModel dataModel = getDataModel();
223
			dataModel.notifyPropertyChange(REMOTE_BUSINESS_INTERFACE, IDataModel.DEFAULT_CHG);
224
			dataModel.notifyPropertyChange(LOCAL_BUSINESS_INTERFACE, IDataModel.DEFAULT_CHG);
225
			dataModel.notifyPropertyChange(REMOTE_HOME_INTERFACE, IDataModel.DEFAULT_CHG);
226
			dataModel.notifyPropertyChange(LOCAL_HOME_INTERFACE, IDataModel.DEFAULT_CHG);
227
			dataModel.notifyPropertyChange(REMOTE_COMPONENT_INTERFACE, IDataModel.DEFAULT_CHG);
228
			dataModel.notifyPropertyChange(LOCAL_COMPONENT_INTERFACE, IDataModel.DEFAULT_CHG);
229
		}
230
232
231
		return result;
233
		return result;
232
	}
234
	}
Lines 262-275 Link Here
262
		return super.getValidPropertyDescriptors(propertyName);
264
		return super.getValidPropertyDescriptors(propertyName);
263
	}
265
	}
264
266
265
	private boolean ejb31OrLater() {
266
		IProject project = getTargetProject();
267
		IProjectFacetVersion facetVersion = JavaEEProjectUtilities.getProjectFacetVersion(project, IJ2EEFacetConstants.EJB);
268
		int version = J2EEVersionUtil.convertVersionStringToInt(facetVersion.getVersionString());
269
		int ejb31version = J2EEVersionUtil.convertVersionStringToInt(IJ2EEFacetConstants.EJB_31.getVersionString());
270
		return version >= ejb31version;
271
	}
272
273
	private void updateBusinessInterfaces(String propertyName) {
267
	private void updateBusinessInterfaces(String propertyName) {
274
		List<BusinessInterface> list = (List<BusinessInterface>) getProperty(INTERFACES);
268
		List<BusinessInterface> list = (List<BusinessInterface>) getProperty(INTERFACES);
275
		if (propertyName.equals(REMOTE)) {
269
		if (propertyName.equals(REMOTE)) {
Lines 314-319 Link Here
314
	public IStatus validate(String propertyName) {
308
	public IStatus validate(String propertyName) {
315
		if (STATE_TYPE.equals(propertyName)) {
309
		if (STATE_TYPE.equals(propertyName)) {
316
			return validateStateType();			
310
			return validateStateType();			
311
		} else if (NO_INTERFACE.equals(propertyName)) {
312
			if (getBooleanProperty(NO_INTERFACE)) {
313
				return validateNoInterface();
314
			}
317
		} else if (LOCAL_BUSINESS_INTERFACE.equals(propertyName)) {
315
		} else if (LOCAL_BUSINESS_INTERFACE.equals(propertyName)) {
318
			if (getBooleanProperty(LOCAL)) {
316
			if (getBooleanProperty(LOCAL)) {
319
				return validateEjbInterface(getStringProperty(propertyName));
317
				return validateEjbInterface(getStringProperty(propertyName));
Lines 337-343 Link Here
337
	protected IStatus validateStateType() {
335
	protected IStatus validateStateType() {
338
		String value = getStringProperty(STATE_TYPE);
336
		String value = getStringProperty(STATE_TYPE);
339
		if (StateType.SINGLETON.toString().equals(value) && !ejb31OrLater()) {
337
		if (StateType.SINGLETON.toString().equals(value) && !ejb31OrLater()) {
340
			return WTPCommonPlugin.createErrorStatus(EJBCreationResourceHandler.ERR_SINGLETON_ALLOWED_ONLY_FOR_31_AND_LATER);
338
			return WTPCommonPlugin.createErrorStatus(EJBCreationResourceHandler.ERR_SINGLETON_NOT_ALLOWED);
339
		}
340
		return Status.OK_STATUS;
341
	}
342
343
	protected IStatus validateNoInterface() {
344
		if (!ejb31OrLater()) {
345
			return WTPCommonPlugin.createErrorStatus(EJBCreationResourceHandler.ERR_NO_INTERFACE_NOT_ALLOWED);
341
		}
346
		}
342
		return Status.OK_STATUS;
347
		return Status.OK_STATUS;
343
	}
348
	}
Lines 448-455 Link Here
448
453
449
	protected IStatus validateInterfacesList() {
454
	protected IStatus validateInterfacesList() {
450
		List<BusinessInterface> list = (List<BusinessInterface>) getProperty(INTERFACES);
455
		List<BusinessInterface> list = (List<BusinessInterface>) getProperty(INTERFACES);
451
		if (list.isEmpty() && isEJB30Project()) {
456
		if (list.isEmpty() && !ejb31OrLater()) {
452
			return new Status(IStatus.WARNING, EjbPlugin.PLUGIN_ID, EJBCreationResourceHandler.WRN_NO_BUSINESS_INTERFACE); 
457
			return new Status(IStatus.WARNING, EjbPlugin.PLUGIN_ID, EJBCreationResourceHandler.WRN_NO_CLIENT_VIEW); 
453
		}
458
		}
454
		return Status.OK_STATUS;
459
		return Status.OK_STATUS;
455
	}
460
	}
Lines 493-505 Link Here
493
		}
498
		}
494
		return WTPCommonPlugin.OK_STATUS;
499
		return WTPCommonPlugin.OK_STATUS;
495
	}
500
	}
496
	
497
	private boolean isEJB30Project() {
498
		try {
499
			return ProjectFacetsManager.create(getTargetProject()).hasProjectFacet(IJ2EEFacetConstants.EJB_30);
500
		} catch (CoreException e) {
501
			return false;
502
		}
503
	}
504
501
502
	private boolean ejb31OrLater() {
503
		IProject project = getTargetProject();
504
		IProjectFacetVersion facetVersion = JavaEEProjectUtilities.getProjectFacetVersion(project, IJ2EEFacetConstants.EJB);
505
		int version = J2EEVersionUtil.convertVersionStringToInt(facetVersion.getVersionString());
506
		int ejb31version = J2EEVersionUtil.convertVersionStringToInt(IJ2EEFacetConstants.EJB_31.getVersionString());
507
		return version >= ejb31version;
508
	}
509
	
505
}
510
}
(-)templates/sessionBean_classHeader.template (+6 lines)
Lines 68-73 Link Here
68
<%
68
<%
69
	}
69
	}
70
	
70
	
71
	if (model.isNoInterfaceChecked()) {
72
%>
73
@LocalBean
74
<%
75
	}
76
		
71
	if (model.isLocalHomeChecked()) {
77
	if (model.isLocalHomeChecked()) {
72
%>
78
%>
73
@LocalHome(<%=model.getLocalHomeClassSimpleName()%>.class)
79
@LocalHome(<%=model.getLocalHomeClassSimpleName()%>.class)
(-)templates/messageDrivenBean_classHeader.template (-1 lines)
Lines 1-6 Link Here
1
/**
1
/**
2
 * Message-Driven Bean implementation class for: <%=model.getClassName()%>
2
 * Message-Driven Bean implementation class for: <%=model.getClassName()%>
3
 *
4
 */
3
 */
5
@MessageDriven
4
@MessageDriven
6
<%
5
<%
(-)property_files/ejbcreation.properties (-2 / +3 lines)
Lines 148-152 Link Here
148
ERR_REMOTE_HOME_NOT_INTERFACE=The specified Remote Home interface is not valid.
148
ERR_REMOTE_HOME_NOT_INTERFACE=The specified Remote Home interface is not valid.
149
ERR_BEAN_ALREADY_EXISTS=Enterprise bean with the same Ejb Name already exists.
149
ERR_BEAN_ALREADY_EXISTS=Enterprise bean with the same Ejb Name already exists.
150
WRN_BEAN_NAME_IS_EMPTY=Bean name is empty, the containter will use the name of the bean class.
150
WRN_BEAN_NAME_IS_EMPTY=Bean name is empty, the containter will use the name of the bean class.
151
WRN_NO_BUSINESS_INTERFACE=No business interface configured. Clients will not be able to access this bean.
151
WRN_NO_CLIENT_VIEW=No client view configured. Clients will not be able to access this bean.
152
ERR_SINGLETON_ALLOWED_ONLY_FOR_31_AND_LATER=The 'Singleton' state type is allowed only for EJB projects with version 3.1 and later.  
152
ERR_SINGLETON_NOT_ALLOWED=The 'Singleton' state type is allowed only for EJB projects with version 3.1 or later.
153
ERR_NO_INTERFACE_NOT_ALLOWED=The no-interface client view is allowed only for EJB projects with version 3.1 or later. 
(-)ejbcreation/org/eclipse/jst/j2ee/internal/ejb/project/operations/EJBCreationResourceHandler.java (-2 / +3 lines)
Lines 163-170 Link Here
163
	public static String ERR_REMOTE_HOME_NOT_INTERFACE;
163
	public static String ERR_REMOTE_HOME_NOT_INTERFACE;
164
	public static String ERR_NO_MESSAGE_LISTENER_INTERFACE;
164
	public static String ERR_NO_MESSAGE_LISTENER_INTERFACE;
165
	public static String WRN_BEAN_NAME_IS_EMPTY;
165
	public static String WRN_BEAN_NAME_IS_EMPTY;
166
	public static String WRN_NO_BUSINESS_INTERFACE;
166
	public static String WRN_NO_CLIENT_VIEW;
167
	public static String ERR_SINGLETON_ALLOWED_ONLY_FOR_31_AND_LATER;
167
	public static String ERR_SINGLETON_NOT_ALLOWED;
168
	public static String ERR_NO_INTERFACE_NOT_ALLOWED;
168
169
169
170
170
	static {
171
	static {

Return to bug 241667