View Javadoc
1 /* 2 * ==================================================================== 3 * 4 * This code is subject to the freebxml License, Version 1.1 5 * 6 * Copyright (c) 2003 freebxml.org. All rights reserved. 7 * 8 * ==================================================================== 9 */ 10 11 package com.sun.xml.registry.client.browser.registration; 12 13 import com.sun.xml.registry.client.browser.JAXRClient; 14 import com.sun.xml.registry.client.browser.JBDialog; 15 import com.sun.xml.registry.client.browser.RegistryBrowser; 16 import com.sun.xml.registry.client.browser.swing.Model; 17 import com.sun.xml.registry.ebxml.ConnectionImpl; 18 import com.sun.xml.registry.ebxml.RegistryServiceImpl; 19 import java.awt.BorderLayout; 20 import java.util.ArrayList; 21 import javax.xml.registry.BusinessLifeCycleManager; 22 import javax.xml.registry.JAXRException; 23 import org.apache.commons.logging.Log; 24 25 26 /*** 27 * DOCUMENT ME! 28 * 29 * @author Fabian Ritzmann 30 */ 31 public class UserRegistrationDialog extends JBDialog { 32 33 /*** DOCUMENT ME! */ 34 private final Model model; 35 36 /*** 37 * Creates a new UserRegistrationDialog object. 38 * 39 * @param panel DOCUMENT ME! 40 * @param m DOCUMENT ME! 41 */ 42 public UserRegistrationDialog(UserRegistrationPanel panel, Model m) { 43 super(RegistryBrowser.getInstance(), true); 44 getMainPanel().add(panel, BorderLayout.CENTER); 45 pack(); 46 setLocation(100, 20); 47 this.model = m; 48 setEditable(true); 49 } 50 51 /*** Action performed when the OK button is pressed. Validate the 52 * dialog's contents and register the user with the server. 53 */ 54 protected void okAction() { 55 try { 56 this.model.validate(); 57 UserManager.authenticateAndSaveUser((UserModel)model); 58 status = OK_STATUS; 59 dispose(); 60 } 61 catch (Exception e) { 62 RegistryBrowser.displayError(e); 63 } 64 } 65 }

This page was automatically generated by Maven