geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r817996 [22/23] - in /geronimo/devtools/eclipse-plugin/trunk: assembly/ assembly/src/main/assembly/ features/ features/org.apache.geronimo.v22.feature/ plugins/ plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/ plugins/org.apache.geronimo.j2e...
Date Wed, 23 Sep 2009 08:04:34 GMT
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/GBeanWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,278 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import javax.xml.bind.JAXBElement;
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.xml.ns.deployment_1.AttributeType;
+import org.apache.geronimo.xml.ns.deployment_1.GbeanType;
+import org.apache.geronimo.xml.ns.deployment_1.ObjectFactory;
+import org.apache.geronimo.xml.ns.deployment_1.PatternType;
+import org.apache.geronimo.xml.ns.deployment_1.ReferenceType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class GBeanWizard extends AbstractTreeWizard {
+
+    private final int GBEAN = 0;
+    private final int ATTRIBUTE = 1;
+    private final int DEPENDENCY = 2;
+    private final int REFERENCE = 3;
+
+    public GBeanWizard(AbstractTreeSection section) {
+        super(section, 4, 7);
+        elementTypes[GBEAN] = "GBean";
+        elementTypes[ATTRIBUTE] = "Attribute";
+        elementTypes[DEPENDENCY] = "Dependency";
+        elementTypes[REFERENCE] = "Reference";
+    }
+
+    public class GBeanWizardPage extends AbstractTreeWizardPage {
+
+        public GBeanWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        protected void initControl() {
+            if (eObject == null) {
+                element.select(GBEAN);
+                if (section.getSelectedObject() == null) {
+                    element.setEnabled(false);
+                }
+            }
+            else {
+                // change eObject to be the value of the JAXBElement
+                eObject = ((JAXBElement)eObject).getValue();
+                if (GbeanType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((GbeanType)eObject).getName());
+                    textList.get(1).setText(((GbeanType)eObject).getClazz());
+                    element.select(GBEAN);
+                }
+                else if (AttributeType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((AttributeType)eObject).getName());
+                    textList.get(1).setText(((AttributeType)eObject).getType());
+                    textList.get(2).setText(((AttributeType)eObject).getValue());
+                    element.select(ATTRIBUTE);
+                }
+                else if (PatternType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((PatternType)eObject).getGroupId());
+                    textList.get(1).setText(((PatternType)eObject).getArtifactId());
+                    textList.get(2).setText(((PatternType)eObject).getVersion());
+                    textList.get(3).setText(((PatternType)eObject).getModule());
+                    textList.get(4).setText(((PatternType)eObject).getType());
+                    textList.get(5).setText(((PatternType)eObject).getCustomFoo());
+                    element.select(DEPENDENCY);
+                }
+                else if (ReferenceType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((ReferenceType)eObject).getName());
+                    textList.get(1).setText(((ReferenceType)eObject).getGroupId());
+                    textList.get(2).setText(((ReferenceType)eObject).getArtifactId());
+                    textList.get(3).setText(((ReferenceType)eObject).getVersion());
+                    textList.get(4).setText(((ReferenceType)eObject).getModule());
+                    textList.get(5).setText(((ReferenceType)eObject).getType());
+                    textList.get(6).setText(((ReferenceType)eObject).getCustomFoo());
+                    element.select(REFERENCE);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            int selection = element.getSelectionIndex();
+            switch (selection) {
+            case GBEAN:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 2 ? true : false);
+                    textList.get(i).setVisible(i < 2 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.className);
+                // if we are doing an add, then we need to make sure that the longest
+                // text can be handled
+                labelList.get(2).setText(CommonMessages.groupId);
+                labelList.get(3).setText(CommonMessages.artifactId);
+                labelList.get(4).setText(CommonMessages.moduleId);
+                labelList.get(5).setText(CommonMessages.artifactType);
+                labelList.get(6).setText(CommonMessages.customName);
+                break;
+            case ATTRIBUTE:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 3 ? true : false);
+                    textList.get(i).setVisible(i < 3 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.type);
+                labelList.get(2).setText(CommonMessages.value);
+                break;
+            case DEPENDENCY:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 6 ? true : false);
+                    textList.get(i).setVisible(i < 6 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.groupId);
+                labelList.get(1).setText(CommonMessages.artifactId);
+                labelList.get(2).setText(CommonMessages.version);
+                labelList.get(3).setText(CommonMessages.moduleId);
+                labelList.get(4).setText(CommonMessages.artifactType);
+                labelList.get(5).setText(CommonMessages.customName);
+                break;
+            case REFERENCE:
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(true);
+                    textList.get(i).setVisible(true);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.groupId);
+                labelList.get(2).setText(CommonMessages.artifactId);
+                labelList.get(3).setText(CommonMessages.version);
+                labelList.get(4).setText(CommonMessages.moduleId);
+                labelList.get(5).setText(CommonMessages.artifactType);
+                labelList.get(6).setText(CommonMessages.customName);
+                break;
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardEditTitle_GBean;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageTitle_GBean;
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new GBeanWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        GbeanType gbean;
+        switch (element.getSelectionIndex()) {
+        case GBEAN:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            gbean = (GbeanType)eObject;
+            if (gbean == null) {
+                gbean = (GbeanType)getEFactory().create(GbeanType.class);
+                JAXBElement plan = section.getPlan();
+                
+                // add the JAXBElement of a GBean, not the GBean
+                ObjectFactory objectFactory = new ObjectFactory();
+                JAXBModelUtils.getGbeans(plan).add(objectFactory.createGbean((GbeanType)gbean));
+            }
+            gbean.setName(textList.get(0).getText());
+            gbean.setClazz(textList.get(1).getText());
+            break;
+
+        case ATTRIBUTE:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            AttributeType attribute = (AttributeType)eObject;
+            if (attribute == null) {
+                attribute = (AttributeType)getEFactory().create(AttributeType.class);
+                gbean = (GbeanType)section.getSelectedObject();
+                
+                // add the JAXBElement of an Attribute, not the Attribute
+                ObjectFactory objectFactory = new ObjectFactory();
+                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanTypeAttribute(attribute));
+            }
+            attribute.setName(textList.get(0).getText());
+            attribute.setType(textList.get(1).getText());
+            attribute.setValue(textList.get(2).getText());
+            break;
+
+        case DEPENDENCY:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            PatternType dependency = (PatternType)eObject;
+            if (dependency == null) {
+                dependency = (PatternType)getEFactory().create(PatternType.class);
+                gbean = (GbeanType)section.getSelectedObject();
+
+                // add the JAXBElement of a Dependency, not the Dependency
+                ObjectFactory objectFactory = new ObjectFactory();
+                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanTypeDependency(dependency));
+            }
+            dependency.setGroupId(textList.get(0).getText());
+            dependency.setArtifactId(textList.get(1).getText());
+            dependency.setVersion(textList.get(2).getText());
+            dependency.setModule(textList.get(3).getText());
+            dependency.setType(textList.get(4).getText());
+            dependency.setCustomFoo(textList.get(5).getText());
+            break;
+
+        case REFERENCE:
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText()) ||
+                    isEmpty(textList.get(2).getText())) {
+                return false;
+            }
+            ReferenceType reference = (ReferenceType)eObject;
+            if (reference == null) {
+                reference = (ReferenceType)getEFactory().create(ReferenceType.class);
+                gbean = (GbeanType)section.getSelectedObject();
+
+                // add the JAXBElement of a Dependency, not the Dependency
+                ObjectFactory objectFactory = new ObjectFactory();
+                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanTypeReference(reference));
+            }
+            reference.setName(textList.get(0).getText());
+            reference.setGroupId(textList.get(1).getText());
+            reference.setArtifactId(textList.get(2).getText());
+            reference.setVersion(textList.get(3).getText());
+            reference.setModule(textList.get(4).getText());
+            reference.setType(textList.get(5).getText());
+            reference.setCustomFoo(textList.get(6).getText());
+            break;
+        }
+        return true;
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_GBean;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_GBean;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/LicenseWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/LicenseWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/LicenseWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/LicenseWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,101 @@
+///*
+// * 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.
+// */
+//package org.apache.geronimo.st.v11.ui.wizards;
+//
+//import org.apache.geronimo.st.ui.CommonMessages;
+//import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+//import org.apache.geronimo.system.plugin.model.LicenseType;
+//import org.eclipse.swt.widgets.Composite;
+//import org.eclipse.swt.widgets.Combo;
+//import org.eclipse.swt.widgets.Text;
+//
+///**
+// * @version $Rev: 723874 $ $Date: 2008-12-06 05:30:03 +0800 (Sat, 06 Dec 2008) $
+// */
+//public class LicenseWizard extends AbstractWizard {
+//
+//    protected LicenseType license;
+//    
+//    protected Text licenseName;
+//    
+//    protected Combo osiApproved;
+//    
+//    public LicenseWizard (LicenseType oldLicense) {
+//        super();
+//        license = oldLicense;
+//    }
+//
+//    public String getAddWizardWindowTitle() {
+//        return CommonMessages.wizardNewTitle_License;
+//    }
+//
+//    public String getEditWizardWindowTitle() {
+//        return CommonMessages.wizardEditTitle_License;
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     * 
+//     * @see org.eclipse.jface.wizard.IWizard#addPages()
+//     */
+//    public void addPages() {
+//        addPage(new MessageDestWizardPage("Page0"));
+//    }
+//
+//    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+//    // the values are brought in properly.
+//    public class MessageDestWizardPage extends AbstractWizardPage {
+//        public MessageDestWizardPage(String pageName) {
+//            super(pageName);
+//        }
+//
+//        public void createControl(Composite parent) {
+//            Composite composite = createComposite(parent);
+//            createLabel (composite, CommonMessages.license);
+//            licenseName = createTextField (composite, "");
+//            createLabel (composite, CommonMessages.osiApproved);
+//            String[] values = {"true", "false"};
+//            osiApproved = createCombo (composite, values, false);
+//
+//            if (license != null) {
+//                licenseName.setText(license.getValue());
+//                osiApproved.setText(String.valueOf(license.isOsiApproved()));
+//            }
+//            setControl(composite);
+//        }
+//
+//        public String getWizardPageTitle() {
+//            return CommonMessages.wizardPageTitle_License;
+//        }
+//
+//        public String getWizardPageDescription() {
+//            return CommonMessages.wizardPageDescription_License;
+//        }
+//    }
+//    
+//    public boolean performFinish() {
+//        license = new LicenseType();
+//        license.setValue(licenseName.getText());
+//        license.setOsiApproved(Boolean.parseBoolean(osiApproved.getText()));
+//
+//        return true;
+//    }
+//    
+//    public LicenseType getLicense() {
+//        return license;
+//    }
+//}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/MessageDestWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/MessageDestWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/MessageDestWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/MessageDestWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,190 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.xml.ns.naming_1.MessageDestinationType;
+import org.apache.geronimo.xml.ns.naming_1.PatternType;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+ */
+public class MessageDestWizard extends AbstractTableWizard {
+
+    public MessageDestWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "MessageDestinationName", "AdminObjectModule", "AdminObjectLink",
+                "GroupId", "ArtifactId", "Version", "Module", "Name"};
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_MessageDest;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_MessageDest;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new MessageDestWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class MessageDestWizardPage extends AbstractTableWizardPage {
+        public MessageDestWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            for (int i = 0; i < section.getTableColumnNames().length; i++) {
+                Label label = new Label(composite, SWT.LEFT);
+                String columnName = section.getTableColumnNames()[i];
+                if (!columnName.endsWith(":"))
+                    columnName = columnName.concat(":");
+                label.setText(columnName);
+                GridData data = new GridData();
+                data.horizontalAlignment = GridData.FILL;
+                label.setLayoutData(data);
+
+                Text text = new Text(composite, SWT.SINGLE | SWT.BORDER);
+                data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                        | GridData.VERTICAL_ALIGN_FILL);
+                data.grabExcessHorizontalSpace = true;
+                data.widthHint = 100;
+                text.setLayoutData(data);
+                if (eObject != null) {
+                    if (i > 2) {
+                        // get the pattern value
+                        PatternType pattern = ((MessageDestinationType) eObject).getPattern();
+                        String value = null;
+						try {
+							value = (String) JAXBUtils.getValue(pattern,getTableColumnEAttributes()[i]);
+						} catch (Exception e) {
+							MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+						}
+                        if (value != null) {
+                            text.setText(value);
+                        }                        
+                    }
+                    else
+                    {
+                        String value = null;
+						try {
+							value = (String) JAXBUtils.getValue(eObject,getTableColumnEAttributes()[i]);
+						} catch (Exception e) {
+							MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+						}
+                        if (value != null) {
+                            text.setText(value);
+                        }
+                    }
+                }
+                textEntries[i] = text;
+            }
+
+            doCustom(composite);
+            setControl(composite);
+            textEntries[0].setFocus();
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_MessageDest;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_MessageDest;
+        }
+    }
+    
+    public boolean performFinish() {
+        AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
+        PatternType msgPattern;
+        MessageDestinationType messageDest;
+
+        if (eObject == null) {
+            eObject = getEFactory().create(MessageDestinationType.class);
+            JAXBElement plan = section.getPlan();
+
+            messageDest = (MessageDestinationType)eObject;
+            msgPattern = (PatternType)getEFactory().create(PatternType.class);
+            messageDest.setPattern(msgPattern);
+
+            List msgDestList = JAXBModelUtils.getMessageDestinations(plan); 
+            if (msgDestList == null) {
+                msgDestList = (List)getEFactory().create(MessageDestinationType.class);
+            }
+            msgDestList.add(eObject);
+        }
+
+        // NOTE!! this replaces the call to processEAttributes (page);
+        messageDest =(MessageDestinationType) eObject; 
+        msgPattern = messageDest.getPattern();
+        for (int i = 0; i < 8; i++) {
+            String value = page.getTextEntry(i).getText();
+            String attribute = getTableColumnEAttributes()[i];
+            if (i < 3)
+				try {
+					JAXBUtils.setValue(eObject, attribute, value);
+				} catch (Exception e) {
+					MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+				}
+			else
+				try {
+					JAXBUtils.setValue(msgPattern, attribute, value);
+				} catch (Exception e) {
+					MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+				}
+        }
+        
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
+        }
+
+        return true;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ModuleWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ModuleWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ModuleWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ModuleWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,216 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ApplicationType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.ModuleType;
+import org.apache.geronimo.xml.ns.j2ee.application_1.PathType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/*
+ * @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+ */
+public class ModuleWizard extends AbstractTableWizard {
+
+    public ModuleWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "ModuleType", "Path", "AltDd" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_Module;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_Module;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.jface.wizard.IWizard#addPages()
+     */
+    public void addPages() {
+        addPage(new ModuleWizardPage("Page0"));
+    }
+
+    // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
+    // the values are brought in properly.
+    public class ModuleWizardPage extends AbstractTableWizardPage {
+        protected Button[] buttonList = new Button[4];
+        
+        public ModuleWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            GridData data;
+            ModuleType module = (ModuleType)eObject;
+            
+            // First we need a set of radio buttons to determine what kind of module we are
+            // dealing with.
+            Group group = new Group (composite, SWT.NONE);
+            Button button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.connector);
+            buttonList[0] = button;
+            button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.ejb);
+            buttonList[1] = button;
+            button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.java);
+            buttonList[2] = button;
+            button = new Button (group, SWT.RADIO);
+            button.setText(CommonMessages.web);
+            buttonList[3] = button;
+            FillLayout fillLayout = new FillLayout();
+            fillLayout.type = SWT.HORIZONTAL;
+            group.setLayout(fillLayout);
+            data = new GridData();
+            data.horizontalAlignment = GridData.FILL;
+            data.horizontalSpan = 2;
+            group.setLayoutData(data);
+            
+            for (int i = 1; i < section.getTableColumnNames().length; i++) {
+                Label label = new Label(composite, SWT.LEFT);
+                String columnName = section.getTableColumnNames()[i];
+                if (!columnName.endsWith(":"))
+                    columnName = columnName.concat(":");
+                label.setText(columnName);
+                data = new GridData();
+                data.horizontalAlignment = GridData.FILL;
+                label.setLayoutData(data);
+
+                Text text = new Text(composite, SWT.SINGLE | SWT.BORDER);
+                data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+                        | GridData.VERTICAL_ALIGN_FILL);
+                data.grabExcessHorizontalSpace = true;
+                data.widthHint = 100;
+                text.setLayoutData(data);
+                if (module != null) {
+                    if (i == 1) {
+                        if (module.getConnector() != null) {
+                            text.setText(module.getConnector().getValue());
+                            buttonList[0].setSelection(true);
+                        }
+                        else if (module.getEjb() != null) {
+                            text.setText(module.getEjb().getValue());
+                            buttonList[1].setSelection(true);
+                        }
+                        else if (module.getJava() != null) {
+                            text.setText(module.getJava().getValue());
+                            buttonList[2].setSelection(true);
+                        }
+                        else if (module.getWeb() != null) {
+                            text.setText(module.getWeb().getValue());
+                            buttonList[3].setSelection(true);
+                        }                        
+                    }
+                    else if (i == 2 && module.getAltDd() != null) {
+                        text.setText(module.getAltDd().getValue());
+                    }
+                }
+                textEntries[i - 1] = text;
+            }
+
+            doCustom(composite);
+            setControl(composite);
+            textEntries[0].setFocus();
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_Module;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_Module;
+        }
+    }
+
+    public boolean performFinish() {
+        AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
+        PathType path;
+        ModuleType module;
+
+        if (eObject == null) {
+            eObject = getEFactory().create(ModuleType.class);
+            JAXBElement plan = section.getPlan();
+
+            module = (ModuleType)eObject;
+
+            List moduleList = ((ApplicationType)plan.getValue()).getModule();
+            if (moduleList == null) {
+                moduleList = (List)getEFactory().create(ModuleType.class);
+            }
+            moduleList.add(eObject);
+        }
+        else {
+            module = (ModuleType)eObject;
+            module.setConnector(null);
+            module.setEjb(null);
+            module.setJava(null);
+            module.setWeb(null);
+        }
+
+        // NOTE!! this replaces the call to processEAttributes (page);
+        path = (PathType)getEFactory().create(PathType.class);
+        path.setValue(page.getTextEntry(0).getText());
+
+        if (((ModuleWizardPage)page).buttonList[0].getSelection())
+            module.setConnector(path);
+        else if (((ModuleWizardPage)page).buttonList[1].getSelection())
+            module.setEjb(path);
+        else if (((ModuleWizardPage)page).buttonList[2].getSelection())
+            module.setJava(path);
+        else if (((ModuleWizardPage)page).buttonList[3].getSelection())
+            module.setWeb(path);
+        
+        String altDD = page.getTextEntry(1).getText();
+        path = (PathType)getEFactory().create(PathType.class);
+        path.setValue(altDD);
+        module.setAltDd(path);
+        
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
+        }
+
+        return true;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceEnvRefWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ResourceEnvRefWizard extends AbstractTableWizard {
+
+ 
+    public ResourceEnvRefWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "RefName", "MessageDestinationLink" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardPageTitle_ResEnvRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_ResEnvRef;
+    }
+    
+    public void addPages() {
+        addPage(new ResourceEnvRefWizardPage("Page0"));
+    }
+
+    public class ResourceEnvRefWizardPage extends AbstractTableWizardPage {
+        public ResourceEnvRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_ResEnvRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_ResEnvRef;
+        }
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ResourceRefWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ResourceRefWizard extends AbstractTableWizard {
+
+    public ResourceRefWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "RefName", "ResourceLink" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardPageTitle_ResRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_ResRef;
+    }
+    
+    public void addPages() {
+        addPage(new ResourceRefWizardPage("Page0"));
+    }
+
+    public class ResourceRefWizardPage extends AbstractTableWizardPage {
+        public ResourceRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_ResRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_ResRef;
+        }
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleMappingWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleMappingWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleMappingWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRoleMappingWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,234 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import java.util.List;
+
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.xml.ns.security_1.DistinguishedNameType;
+import org.apache.geronimo.xml.ns.security_1.LoginDomainPrincipalType;
+import org.apache.geronimo.xml.ns.security_1.PrincipalType;
+import org.apache.geronimo.xml.ns.security_1.RealmPrincipalType;
+import org.apache.geronimo.xml.ns.security_1.RoleType;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ *  @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+ */
+public class SecurityRoleMappingWizard extends AbstractWizard {
+    public static final String[] PRINCIPAL_CLASSES = {
+            "org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal",
+            "org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" };
+
+    private final int DISTINGUISHED_NAME = 0;
+    private final int PRINCIPAL = 1;
+    private final int LOGIN_DOMAIN_PRINCIPAL = 2;
+    private final int REALM_PRINCIPAL = 3;
+    private final String[] ROLE_MAPPING_TYPES = {
+            "Distinguished Name", "Principal", "Login Domain Principal", "Realm Principal" };
+
+    protected AbstractTreeSection section;
+    protected Combo type;
+    protected Text name;
+    protected Combo clazz;
+    protected Text domainName;
+    protected Combo realmName;
+    
+    public SecurityRoleMappingWizard(AbstractTreeSection section) {
+        super();
+        this.section = section;
+    }
+
+    protected static String[] getSecurityRealms() {
+        List<String> securityRealms = GeronimoServerInfo.getInstance().getSecurityRealms();
+        return securityRealms.toArray(new String[securityRealms.size()]);
+    }
+
+    public class SecurityRoleMappingsWizardPage extends AbstractWizardPage {
+        protected Label nameLabel, clazzLabel, domainNameLabel, realmNameLabel;
+
+        public SecurityRoleMappingsWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel(composite, CommonMessages.type);
+            type = createCombo(composite, ROLE_MAPPING_TYPES, false);
+            nameLabel = createLabel(composite, CommonMessages.name);
+            name = createTextField(composite, "");
+            name.setFocus();
+            clazzLabel = createLabel(composite, CommonMessages.className);
+            clazz = createCombo(composite, PRINCIPAL_CLASSES, true);
+            clazz.select(0);
+            domainNameLabel = createLabel(composite, CommonMessages.editorDomainName);
+            domainName = createTextField(composite, "");
+            realmNameLabel = createLabel(composite, CommonMessages.editorRealmName);
+            realmName = createCombo(composite, getSecurityRealms(), true);
+
+            type.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    toggleFields();
+                }
+            });
+            if (eObject == null) {
+                type.select(DISTINGUISHED_NAME);
+            }
+            else {
+                // set the fields to the values in eObject and select the correct type
+                if (DistinguishedNameType.class.isInstance(eObject)) {
+                    name.setText(((DistinguishedNameType)eObject).getName());
+                    type.select(DISTINGUISHED_NAME);
+                }
+                else {
+                    name.setText(((PrincipalType)eObject).getName());
+                    clazz.setText(((PrincipalType)eObject).getClazz());
+                    if (LoginDomainPrincipalType.class.isInstance(eObject)) {
+                        domainName.setText(((LoginDomainPrincipalType)eObject).getDomainName());
+                        if (RealmPrincipalType.class.isInstance(eObject)) {
+                            realmName.setText(((RealmPrincipalType)eObject).getRealmName());
+                            type.select(REALM_PRINCIPAL);
+                        }
+                        else {
+                            type.select(LOGIN_DOMAIN_PRINCIPAL);
+                        }
+                    }
+                    else {
+                        type.select(PRINCIPAL);
+                    }
+                }
+                type.setEnabled(false);
+            }
+            toggleFields();
+            setControl(composite);
+        }
+
+        private void toggleFields() {
+            int selection = type.getSelectionIndex();
+            clazzLabel.setVisible (selection >= PRINCIPAL ? true : false);
+            clazz.setVisible (selection >= PRINCIPAL ? true : false);
+            domainNameLabel.setVisible (selection >= LOGIN_DOMAIN_PRINCIPAL ? true : false);
+            domainName.setVisible (selection >= LOGIN_DOMAIN_PRINCIPAL ? true : false);
+            realmNameLabel.setVisible (selection == REALM_PRINCIPAL ? true : false);
+            realmName.setVisible (selection == REALM_PRINCIPAL ? true : false);
+        }
+
+        @Override
+        protected String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_RoleMapping;
+        }
+
+        @Override
+        protected String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_RoleMapping;
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new SecurityRoleMappingsWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        switch (type.getSelectionIndex()) {
+        case DISTINGUISHED_NAME:
+            if (isEmpty(name.getText())) {
+                return false;
+            }
+            DistinguishedNameType distinguishedName = (DistinguishedNameType)eObject;
+            if (distinguishedName == null) {
+                distinguishedName = (DistinguishedNameType)getEFactory().create(DistinguishedNameType.class);
+                RoleType role = (RoleType) section.getSelectedObject();
+                role.getDistinguishedName().add(distinguishedName);
+            }
+            distinguishedName.setName(name.getText());
+            break;
+
+        case PRINCIPAL:
+            if (isEmpty(name.getText()) || isEmpty(clazz.getText())) {
+                return false;
+            }
+            PrincipalType principal = (PrincipalType)eObject;
+            if (principal == null) {
+                principal = (PrincipalType)getEFactory().create(PrincipalType.class);
+                RoleType role = (RoleType) section.getSelectedObject();
+                role.getPrincipal().add(principal);
+            }
+            principal.setName(name.getText());
+            principal.setClazz(clazz.getText());
+            break;
+
+        case LOGIN_DOMAIN_PRINCIPAL:
+            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())) {
+                return false;
+            }
+            LoginDomainPrincipalType loginDomainPrincipal = (LoginDomainPrincipalType)eObject;
+            if (loginDomainPrincipal == null) {
+                loginDomainPrincipal = (LoginDomainPrincipalType)getEFactory().create(LoginDomainPrincipalType.class);
+                RoleType role = (RoleType) section.getSelectedObject();
+                role.getLoginDomainPrincipal().add(loginDomainPrincipal);
+            }
+            loginDomainPrincipal.setName(name.getText());
+            loginDomainPrincipal.setClazz(clazz.getText());
+            loginDomainPrincipal.setDomainName(domainName.getText()); 
+            break;
+
+        case REALM_PRINCIPAL:
+            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())
+                    || isEmpty(realmName.getText())) {
+                return false;
+            }
+            RealmPrincipalType realmPrincipal = (RealmPrincipalType)eObject;
+            if (realmPrincipal == null) {
+                realmPrincipal = (RealmPrincipalType)getEFactory().create(RealmPrincipalType.class);
+                RoleType role = (RoleType) section.getSelectedObject();
+                role.getRealmPrincipal().add(realmPrincipal);
+            }
+            realmPrincipal.setName(name.getText());
+            realmPrincipal.setClazz(clazz.getText());
+            realmPrincipal.setDomainName(domainName.getText());
+            realmPrincipal.setRealmName(realmName.getText());
+            break;
+        }
+        return true;
+    }
+    
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    @Override
+    protected String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_RoleMapping;
+    }
+
+    @Override
+    protected String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_RoleMapping;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRunAsSubjectWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRunAsSubjectWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRunAsSubjectWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/SecurityRunAsSubjectWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,108 @@
+///*
+// * 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.
+// */
+//package org.apache.geronimo.st.v11.ui.wizards;
+//
+//import org.apache.geronimo.st.ui.CommonMessages;
+//import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+//import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+//import org.apache.geronimo.xml.ns.security_1.RoleType;
+//import org.eclipse.swt.widgets.Combo;
+//import org.eclipse.swt.widgets.Composite;
+//import org.eclipse.swt.widgets.Text;
+//
+///**
+// *  @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+// */
+//public class SecurityRunAsSubjectWizard extends AbstractWizard {
+//    protected Combo role;
+//    protected Text realm;
+//    protected Text id;
+//    protected AbstractTableSection section;
+//
+//    public SecurityRunAsSubjectWizard(AbstractTableSection section) {
+//        super();
+//        this.section = section;
+//    }
+//
+//    public class SecurityRunAsSubjectAddWizardPage extends AbstractWizardPage {
+//        public SecurityRunAsSubjectAddWizardPage(String pageName) {
+//            super(pageName);
+//        }
+//
+//        public void createControl(Composite parent) {
+//            Composite composite = createComposite(parent);
+//            createLabel(composite, CommonMessages.securityRunAsSubjectRole);
+//           // role = createCombo(composite, ((SecurityAdvancedSection) section).getRolesWithoutRunAsSubject(), false);
+//            createLabel(composite, CommonMessages.securityRunAsSubjectRealm);
+//            realm = createTextField(composite, "");
+//            createLabel(composite, CommonMessages.securityRunAsSubjectId);
+//            id = createTextField(composite, "");
+//            if (eObject != null) {
+//                //TODO  role.setText (((SecurityAdvancedSection) section).);
+//                //role.setEnabled(false);
+//                realm.setText (((RoleType)eObject).getRunAsSubject().getRealm());
+//                id.setText(((RoleType)eObject).getRunAsSubject().getId());
+//            }
+//            setControl(composite);
+//        }
+//
+//        @Override
+//        protected String getWizardPageTitle() {
+//            return CommonMessages.wizardPageTitle_RunAsSubject;
+//        }
+//
+//        @Override
+//        protected String getWizardPageDescription() {
+//            return CommonMessages.wizardPageDescription_RunAsSubject;
+//        }
+//    }
+//
+//    @Override
+//    public void addPages() {
+//        addPage(new SecurityRunAsSubjectAddWizardPage("Page0"));
+//    }
+//
+//    @Override
+//    public boolean performFinish() {
+//        if (isEmpty(realm.getText()) || isEmpty(id.getText())) {
+//            return false;
+//        }
+//        if (eObject == null) {
+//            SubjectInfo subjectInfo = new SubjectInfo();
+//            subjectInfo.setRealm(realm.getText());
+//            subjectInfo.setId(id.getText());
+//            ((SecurityAdvancedSection) section).getRole(role.getText()).setRunAsSubject(subjectInfo);
+//            ((SecurityAdvancedSection) section).activateAddButton();
+//        }
+//        else {
+//            ((Role)eObject).getRunAsSubject().setRealm(realm.getText());
+//            ((Role)eObject).getRunAsSubject().setId(id.getText());
+//        }
+//
+//        return true;
+//    }
+//
+//    @Override
+//    protected String getAddWizardWindowTitle() {
+//        return CommonMessages.wizardNewTitle_RunAsSubject;
+//    }
+//
+//    @Override
+//    protected String getEditWizardWindowTitle() {
+//        return CommonMessages.wizardNewTitle_RunAsSubject;
+//    }
+//}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServerCustomAssemblyWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServerCustomAssemblyWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServerCustomAssemblyWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServerCustomAssemblyWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,156 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import java.util.List;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.st.v21.core.operations.GeronimoServerPluginManager;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev: 723874 $ $Date: 2008-12-06 05:30:03 +0800 (Sat, 06 Dec 2008) $
+ */
+public class ServerCustomAssemblyWizard extends AbstractWizard {
+
+    private Table pluginTable;
+    
+    protected Text group;
+    protected Text artifact;
+    protected Text version;
+    protected Text type;
+    protected Text serverPath;
+
+    protected GeronimoServerPluginManager customAssembly;
+
+    public ServerCustomAssemblyWizard(GeronimoServerPluginManager customAssembly) {
+        super();
+        this.customAssembly = customAssembly;
+    }
+
+    public void addPages() {
+        addPage(new ServerCustomAssemblyWizardPage("page0"));
+    }
+
+    public class ServerCustomAssemblyWizardPage extends AbstractWizardPage {
+
+        public ServerCustomAssemblyWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            parent.setLayoutData(createGridData());
+            Composite composite = createComposite(parent);
+
+            createLabel(composite, CommonMessages.groupId);
+            group = createTextField(composite, "");
+            createLabel(composite, CommonMessages.artifactId);
+            artifact = createTextField(composite, "");
+            createLabel(composite, CommonMessages.version);
+            version = createTextField(composite, "1.0");
+            createLabel(composite, CommonMessages.type);
+            type = createTextField(composite, "tar.gz");
+            createLabel(composite, CommonMessages.path);
+            serverPath = createTextField(composite, "var/temp/assembly");
+            createTable(composite);
+            populateTable();
+
+            setControl(composite);
+        }
+
+        public GridData createGridData() {
+            GridData data = new GridData();
+            data.verticalAlignment = GridData.FILL;
+            data.horizontalAlignment = GridData.FILL;
+            data.grabExcessVerticalSpace = true;
+            data.grabExcessHorizontalSpace = true;
+            data.heightHint = 400;
+            data.widthHint = 300;
+            return data;
+        }
+
+        private void createTable(Composite composite) {
+            int style = SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+
+            pluginTable = new Table(composite, style);
+            GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
+            data.grabExcessHorizontalSpace = true;
+            data.grabExcessVerticalSpace = true;
+            data.horizontalSpan = 2;
+            data.horizontalAlignment = GridData.FILL;
+            data.heightHint = 250;
+            data.widthHint = 350;
+            pluginTable.setLayoutData(data);
+            pluginTable.setLinesVisible(false);
+            pluginTable.setHeaderVisible(true);
+
+            final TableColumn[] column = new TableColumn[1];
+            column[0] = new TableColumn(pluginTable, SWT.LEFT, 0);
+            column[0].setText(CommonMessages.plugin);
+            column[0].setWidth(400);
+        }
+
+        public void populateTable() {
+            List<String> pluginList = customAssembly.getPluginList();
+             
+            for (int i = 0; i < pluginList.size(); ++i) {
+                TableItem tableItem = new TableItem(pluginTable, SWT.NONE);
+                String tableEntry = pluginList.get(i);
+                tableItem.setData(tableEntry);
+                tableItem.setText(new String[] {tableEntry});
+            }
+        }
+
+        @Override
+        protected String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_ServerCustomAssembly;
+        }
+
+        @Override
+        protected String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_ServerCustomAssembly;
+        }
+    }
+
+    public boolean performFinish() {
+        if (isEmpty(group.getText()) || isEmpty(artifact.getText()) ||
+            isEmpty(version.getText()) || isEmpty(type.getText()) ||
+            isEmpty(serverPath.getText()) || pluginTable.getSelectionCount() == 0) {
+            return false;
+        }
+        customAssembly.assembleServer(group.getText(), artifact.getText(), version.getText(), type.getText(), 
+                serverPath.getText(), pluginTable.getSelectionIndices());
+        return true;
+    }
+
+    @Override
+    protected String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_ServerCustomAssembly;
+    }
+
+    @Override
+    protected String getEditWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_ServerCustomAssembly;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.java?rev=817996&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/wizards/ServiceRefWizard.java Wed Sep 23 08:04:12 2009
@@ -0,0 +1,241 @@
+/*
+ * 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.
+ */
+package org.apache.geronimo.st.v11.ui.wizards;
+
+import javax.xml.bind.JAXBElement;
+import org.apache.geronimo.st.core.jaxb.JAXBObjectFactory;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTreeWizard;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v21.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.xml.ns.naming_1.PortCompletionType;
+import org.apache.geronimo.xml.ns.naming_1.PortType;
+import org.apache.geronimo.xml.ns.naming_1.ServiceCompletionType;
+import org.apache.geronimo.xml.ns.naming_1.ServiceRefType;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ServiceRefWizard extends AbstractTreeWizard {
+
+    private final int SERVICE_REF = 0;
+    private final int PORT = 1;
+    private final int PORT_COMPLETION = 2;
+
+    public ServiceRefWizard(AbstractTreeSection section) {
+        super(section, 3, 7);
+        elementTypes[SERVICE_REF] = "Service Reference";
+        elementTypes[PORT] = "Port";
+        elementTypes[PORT_COMPLETION] = "Port Completion";
+    }
+
+    public class ServiceRefWizardPage extends AbstractTreeWizardPage {
+
+        public ServiceRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        protected void initControl () {
+            if (eObject == null) {
+                element.select(SERVICE_REF);
+                ServiceRefType serviceRef = (ServiceRefType)section.getSelectedObject();
+                // use of ports and port completions are mutually exclusive
+                if (serviceRef == null) {
+                    element.setEnabled(false);
+                } else if (serviceRef.getServiceCompletion() == null) {
+                    element.remove(PORT_COMPLETION);
+                } else {
+                    element.remove(PORT);
+                }
+            }
+            else {
+                if (ServiceRefType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((ServiceRefType)eObject).getServiceRefName());
+                    if (((ServiceRefType)eObject).getServiceCompletion() != null) {
+                        textList.get(1).setText(((ServiceRefType)eObject).getServiceCompletion().getServiceName());
+                    }
+                    element.select(SERVICE_REF);
+                }
+                else if (PortType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((PortType)eObject).getPortName());
+                    textList.get(1).setText(((PortType)eObject).getProtocol());
+                    textList.get(2).setText(((PortType)eObject).getHost());
+                    textList.get(3).setText(((PortType)eObject).getPort().toString());
+                    textList.get(4).setText(((PortType)eObject).getUri());
+                    textList.get(5).setText(((PortType)eObject).getCredentialsName());
+                    element.select(PORT);
+                }
+                else if (PortCompletionType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((PortCompletionType)eObject).getPort().getPortName());
+                    textList.get(1).setText(((PortCompletionType)eObject).getPort().getProtocol());
+                    textList.get(2).setText(((PortCompletionType)eObject).getPort().getHost());
+                    textList.get(3).setText(((PortCompletionType)eObject).getPort().getPort().toString());
+                    textList.get(4).setText(((PortCompletionType)eObject).getPort().getUri());
+                    textList.get(5).setText(((PortCompletionType)eObject).getPort().getCredentialsName());
+                    textList.get(6).setText(((PortCompletionType)eObject).getBindingName());
+                    element.select(PORT_COMPLETION);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            if (element.getText().equals(elementTypes[SERVICE_REF])) {
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 2 ? true : false);
+                    textList.get(i).setVisible(i < 2 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.serviceCompletionName);
+                // if we are doing an add, then we need to make sure that the longest
+                // text can be handled
+                labelList.get(2).setText(CommonMessages.protocol);
+                labelList.get(3).setText(CommonMessages.hostName);
+                labelList.get(4).setText(CommonMessages.portValue);
+                labelList.get(5).setText(CommonMessages.credential);
+                labelList.get(6).setText(CommonMessages.bindingName);
+            }
+            else if (element.getText().equals(elementTypes[PORT])) {
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 6 ? true : false);
+                    textList.get(i).setVisible(i < 6 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.protocol);
+                labelList.get(2).setText(CommonMessages.hostName);
+                labelList.get(3).setText(CommonMessages.portValue);
+                labelList.get(4).setText(CommonMessages.uri);
+                labelList.get(5).setText(CommonMessages.credential);
+            }
+            else if (element.getText().equals(elementTypes[PORT_COMPLETION])) {
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(true);
+                    textList.get(i).setVisible(true);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.name);
+                labelList.get(1).setText(CommonMessages.protocol);
+                labelList.get(2).setText(CommonMessages.hostName);
+                labelList.get(3).setText(CommonMessages.portValue);
+                labelList.get(4).setText(CommonMessages.uri);
+                labelList.get(5).setText(CommonMessages.credential);
+                labelList.get(6).setText(CommonMessages.bindingName);
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_ServiceRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_ServiceRef;
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new ServiceRefWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        ServiceRefType serviceRef;
+        if (element.getText().equals(elementTypes[SERVICE_REF])) {
+            if (isEmpty(textList.get(0).getText())) {
+                return false;
+            }
+            serviceRef = (ServiceRefType)eObject;
+            if (serviceRef == null) {
+                serviceRef = (ServiceRefType)getEFactory().create(ServiceRefType.class);
+                JAXBElement plan = section.getPlan();
+                JAXBModelUtils.getServiceRefs(plan).add(serviceRef);
+            }
+            serviceRef.setServiceRefName(textList.get(0).getText());
+            if (isEmpty(textList.get(1).getText())) {
+                serviceRef.setServiceCompletion(null);
+            }
+            else {
+                ServiceCompletionType serviceComp = serviceRef.getServiceCompletion();
+                if (serviceComp == null) {
+                    serviceComp = (ServiceCompletionType)getEFactory().create(ServiceCompletionType.class);
+                    serviceRef.setServiceCompletion(serviceComp);
+                }
+                serviceRef.getServiceCompletion().setServiceName(textList.get(1).getText());
+            }
+        }
+        else if (element.getText().equals(elementTypes[PORT])) {
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(4).getText())) {
+                return false;
+            }
+            PortType port = (PortType)eObject;
+            if (port == null) {
+                port = (PortType)getEFactory().create(PortType.class);
+                serviceRef = (ServiceRefType)section.getSelectedObject();
+                serviceRef.getPort().add(port);
+            }
+            port.setPortName(textList.get(0).getText());
+            port.setProtocol(textList.get(1).getText());
+            port.setHost(textList.get(2).getText());
+            port.setPort(Integer.valueOf(textList.get(3).getText()));
+            port.setUri(textList.get(4).getText());
+            port.setCredentialsName(textList.get(5).getText());
+        }
+        else if (element.getText().equals(elementTypes[PORT_COMPLETION])) { 
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(4).getText()) ||
+                isEmpty(textList.get(6).getText())) {
+                return false;
+            }
+            PortCompletionType portComp = (PortCompletionType)eObject;
+            if (portComp == null) {
+                portComp = (PortCompletionType)getEFactory().create(PortCompletionType.class);
+                serviceRef = (ServiceRefType)section.getSelectedObject();
+                serviceRef.getServiceCompletion().getPortCompletion().add(portComp);
+                PortType port = (PortType)getEFactory().create(PortType.class);
+                portComp.setPort (port);
+            }
+            portComp.getPort().setPortName(textList.get(0).getText());
+            portComp.getPort().setProtocol(textList.get(1).getText());
+            portComp.getPort().setHost(textList.get(2).getText());
+            portComp.getPort().setPort(Integer.valueOf(textList.get(3).getText()));
+            portComp.getPort().setUri(textList.get(4).getText());
+            portComp.getPort().setCredentialsName(textList.get(5).getText());
+            portComp.setBindingName(textList.get(6).getText());
+        }
+        return true;
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_ServiceRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_ServiceRef;
+    }
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/Activator.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/Activator.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/Activator.java Wed Sep 23 08:04:12 2009
@@ -17,7 +17,6 @@
 package org.apache.geronimo.st.v21.core;
 
 import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -68,7 +67,4 @@
 		return plugin;
 	}
 	
-	public static void log(int severity, String message, Throwable throwable) {
-		plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable));
-	}
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServer.java Wed Sep 23 08:04:12 2009
@@ -53,7 +53,7 @@
     /* (non-Javadoc)
      * @see org.apache.geronimo.st.core.GenericGeronimoServer#getContextRoot(org.eclipse.wst.server.core.IModule)
      */
-    public String getContextRoot(IModule module) {
+    public String getContextRoot(IModule module) throws Exception {
         return GeronimoV21Utils.getContextRoot(module);
     }
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviour.java Wed Sep 23 08:04:12 2009
@@ -204,6 +204,8 @@
 				e.printStackTrace();
 			} catch (InternalKernelException e) {
 				e.printStackTrace();
+			} catch (Exception e) {
+				e.printStackTrace();
 			} finally {
 				Thread.currentThread().setContextClassLoader(old);
 			}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21Utils.java Wed Sep 23 08:04:12 2009
@@ -37,7 +37,7 @@
  */
 public class GeronimoV21Utils extends GeronimoUtils {
 
-    public static JAXBElement getDeploymentPlan(IFile file) {
+    public static JAXBElement getDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getDeploymentPlan", file);
 
         if (!file.exists()) {
@@ -111,7 +111,7 @@
     //    return null;
     //}
 
-    public static String getConfigId(IModule module) {
+    public static String getConfigId(IModule module) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConfigId", module);
 
         Environment environment = null;
@@ -162,7 +162,7 @@
     //    return getQualifiedConfigID(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getType());
     //}
 
-    public static String getContextRoot(IModule module) {
+    public static String getContextRoot(IModule module) throws Exception {
         String contextRoot = null;
 
         WebApp deploymentPlan = getWebDeploymentPlan(module).getValue();
@@ -175,39 +175,39 @@
         return contextRoot;
     }
 
-    public static JAXBElement<WebApp> getWebDeploymentPlan(IModule module) {
+    public static JAXBElement<WebApp> getWebDeploymentPlan(IModule module) throws Exception {
         return getWebDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement<Application> getApplicationDeploymentPlan(IModule module) {
+    public static JAXBElement<Application> getApplicationDeploymentPlan(IModule module) throws Exception {
         return getApplicationDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement<OpenejbJar> getOpenEjbDeploymentPlan(IModule module) {
+    public static JAXBElement<OpenejbJar> getOpenEjbDeploymentPlan(IModule module) throws Exception {
         return getOpenEjbDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement<Connector> getConnectorDeploymentPlan(IModule module) {
+    public static JAXBElement<Connector> getConnectorDeploymentPlan(IModule module) throws Exception {
         return getConnectorDeploymentPlan(getVirtualComponent(module));
     }
 
-    public static JAXBElement getApplicationDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getApplicationDeploymentPlan(IVirtualComponent comp) throws Exception {
         return getApplicationDeploymentPlan(getApplicationDeploymentPlanFile(comp));
     }
 
-    public static JAXBElement getWebDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getWebDeploymentPlan(IVirtualComponent comp) throws Exception {
         return getWebDeploymentPlan(getWebDeploymentPlanFile(comp));
     }
 
-    public static JAXBElement getOpenEjbDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getOpenEjbDeploymentPlan(IVirtualComponent comp) throws Exception {
         return getOpenEjbDeploymentPlan(getOpenEjbDeploymentPlanFile(comp));
     }
 
-    public static JAXBElement getConnectorDeploymentPlan(IVirtualComponent comp) {
+    public static JAXBElement getConnectorDeploymentPlan(IVirtualComponent comp) throws Exception {
         return getConnectorDeploymentPlan(getConnectorDeploymentPlanFile(comp));
     }
 
-    public static JAXBElement getApplicationDeploymentPlan(IFile file) {
+    public static JAXBElement getApplicationDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getApplicationDeploymentPlan", file);
 
         if (file.getName().equals(APP_PLAN_NAME) && file.exists()) {
@@ -218,7 +218,7 @@
         return null;
     }
 
-    public static JAXBElement getApplicationClientDeploymentPlan(IFile file) {
+    public static JAXBElement getApplicationClientDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getApplicationClientDeploymentPlan", file);
 
         if (file.getName().equals(APP_CLIENT_PLAN_NAME) && file.exists()) {
@@ -229,7 +229,7 @@
         return null;
     }
 
-    public static JAXBElement getWebDeploymentPlan(IFile file) {
+    public static JAXBElement getWebDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getWebDeploymentPlan", file);
 
         if (file.getName().equals(WEB_PLAN_NAME) && file.exists()) {
@@ -240,7 +240,7 @@
         return null;
     }
 
-    public static JAXBElement getOpenEjbDeploymentPlan(IFile file) {
+    public static JAXBElement getOpenEjbDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getOpenEjbDeploymentPlan", file);
 
         if (file.getName().equals(OPENEJB_PLAN_NAME) && file.exists()) {
@@ -251,7 +251,7 @@
         return null;
     }
 
-    public static JAXBElement getConnectorDeploymentPlan(IFile file) {
+    public static JAXBElement getConnectorDeploymentPlan(IFile file) throws Exception {
         Trace.tracePoint("ENTRY", "GeronimoV21Utils.getConnectorDeploymentPlan", file);
 
         if (file.getName().equals(CONNECTOR_PLAN_NAME) && file.exists()) {

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21VersionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21VersionHandler.java?rev=817996&r1=817995&r2=817996&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21VersionHandler.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoV21VersionHandler.java Wed Sep 23 08:04:12 2009
@@ -32,7 +32,7 @@
 	 * 
 	 * @see org.apache.geronimo.st.core.IGeronimoVersionHandler#getConfigID(org.eclipse.wst.server.core.IModule)
 	 */
-	public String getConfigID(IModule module) {
+	public String getConfigID(IModule module) throws Exception {
 		return GeronimoV21Utils.getConfigId(module);
 	}
 	



Mime
View raw message