1 19 23 24 package org.netbeans.modules.j2ee.sun.share.configbean.customizers.ejbmodule; 25 26 import java.util.ArrayList ; 27 import java.util.ResourceBundle ; 28 29 import org.netbeans.modules.j2ee.sun.dd.api.ejb.AsContext; 30 import org.netbeans.modules.j2ee.sun.dd.api.ejb.IorSecurityConfig; 31 import org.netbeans.modules.j2ee.sun.dd.api.ejb.SasContext; 32 import org.netbeans.modules.j2ee.sun.dd.api.ejb.TransportConfig; 33 34 import org.netbeans.modules.j2ee.sun.share.configbean.customizers.common.BaseCustomizer; 35 import org.netbeans.modules.j2ee.sun.share.configbean.customizers.common.ErrorSupport; 36 import org.netbeans.modules.j2ee.sun.share.configbean.customizers.common.ErrorSupportClient; 37 import org.netbeans.modules.j2ee.sun.share.configbean.customizers.common.ValidationSupport; 38 39 44 public class IorSecurityConfigPanel extends javax.swing.JPanel 45 implements ErrorSupportClient { 46 47 private EjbCustomizer customizer; 48 49 protected ErrorSupport errorSupport; 50 protected ValidationSupport validationSupport; 51 52 static final ResourceBundle bundle = 53 ResourceBundle.getBundle( 54 "org.netbeans.modules.j2ee.sun.share.configbean.customizers.ejbmodule.Bundle"); 56 57 58 public IorSecurityConfigPanel(EjbCustomizer customizer) { 59 initComponents(); 60 this.customizer = customizer; 61 errorSupport = new ErrorSupport(this); 62 validationSupport = new ValidationSupport(); 63 } 64 65 66 public void setValues(IorSecurityConfig iorSecCfg){ 67 if(iorSecCfg != null){ 68 TransportConfig transportConfig = iorSecCfg.getTransportConfig(); 69 if(transportConfig != null){ 70 integrityComboBox.setSelectedItem( 71 transportConfig.getIntegrity()); 72 73 confidentialityComboBox.setSelectedItem( 74 transportConfig.getConfidentiality()); 75 76 estbTrstInTrgtComboBox.setSelectedItem( 77 transportConfig.getEstablishTrustInTarget()); 78 79 estbTrstInClntComboBox.setSelectedItem( 80 transportConfig.getEstablishTrustInClient()); 81 } 82 83 AsContext asContext = iorSecCfg.getAsContext(); 84 if(asContext != null){ 85 requiredComboBox.setSelectedItem(asContext.getRequired()); 86 authMethodComboBox.setSelectedItem(asContext.getAuthMethod()); 87 realmTextField.setText(asContext.getRealm()); 88 } 89 90 SasContext sasContext = iorSecCfg.getSasContext(); 91 if(sasContext != null){ 92 callerPropagationComboBox.setSelectedItem( 93 sasContext.getCallerPropagation()); 94 } 95 } 96 } 97 98 public java.awt.Container getErrorPanelParent(){ 99 return this; 100 } 101 102 103 public java.awt.GridBagConstraints getErrorPanelConstraints(){ 104 java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints (); 105 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 106 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 107 gridBagConstraints.weightx = 1.0; 108 gridBagConstraints.insets = new java.awt.Insets (6,12,11,11); 109 return gridBagConstraints; 110 } 111 112 113 public java.util.Collection getErrors(){ 114 if(validationSupport == null) assert(false); 115 ArrayList errors = new ArrayList (); 116 String property; 117 118 boolean transportConfigPresent = isTransportConfigPresent(); 120 if(transportConfigPresent){ 121 property = (String )integrityComboBox.getSelectedItem(); 122 errors.addAll(validationSupport.validate(property, 123 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/transport-config/integrity", bundle.getString("LBL_Integrity"))); 126 property = (String )confidentialityComboBox.getSelectedItem(); 127 errors.addAll(validationSupport.validate(property, 128 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/transport-config/confidentiality", bundle.getString("LBL_Confidentiality"))); 131 property = (String )estbTrstInTrgtComboBox.getSelectedItem(); 132 errors.addAll(validationSupport.validate(property, 133 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/transport-config/establish-trust-in-target", bundle.getString("LBL_Establish_Trust_In_Target"))); 136 property = (String )estbTrstInClntComboBox.getSelectedItem(); 137 errors.addAll(validationSupport.validate(property, 138 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/transport-config/establish-trust-in-client", bundle.getString("LBL_Establish_Trust_In_Client"))); } 141 142 boolean asContextPresent = isAsContextPresent(); 144 if(asContextPresent){ 145 property = (String )requiredComboBox.getSelectedItem(); 146 errors.addAll(validationSupport.validate(property, 147 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/as-context/required", bundle.getString("LBL_Required"))); 150 property = realmTextField.getText(); 151 errors.addAll(validationSupport.validate(property, 152 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/as-context/realm", bundle.getString("LBL_Realm"))); 155 property = (String )authMethodComboBox.getSelectedItem(); 156 errors.addAll(validationSupport.validate(property, 157 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/as-context/auth-method", bundle.getString("LBL_Auth_Method"))); } 160 161 boolean sasContextPresent = isSasContextPresent(); 163 if(sasContextPresent){ 164 property = (String )callerPropagationComboBox.getSelectedItem(); 165 errors.addAll(validationSupport.validate(property, 166 "/sun-ejb-jar/enterprise-beans/ejb/ior-security-config/sas-context/caller-propagation", bundle.getString("LBL_Caller_Propagation"))); } 169 170 return errors; 171 } 172 173 public java.awt.Color getMessageForegroundColor() { 174 return BaseCustomizer.getErrorForegroundColor(); 175 } 176 177 178 private boolean isTransportConfigPresent(){ 179 boolean transportConfigPresent = false; 180 String property = (String )integrityComboBox.getSelectedItem(); 181 while(true){ 182 if((property != null) && (property.length() != 0)){ 183 transportConfigPresent = true; 184 break; 185 } 186 187 property = (String )confidentialityComboBox.getSelectedItem(); 188 if((property != null) && (property.length() != 0)){ 189 transportConfigPresent = true; 190 break; 191 } 192 193 property = (String )estbTrstInTrgtComboBox.getSelectedItem(); 194 if((property != null) && (property.length() != 0)){ 195 transportConfigPresent = true; 196 break; 197 } 198 199 property = (String )estbTrstInClntComboBox.getSelectedItem(); 200 if((property != null) && (property.length() != 0)){ 201 transportConfigPresent = true; 202 break; 203 } 204 break; 205 } 206 return transportConfigPresent; 207 } 208 209 210 private boolean isAsContextPresent(){ 211 boolean asContextPresent = false; 212 String property = (String )requiredComboBox.getSelectedItem(); 213 while(true){ 214 if((property != null) && (property.length() != 0)){ 215 asContextPresent = true; 216 break; 217 } 218 219 property = realmTextField.getText(); 220 if((property != null) && (property.length() != 0)){ 221 asContextPresent = true; 222 break; 223 } 224 225 property = (String )authMethodComboBox.getSelectedItem(); 226 if((property != null) && (property.length() != 0)){ 227 asContextPresent = true; 228 break; 229 } 230 break; 231 } 232 return asContextPresent; 233 } 234 235 236 private boolean isSasContextPresent(){ 237 boolean sasContextPresent = false; 238 String property = (String )callerPropagationComboBox.getSelectedItem(); 239 while(true){ 240 if((property != null) && (property.length() != 0)){ 241 sasContextPresent = true; 242 break; 243 } 244 break; 245 } 246 return sasContextPresent; 247 } 248 249 250 private void validateEntries(){ 251 if(errorSupport != null){ 252 errorSupport.showErrors(); 253 firePropertyChange("", null, null); 254 } 255 } 256 257 258 263 private void initComponents() { 265 java.awt.GridBagConstraints gridBagConstraints; 266 267 transportConfigLabel = new javax.swing.JLabel (); 268 transportConfigPanel = new javax.swing.JPanel (); 269 transportConfigPanelPanel1 = new javax.swing.JPanel (); 270 integrityLabel = new javax.swing.JLabel (); 271 integrityComboBox = new javax.swing.JComboBox (); 272 confidentialityLabel = new javax.swing.JLabel (); 273 confidentialityComboBox = new javax.swing.JComboBox (); 274 transportConfigPanel2 = new javax.swing.JPanel (); 275 estbTrstInTrgtLabel = new javax.swing.JLabel (); 276 estbTrstInTrgtComboBox = new javax.swing.JComboBox (); 277 estbTrstInClntLabel = new javax.swing.JLabel (); 278 estbTrstInClntComboBox = new javax.swing.JComboBox (); 279 asContextLabel = new javax.swing.JLabel (); 280 asContextPanel = new javax.swing.JPanel (); 281 requiredLabel = new javax.swing.JLabel (); 282 requiredComboBox = new javax.swing.JComboBox (); 283 authMethodLabel = new javax.swing.JLabel (); 284 authMethodComboBox = new javax.swing.JComboBox (); 285 realmLabel = new javax.swing.JLabel (); 286 realmTextField = new javax.swing.JTextField (); 287 sasContextLabel = new javax.swing.JLabel (); 288 sasContextPanel = new javax.swing.JPanel (); 289 callerPropagationLabel = new javax.swing.JLabel (); 290 callerPropagationComboBox = new javax.swing.JComboBox (); 291 fillerPanel = new javax.swing.JPanel (); 292 293 setLayout(new java.awt.GridBagLayout ()); 294 295 addFocusListener(new java.awt.event.FocusAdapter () { 296 public void focusGained(java.awt.event.FocusEvent evt) { 297 formFocusGained(evt); 298 } 299 }); 300 301 transportConfigLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Transport_Config")); 302 transportConfigLabel.setToolTipText(""); 303 gridBagConstraints = new java.awt.GridBagConstraints (); 304 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 305 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 306 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 307 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 5); 308 add(transportConfigLabel, gridBagConstraints); 309 310 transportConfigPanel.setLayout(new java.awt.GridBagLayout ()); 311 312 transportConfigPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 313 transportConfigPanelPanel1.setLayout(new java.awt.GridBagLayout ()); 314 315 transportConfigPanelPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); 316 integrityLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Integrity").charAt(0)); 317 integrityLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Integrity_1")); 318 gridBagConstraints = new java.awt.GridBagConstraints (); 319 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 320 transportConfigPanelPanel1.add(integrityLabel, gridBagConstraints); 321 integrityLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Integrity_Acsbl_Name")); 322 integrityLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Integrity_Acsbl_Desc")); 323 324 integrityComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "NONE", "SUPPORTED", "REQUIRED" })); 325 integrityComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Integrity_Tool_Tip")); 326 integrityComboBox.addItemListener(new java.awt.event.ItemListener () { 327 public void itemStateChanged(java.awt.event.ItemEvent evt) { 328 integrityStateChanged(evt); 329 } 330 }); 331 integrityComboBox.addFocusListener(new java.awt.event.FocusAdapter () { 332 public void focusLost(java.awt.event.FocusEvent evt) { 333 integrityComboBoxFocusLost(evt); 334 } 335 }); 336 337 gridBagConstraints = new java.awt.GridBagConstraints (); 338 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 339 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 340 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 341 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 0); 342 transportConfigPanelPanel1.add(integrityComboBox, gridBagConstraints); 343 integrityComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Integrity_Acsbl_Name")); 344 integrityComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Integrity_Acsbl_Desc")); 345 346 confidentialityLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Confidentiality").charAt(0)); 347 confidentialityLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Confidentiality_1")); 348 gridBagConstraints = new java.awt.GridBagConstraints (); 349 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 350 gridBagConstraints.insets = new java.awt.Insets (6, 0, 0, 0); 351 transportConfigPanelPanel1.add(confidentialityLabel, gridBagConstraints); 352 confidentialityLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Confidentiality_Acsbl_Name")); 353 confidentialityLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Confidentiality_Acsbl_Desc")); 354 355 confidentialityComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "NONE", "SUPPORTED", "REQUIRED" })); 356 confidentialityComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Confidentiality_Tool_Tip")); 357 confidentialityComboBox.addItemListener(new java.awt.event.ItemListener () { 358 public void itemStateChanged(java.awt.event.ItemEvent evt) { 359 confidentialityStateChanged(evt); 360 } 361 }); 362 363 gridBagConstraints = new java.awt.GridBagConstraints (); 364 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 365 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 366 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 367 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 368 transportConfigPanelPanel1.add(confidentialityComboBox, gridBagConstraints); 369 confidentialityComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Confidentiality_Acsbl_Name")); 370 confidentialityComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Confidentiality_Acsbl_Desc")); 371 372 gridBagConstraints = new java.awt.GridBagConstraints (); 373 gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; 374 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 375 gridBagConstraints.weightx = 1.0; 376 gridBagConstraints.insets = new java.awt.Insets (6, 6, 5, 0); 377 transportConfigPanel.add(transportConfigPanelPanel1, gridBagConstraints); 378 379 transportConfigPanel2.setLayout(new java.awt.GridBagLayout ()); 380 381 transportConfigPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); 382 estbTrstInTrgtLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Establish_Trust_In_Target").charAt(0)); 383 estbTrstInTrgtLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Establish_Trust_In_Target_1")); 384 gridBagConstraints = new java.awt.GridBagConstraints (); 385 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 386 transportConfigPanel2.add(estbTrstInTrgtLabel, gridBagConstraints); 387 estbTrstInTrgtLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Target_Acsbl_Name")); 388 estbTrstInTrgtLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Target_Acsbl_Desc")); 389 390 estbTrstInTrgtComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "NONE", "SUPPORTED" })); 391 estbTrstInTrgtComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Target_Tool_Tip")); 392 estbTrstInTrgtComboBox.addItemListener(new java.awt.event.ItemListener () { 393 public void itemStateChanged(java.awt.event.ItemEvent evt) { 394 estbTrstInTrgtStateChanged(evt); 395 } 396 }); 397 398 gridBagConstraints = new java.awt.GridBagConstraints (); 399 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 400 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 401 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 402 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 0); 403 transportConfigPanel2.add(estbTrstInTrgtComboBox, gridBagConstraints); 404 estbTrstInTrgtComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Target_Acsbl_Name")); 405 estbTrstInTrgtComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Target_Acsbl_Desc")); 406 407 estbTrstInClntLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Establish_Trust_In_Client").charAt(0)); 408 estbTrstInClntLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Establish_Trust_In_Client_1")); 409 gridBagConstraints = new java.awt.GridBagConstraints (); 410 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 411 gridBagConstraints.insets = new java.awt.Insets (6, 0, 0, 0); 412 transportConfigPanel2.add(estbTrstInClntLabel, gridBagConstraints); 413 estbTrstInClntLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Client_Acsbl_Name")); 414 estbTrstInClntLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Client_Acsbl_Desc")); 415 416 estbTrstInClntComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "NONE", "SUPPORTED", "REQUIRED" })); 417 estbTrstInClntComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Client_Tool_Tip")); 418 estbTrstInClntComboBox.addItemListener(new java.awt.event.ItemListener () { 419 public void itemStateChanged(java.awt.event.ItemEvent evt) { 420 estbTrstInClntStateChanged(evt); 421 } 422 }); 423 424 gridBagConstraints = new java.awt.GridBagConstraints (); 425 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 426 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 427 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 428 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 429 transportConfigPanel2.add(estbTrstInClntComboBox, gridBagConstraints); 430 estbTrstInClntComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Client_Acsbl_Name")); 431 estbTrstInClntComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Establish_Trust_In_Client_Acsbl_Desc")); 432 433 gridBagConstraints = new java.awt.GridBagConstraints (); 434 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 435 gridBagConstraints.weightx = 1.0; 436 gridBagConstraints.insets = new java.awt.Insets (6, 6, 5, 5); 437 transportConfigPanel.add(transportConfigPanel2, gridBagConstraints); 438 439 gridBagConstraints = new java.awt.GridBagConstraints (); 440 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 441 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 442 gridBagConstraints.weightx = 1.0; 443 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 5); 444 add(transportConfigPanel, gridBagConstraints); 445 446 asContextLabel.setLabelFor(asContextPanel); 447 asContextLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_As_Context")); 448 asContextLabel.setToolTipText(""); 449 gridBagConstraints = new java.awt.GridBagConstraints (); 450 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 451 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 452 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 453 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 5); 454 add(asContextLabel, gridBagConstraints); 455 456 asContextPanel.setLayout(new java.awt.GridBagLayout ()); 457 458 asContextPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 459 requiredLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Required").charAt(0)); 460 requiredLabel.setLabelFor(requiredComboBox); 461 requiredLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Required_1")); 462 gridBagConstraints = new java.awt.GridBagConstraints (); 463 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 464 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 465 asContextPanel.add(requiredLabel, gridBagConstraints); 466 requiredLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Required_Acsbl_Name")); 467 requiredLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Required_Acsbl_Desc")); 468 469 requiredComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "true", "false" })); 470 requiredComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Required_Tool_Tip")); 471 requiredComboBox.addItemListener(new java.awt.event.ItemListener () { 472 public void itemStateChanged(java.awt.event.ItemEvent evt) { 473 requiredStateChanged(evt); 474 } 475 }); 476 477 gridBagConstraints = new java.awt.GridBagConstraints (); 478 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 479 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 480 asContextPanel.add(requiredComboBox, gridBagConstraints); 481 requiredComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Required_Acsbl_Name")); 482 requiredComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Required_Acsbl_Desc")); 483 484 authMethodLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Auth_Method").charAt(0)); 485 authMethodLabel.setLabelFor(authMethodComboBox); 486 authMethodLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Auth_Method_1")); 487 gridBagConstraints = new java.awt.GridBagConstraints (); 488 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 489 gridBagConstraints.weightx = 1.0; 490 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 0); 491 asContextPanel.add(authMethodLabel, gridBagConstraints); 492 authMethodLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Auth_Method_Acsbl_Name")); 493 authMethodLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Auth_Method_Acsbl_Desc")); 494 495 authMethodComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "USERNAME_PASSWORD" })); 496 authMethodComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Auth_Method_Tool_Tip")); 497 authMethodComboBox.addItemListener(new java.awt.event.ItemListener () { 498 public void itemStateChanged(java.awt.event.ItemEvent evt) { 499 authMethodStateChanged(evt); 500 } 501 }); 502 503 gridBagConstraints = new java.awt.GridBagConstraints (); 504 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 505 gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; 506 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 5); 507 asContextPanel.add(authMethodComboBox, gridBagConstraints); 508 authMethodComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Auth_Method_Acsbl_Name")); 509 authMethodComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Auth_Method_Acsbl_Desc")); 510 511 realmLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Auth_Method").charAt(0)); 512 realmLabel.setLabelFor(realmTextField); 513 realmLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Realm_1")); 514 gridBagConstraints = new java.awt.GridBagConstraints (); 515 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 516 gridBagConstraints.insets = new java.awt.Insets (6, 6, 5, 0); 517 asContextPanel.add(realmLabel, gridBagConstraints); 518 realmLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Realm_Acsbl_Name")); 519 realmLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Realm_Acsbl_Desc")); 520 521 realmTextField.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Realm_Tool_Tip")); 522 realmTextField.addActionListener(new java.awt.event.ActionListener () { 523 public void actionPerformed(java.awt.event.ActionEvent evt) { 524 realmActionPerformed(evt); 525 } 526 }); 527 realmTextField.addKeyListener(new java.awt.event.KeyAdapter () { 528 public void keyReleased(java.awt.event.KeyEvent evt) { 529 realmTextFieldKeyReleased(evt); 530 } 531 }); 532 533 gridBagConstraints = new java.awt.GridBagConstraints (); 534 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 535 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 536 gridBagConstraints.ipadx = 56; 537 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 538 gridBagConstraints.weightx = 0.5; 539 gridBagConstraints.insets = new java.awt.Insets (6, 6, 5, 5); 540 asContextPanel.add(realmTextField, gridBagConstraints); 541 realmTextField.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Realm_Acsbl_Name")); 542 realmTextField.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Realm_Acsbl_Desc")); 543 544 gridBagConstraints = new java.awt.GridBagConstraints (); 545 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 546 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 547 gridBagConstraints.insets = new java.awt.Insets (0, 6, 0, 5); 548 add(asContextPanel, gridBagConstraints); 549 550 sasContextLabel.setLabelFor(sasContextPanel); 551 sasContextLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Sas_Context")); 552 sasContextLabel.setToolTipText(""); 553 gridBagConstraints = new java.awt.GridBagConstraints (); 554 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 555 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 556 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 557 gridBagConstraints.insets = new java.awt.Insets (6, 6, 0, 5); 558 add(sasContextLabel, gridBagConstraints); 559 560 sasContextPanel.setLayout(new java.awt.GridBagLayout ()); 561 562 sasContextPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); 563 callerPropagationLabel.setDisplayedMnemonic(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("MNC_Caller_Propagation").charAt(0)); 564 callerPropagationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); 565 callerPropagationLabel.setLabelFor(callerPropagationComboBox); 566 callerPropagationLabel.setText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("LBL_Caller_Propagation_1")); 567 gridBagConstraints = new java.awt.GridBagConstraints (); 568 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 569 gridBagConstraints.insets = new java.awt.Insets (6, 6, 5, 0); 570 sasContextPanel.add(callerPropagationLabel, gridBagConstraints); 571 callerPropagationLabel.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Caller_Propagation_Acsbl_Name")); 572 callerPropagationLabel.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Caller_Propagation_Acsbl_Desc")); 573 574 callerPropagationComboBox.setModel(new javax.swing.DefaultComboBoxModel (new String [] { "", "NONE", "SUPPORTED" })); 575 callerPropagationComboBox.setToolTipText(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Caller_Propagation_Tool_Tip")); 576 callerPropagationComboBox.addItemListener(new java.awt.event.ItemListener () { 577 public void itemStateChanged(java.awt.event.ItemEvent evt) { 578 callerPropagationStateChanged(evt); 579 } 580 }); 581 582 gridBagConstraints = new java.awt.GridBagConstraints (); 583 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; 584 gridBagConstraints.weightx = 0.5; 585 gridBagConstraints.insets = new java.awt.Insets (6, 6, 5, 5); 586 sasContextPanel.add(callerPropagationComboBox, gridBagConstraints); 587 callerPropagationComboBox.getAccessibleContext().setAccessibleName(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Caller_Propagation_Acsbl_Name")); 588 callerPropagationComboBox.getAccessibleContext().setAccessibleDescription(java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/sun/share/configbean/customizers/ejbmodule/Bundle").getString("Caller_Propagation_Acsbl_Desc")); 589 590 gridBagConstraints = new java.awt.GridBagConstraints (); 591 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 592 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; 593 gridBagConstraints.weightx = 1.0; 594 gridBagConstraints.insets = new java.awt.Insets (0, 6, 5, 5); 595 add(sasContextPanel, gridBagConstraints); 596 597 gridBagConstraints = new java.awt.GridBagConstraints (); 598 gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; 599 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; 600 gridBagConstraints.weightx = 1.0; 601 gridBagConstraints.weighty = 1.0; 602 add(fillerPanel, gridBagConstraints); 603 604 } 606 private void formFocusGained(java.awt.event.FocusEvent evt) { validateEntries(); 609 } 611 private void integrityComboBoxFocusLost(java.awt.event.FocusEvent evt) { } 615 private void estbTrstInClntStateChanged(java.awt.event.ItemEvent evt) { String item = (String )estbTrstInClntComboBox.getSelectedItem(); 618 customizer.updateEstbTrstInClnt(item); 619 validateEntries(); 620 } 622 private void estbTrstInTrgtStateChanged(java.awt.event.ItemEvent evt) { String item = (String )estbTrstInTrgtComboBox.getSelectedItem(); 625 customizer.updateEstbTrstInTrgt(item); 626 validateEntries(); 627 } 629 private void realmActionPerformed(java.awt.event.ActionEvent evt) { validateEntries(); 632 } 634 private void callerPropagationStateChanged(java.awt.event.ItemEvent evt) { String item = (String )callerPropagationComboBox.getSelectedItem(); 637 customizer.updateCallerPropagation(item); 638 validateEntries(); 639 } 641 private void realmTextFieldKeyReleased(java.awt.event.KeyEvent evt) { String item = realmTextField.getText(); 644 customizer.updateRealm(item); 645 validateEntries(); 646 } 648 private void authMethodStateChanged(java.awt.event.ItemEvent evt) { String item = (String )authMethodComboBox.getSelectedItem(); 651 customizer.updateAuthMethod(item); 652 validateEntries(); 653 } 655 private void requiredStateChanged(java.awt.event.ItemEvent evt) { String item = (String )requiredComboBox.getSelectedItem(); 658 customizer.updateRequired(item); 659 validateEntries(); 660 } 662 private void confidentialityStateChanged(java.awt.event.ItemEvent evt) { String item = (String )confidentialityComboBox.getSelectedItem(); 665 customizer.updateConfidentiality(item); 666 validateEntries(); 667 } 669 private void integrityStateChanged(java.awt.event.ItemEvent evt) { String item = (String )integrityComboBox.getSelectedItem(); 672 customizer.updateIntegrity(item); 673 validateEntries(); 674 } 676 677 private javax.swing.JLabel asContextLabel; 679 private javax.swing.JPanel asContextPanel; 680 private javax.swing.JComboBox authMethodComboBox; 681 private javax.swing.JLabel authMethodLabel; 682 private javax.swing.JComboBox callerPropagationComboBox; 683 private javax.swing.JLabel callerPropagationLabel; 684 private javax.swing.JComboBox confidentialityComboBox; 685 private javax.swing.JLabel confidentialityLabel; 686 private javax.swing.JComboBox estbTrstInClntComboBox; 687 private javax.swing.JLabel estbTrstInClntLabel; 688 private javax.swing.JComboBox estbTrstInTrgtComboBox; 689 private javax.swing.JLabel estbTrstInTrgtLabel; 690 private javax.swing.JPanel fillerPanel; 691 private javax.swing.JComboBox integrityComboBox; 692 private javax.swing.JLabel integrityLabel; 693 private javax.swing.JLabel realmLabel; 694 private javax.swing.JTextField realmTextField; 695 private javax.swing.JComboBox requiredComboBox; 696 private javax.swing.JLabel requiredLabel; 697 private javax.swing.JLabel sasContextLabel; 698 private javax.swing.JPanel sasContextPanel; 699 private javax.swing.JLabel transportConfigLabel; 700 private javax.swing.JPanel transportConfigPanel; 701 private javax.swing.JPanel transportConfigPanel2; 702 private javax.swing.JPanel transportConfigPanelPanel1; 703 } 705 | Popular Tags |