geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r818883 [5/7] - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.runtime.v11/ org.apache.geronimo.st.v11.core/ org.apache.geronimo.st.v11.core/src/main/ org.apache.geronimo.st.v11.core/src/main/java/ org.apache.geroni...
Date Fri, 25 Sep 2009 15:26:17 GMT
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/SecurityRoleMappingSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/SecurityRoleMappingSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/SecurityRoleMappingSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/SecurityRoleMappingSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,294 @@
+/*
+ * 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.sections;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.descriptor.AbstractDeploymentDescriptor;
+import org.apache.geronimo.st.core.descriptor.ApplicationDeploymentDescriptor;
+import org.apache.geronimo.st.core.descriptor.EjbDeploymentDescriptor;
+import org.apache.geronimo.st.core.descriptor.WebDeploymentDescriptor;
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.SecurityRoleMappingWizard;
+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.RoleMappingsType;
+import org.apache.geronimo.xml.ns.security_1.RoleType;
+import org.apache.geronimo.xml.ns.security_1.SecurityType;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev: 707635 $ $Date: 2008-10-24 21:55:28 +0800 (Fri, 24 Oct 2008) $
+ */
+public class SecurityRoleMappingSection extends AbstractTreeSection {
+
+    public SecurityRoleMappingSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style) {
+        super(plan, parent, toolkit, style);
+        createClient();
+    }
+
+    public SecurityRoleMappingSection(JAXBElement plan, AbstractDeploymentDescriptor descriptor, Composite parent,
+            FormToolkit toolkit, int style) {
+        super(plan, descriptor, parent, toolkit, style);
+        createClient();
+    }
+
+    @Override
+    protected boolean isRequiredSyncToolbarAction() {
+        return true;
+    }
+
+    @Override
+    protected IAction getSyncAction() {
+        return new SyncAction(CommonMessages.securityRefreshRoles) {
+            @Override
+            public void run() {
+                if( addRolesFromDeploymentDescriptor() ) {
+                    markDirty();
+                }
+            }
+        };
+    }
+
+    @Override
+    protected void activateRemoveButton() {
+        if (tree.getSelectionCount() > 0 && tree.getSelection()[0].getParentItem() != null) {
+            removeButton.setEnabled(true);
+        } else {
+            removeButton.setEnabled(false);
+        }
+    }
+
+    @Override
+    protected void activateEditButton() {
+        if (tree.getSelectionCount() > 0 && tree.getSelection()[0].getParentItem() != null) {
+            editButton.setEnabled(true);
+        } else {
+            editButton.setEnabled(false);
+        }
+    }
+
+    @Override
+    protected void activateAddButton() {
+        if (tree.getSelectionCount() > 0 && tree.getSelection()[0].getParentItem() == null) {
+            addButton.setEnabled(true);
+        } else {
+            addButton.setEnabled(false);
+        }
+    }
+
+    @Override
+    public void handleDelete() {
+        TreeItem selectedItem = tree.getSelection()[0];
+        Object selectedObject = selectedItem.getData();
+        RoleType role = (RoleType) selectedItem.getParentItem().getData();
+        try {
+			((ArrayList) JAXBUtils.getValue(role, selectedObject.getClass().getSimpleName())).remove(selectedObject);
+		} catch (Exception e) {
+			MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+		}
+    }
+
+    public RoleType getSelectedObject() {
+        return (RoleType) tree.getSelection()[0].getData();
+    }
+
+    @Override
+    public String getTitle() {
+        return CommonMessages.editorSectionSecurityRolesTitle;
+    }
+
+    @Override
+    public String getDescription() {
+        return CommonMessages.editorSectionSecurityRolesDescription;
+    }
+
+    @Override
+    public Wizard getWizard() {
+        return new SecurityRoleMappingWizard(this);
+    }
+
+    @Override
+    public Class getTableEntryObjectType() {
+        return RoleType.class;
+    }
+
+    @Override
+    public List getObjectContainer() {
+        return getRoles(getPlan(), false);
+    }
+
+    public static List<RoleType> getRoles(JAXBElement plan, boolean create) {
+    	RoleMappingsType roleMappings = getRoleMappings(plan, create);
+        if (roleMappings != null) {
+            return roleMappings.getRole();
+        }
+        return null;
+    }
+
+    public static RoleMappingsType getRoleMappings(JAXBElement plan, boolean create) {
+    	SecurityType security = JAXBModelUtils.getSecurity(plan);
+        if (security == null && create) {
+            security = new SecurityType();
+            JAXBModelUtils.setSecurity(plan, security);
+        }
+        if (security != null) {
+        	RoleMappingsType roleMappings = security.getRoleMappings();
+            if (roleMappings == null && create) {
+                roleMappings = new RoleMappingsType();
+                security.setRoleMappings(roleMappings);
+            }
+            return roleMappings;
+        }
+        return null;
+    }
+
+    protected boolean addRolesFromDeploymentDescriptor() {
+        List<String> declaredRoleNames = null;
+        if (WebDeploymentDescriptor.class.isInstance(getDescriptor())) {
+            declaredRoleNames = ((WebDeploymentDescriptor)getDescriptor()).getSecurityRoles();
+        }
+        else if (ApplicationDeploymentDescriptor.class.isInstance(getDescriptor())) {
+            declaredRoleNames = ((ApplicationDeploymentDescriptor)getDescriptor()).getSecurityRoles();
+        }
+        else if (EjbDeploymentDescriptor.class.isInstance(getDescriptor())) {
+            declaredRoleNames = ((EjbDeploymentDescriptor)getDescriptor()).getSecurityRoles();
+        }
+        
+        if (declaredRoleNames == null || declaredRoleNames.size() <= 0) {
+            return false;
+        }
+        List<RoleType> definedRoles = getRoles(getPlan(), true);
+        List<RoleType> newRoles = new ArrayList<RoleType>();
+        for (int i = 0; i < declaredRoleNames.size(); i++) {
+            String roleName = declaredRoleNames.get(i);
+            boolean roleExists = false;
+            for (int j = 0; j < definedRoles.size(); j++) {
+                if (definedRoles.get(j).getRoleName().equals(roleName)) {
+                    roleExists = true;
+                    break;
+                }
+            }
+            if (!roleExists) {
+            	RoleType newRole = new RoleType();
+                newRole.setRoleName(roleName);
+                newRoles.add(newRole);
+            }
+        }
+        definedRoles.addAll(newRoles);
+        return newRoles.size() > 0;
+    }
+
+    @Override
+    public Object getInput() {
+        addRolesFromDeploymentDescriptor();
+        return getRoleMappings(getPlan(), false);
+    }
+
+    @Override
+    public ITreeContentProvider getContentProvider() {
+        return new ContentProvider() {
+            @Override
+            public Object[] getElements(Object inputElement) {
+                return getChildren(inputElement);
+            }
+
+            @Override
+            public Object[] getChildren(Object parentElement) {
+                if (RoleMappingsType.class.isInstance(parentElement)) {
+                    return ((RoleMappingsType) parentElement).getRole().toArray();
+                }
+                if (parentElement instanceof RoleType) {
+                	RoleType role = (RoleType) parentElement;
+                    return concat(role.getDistinguishedName().toArray(), role.getPrincipal().toArray(), 
+                            role.getLoginDomainPrincipal().toArray(), role.getRealmPrincipal().toArray());
+                }
+                return new String[] {};
+            }
+
+            private Object[] concat(Object[] arr1, Object[] arr2, Object[] arr3, Object[] arr4) {
+                Object[] all = new Object[arr1.length + arr2.length + arr3.length + arr4.length];
+                System.arraycopy(arr1, 0, all, 0, arr1.length);
+                System.arraycopy(arr2, 0, all, arr1.length, arr2.length);
+                System.arraycopy(arr3, 0, all, arr1.length + arr2.length, arr3.length);
+                System.arraycopy(arr4, 0, all, arr1.length + arr2.length + arr3.length, arr4.length);
+                return all;
+            }
+        };
+    }
+
+    @Override
+    public ILabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getText(Object element) {
+                if (RoleType.class.isInstance(element)) {
+                	RoleType role = (RoleType) element;
+                    return "Role: role-name = \"" + role.getRoleName() + "\"";
+                }
+                else if (element instanceof DistinguishedNameType) {
+                	DistinguishedNameType object = (DistinguishedNameType) element;
+                    return "DistinguishedName: name = \"" + object.getName() + "\"";
+                }
+                else if (element instanceof RealmPrincipalType) {
+                	RealmPrincipalType object = (RealmPrincipalType) element;
+                    return "RealmPrincipal: name = \"" + object.getName() +
+                            "\", class = \"" + object.getClazz() +
+                            "\", domain-name = \"" + object.getDomainName() +
+                            "\", realm-name = \"" + object.getRealmName() +"\"";
+                }
+                else if (element instanceof LoginDomainPrincipalType) {
+                	LoginDomainPrincipalType object = (LoginDomainPrincipalType) element;
+                    return "LoginDomainPrincipal: name = \"" + object.getName() +
+                            "\", class = \"" + object.getClazz() +
+                            "\", domain-name = \"" + object.getDomainName() +"\"";
+                }
+                else if (element instanceof PrincipalType) {
+                	PrincipalType object = (PrincipalType) element;
+                    return "Principal: name = \"" + object.getName() +
+                            "\", class = \"" + object.getClazz() + "\"";
+                }
+
+                return null;
+            }
+
+            @Override
+            public Image getImage(Object arg0) {
+                return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee",
+                        "icons/full/obj16/security_role.gif").createImage();
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/ServiceRefSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,180 @@
+/*
+ * 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.sections;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractTreeSection;
+import org.apache.geronimo.st.v11.ui.Activator;
+import org.apache.geronimo.st.v11.ui.wizards.ServiceRefWizard;
+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.ServiceRefType;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class ServiceRefSection extends AbstractTreeSection {
+    public ServiceRefSection(JAXBElement plan, Composite parent, FormToolkit toolkit, int style, List serviceRefs) {
+        super(plan, parent, toolkit, style);
+        this.objectContainer = serviceRefs;
+        createClient();
+    }
+
+    @Override
+    public String getTitle() {
+        return CommonMessages.editorServiceRefTitle;
+    }
+
+    @Override
+    public String getDescription() {
+        return CommonMessages.editorServiceRefDescription;
+    }
+
+    @Override
+    public Wizard getWizard() {
+        return new ServiceRefWizard(this);
+    }
+
+    @Override
+    public Class getTableEntryObjectType() {
+        return ServiceRefType.class;
+    }
+
+    @Override
+    protected void activateAddButton() {
+        if (tree.getSelectionCount() == 0 || tree.getSelection()[0].getParentItem() == null) {
+            addButton.setEnabled(true);
+        } else {
+            addButton.setEnabled(false);
+        }
+    }
+
+    public ServiceRefType getSelectedObject () {
+        if (tree.getSelection().length == 0) {
+            return null;
+        }
+        return (ServiceRefType)tree.getSelection()[0].getData();
+    }
+    
+    @Override
+    public void removeItem(Object anItem) {
+        if (ServiceRefType.class.isInstance(anItem)) {
+            getObjectContainer().remove(anItem);
+        }
+        else if (PortType.class.isInstance(anItem)) {
+        	ServiceRefType serviceRef = (ServiceRefType)tree.getSelection()[0].getParentItem().getData();
+            serviceRef.getPort().remove(anItem);
+        }
+        else if (PortCompletionType.class.isInstance(anItem)) {
+        	ServiceRefType serviceRef = (ServiceRefType)tree.getSelection()[0].getParentItem().getData();
+            serviceRef.getServiceCompletion().getPortCompletion().remove(anItem);
+        }
+    }
+    
+    @Override
+    public Object getInput() {
+        if (objectContainer != null) {
+            return objectContainer;
+        }
+        return super.getInput();
+    }
+
+    @Override
+    public ITreeContentProvider getContentProvider() {
+        return new ContentProvider() {
+            @Override
+            public Object[] getElements(Object inputElement) {
+                return getChildren(inputElement);
+            }
+
+            @Override
+            public Object[] getChildren(Object parentElement) {
+                if (List.class.isInstance(parentElement)) {
+                    return ((List)parentElement).toArray();
+                }
+                if (ServiceRefType.class.isInstance(parentElement)) {
+                    ServiceRefType serviceRef = (ServiceRefType)parentElement;
+                    Object[] portList = serviceRef.getPort().toArray();
+                    Object[] compList = new Object[0];
+                    if (serviceRef.getServiceCompletion() != null) {
+                        compList = serviceRef.getServiceCompletion().getPortCompletion().toArray();
+                    }
+                    Object[] fullList = new Object[portList.length + compList.length];
+                    System.arraycopy(portList, 0, fullList, 0, portList.length);
+                    System.arraycopy(compList, 0, fullList, portList.length, compList.length);
+                    return fullList;
+                }
+                return new String[] {};
+            }
+        };
+    }
+
+    @Override
+    public ILabelProvider getLabelProvider() {
+        return new LabelProvider() {
+            @Override
+            public String getText(Object element) {
+                if (ServiceRefType.class.isInstance(element)) {
+                	ServiceRefType serviceRef = (ServiceRefType)element;
+                        String retString = "Service Ref: name = \"" + serviceRef.getServiceRefName() + "\"";
+                        if (serviceRef.getServiceCompletion() != null) {
+                            retString += ", service completion name = \"" + serviceRef.getServiceCompletion().getServiceName() + "\"";
+                        }
+                        return retString;
+                }
+                else if (PortType.class.isInstance(element)) {
+                	PortType port = (PortType)element;
+                    return "Port: name = \"" + port.getPortName() + 
+                            "\", protocol = \"" + port.getProtocol() + 
+                            "\", host = \"" + port.getHost() + 
+                            "\", port = \"" + port.getPort() + 
+                            "\", uri = \"" + port.getUri() + 
+                            "\", credential = \"" + port.getCredentialsName() + "\"";
+                }
+                else if (PortCompletionType.class.isInstance(element)) {
+                	PortCompletionType portComp = (PortCompletionType)element;
+                    return "Port Completion: name = \"" + portComp.getPort().getPortName() + 
+                            "\", protocol = \"" + portComp.getPort().getProtocol() + 
+                            "\", host = \"" + portComp.getPort().getHost() + 
+                            "\", port = \"" + portComp.getPort().getPort() + 
+                            "\", uri = \"" + portComp.getPort().getUri() + 
+                            "\", credential = \"" + portComp.getPort().getCredentialsName() +
+                            "\", binding name = \"" + portComp.getBindingName() + "\"";
+                }
+
+                return null;
+            }
+
+            @Override
+            public Image getImage(Object arg0) {
+                return Activator.imageDescriptorFromPlugin("org.eclipse.jst.j2ee",
+                        "icons/full/obj16/module_web_obj.gif").createImage();
+            }
+        };
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebContainerSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,261 @@
+/*
+ * 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.sections;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.ui.sections.AbstractSectionPart;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.apache.geronimo.xml.ns.naming_1.GbeanLocatorType;
+import org.apache.geronimo.xml.ns.naming_1.ObjectFactory;
+import org.apache.geronimo.xml.ns.naming_1.PatternType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WebContainerSection extends AbstractSectionPart {
+
+    protected Text gBeanLink;
+
+    protected Text artifact;
+
+    protected Text group;
+
+    protected Text module;
+
+    protected Text name;
+
+    protected Text version;
+
+    protected Button specifyAsLink;
+
+    protected Button specifyAsPattern;
+
+    WebAppType plan;
+    
+    private ObjectFactory namingFactory;
+
+    /**
+     * @param parent
+     * @param toolkit
+     * @param style
+     * @param plan
+     */
+    public WebContainerSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+        super(parent, toolkit, style, plan);
+        this.plan = (WebAppType) plan.getValue();
+        namingFactory = new ObjectFactory();
+        createClient();
+    }
+
+    protected void createClient() {
+        Section section = getSection();
+
+        section.setText(CommonMessages.webContainerSection);
+        section.setDescription(CommonMessages.webContainerSectionDescription);
+        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+        Composite composite = toolkit.createComposite(section);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.marginHeight = 5;
+        layout.marginWidth = 10;
+        layout.verticalSpacing = 5;
+        layout.horizontalSpacing = 15;
+        composite.setLayout(layout);
+        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        section.setClient(composite);
+
+        specifyAsLink = toolkit.createButton(composite, CommonMessages.useGBeanLink, SWT.RADIO);
+        GridData data = new GridData();
+        data.horizontalSpan = 2;
+        specifyAsLink.setLayoutData(data);
+
+        GbeanLocatorType wc = plan.getWebContainer();
+
+        toolkit.createLabel(composite, CommonMessages.gBeanLink);
+        String value = wc != null ? wc.getGbeanLink() : null;
+        gBeanLink = toolkit.createText(composite, value, SWT.BORDER);
+        gBeanLink.setLayoutData(createTextFieldGridData());
+        gBeanLink.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getGBeanLocator().setGbeanLink(gBeanLink.getText());
+                markDirty();
+            }
+        });
+
+        specifyAsPattern = toolkit.createButton(composite, CommonMessages.useGBeanPattern, SWT.RADIO);
+        specifyAsPattern.setLayoutData(data);
+
+        toolkit.createLabel(composite, CommonMessages.groupId);
+        value = wc != null && wc.getPattern() != null ? wc.getPattern().getGroupId()
+                : null;
+        group = toolkit.createText(composite, value, SWT.BORDER);
+        group.setLayoutData(createTextFieldGridData());
+        group.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getPattern().setGroupId(group.getText());
+                markDirty();
+            }
+        });
+
+        toolkit.createLabel(composite, CommonMessages.artifactId);
+        value = wc != null && wc.getPattern() != null ? wc.getPattern().getArtifactId()
+                : null;
+        artifact = toolkit.createText(composite, value, SWT.BORDER);
+        artifact.setLayoutData(createTextFieldGridData());
+        artifact.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getPattern().setArtifactId(artifact.getText());
+                markDirty();
+            }
+        });
+
+        toolkit.createLabel(composite, CommonMessages.moduleId);
+        value = wc != null && wc.getPattern() != null ? wc.getPattern().getModule()
+                : null;
+        module = toolkit.createText(composite, value, SWT.BORDER);
+        module.setLayoutData(createTextFieldGridData());
+        module.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getPattern().setModule(module.getText());
+                markDirty();
+            }
+        });
+
+        toolkit.createLabel(composite, CommonMessages.name);
+        value = wc != null && wc.getPattern() != null ? wc.getPattern().getName()
+                : null;
+        name = toolkit.createText(composite, value, SWT.BORDER);
+        name.setLayoutData(createTextFieldGridData());
+        name.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getPattern().setName(name.getText());
+                markDirty();
+            }
+        });
+
+        toolkit.createLabel(composite, CommonMessages.version);
+        value = wc != null && wc.getPattern() != null ? wc.getPattern().getVersion()
+                : null;
+        version = toolkit.createText(composite, value, SWT.BORDER);
+        version.setLayoutData(createTextFieldGridData());
+        version.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                getPattern().setVersion(version.getText());
+                markDirty();
+            }
+        });
+
+        specifyAsLink.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                if (specifyAsLink.getSelection()) {
+                    getGBeanLocator().setPattern(null);
+                    if (gBeanLink.getText().length() > 0) {
+                        plan.getWebContainer().setGbeanLink(gBeanLink.getText());
+                    }
+                    markDirty();
+                    toggle();
+                }
+            }
+        });
+ 
+        specifyAsPattern.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                if (specifyAsPattern.getSelection()) {
+                	if (plan.getWebContainer() != null) {
+                	    plan.getWebContainer().setGbeanLink (null);
+                	}
+                    if (group.getText().length() > 0) {
+                        getPattern().setGroupId(group.getText());
+                    }
+                    if (artifact.getText().length() > 0) {
+                        getPattern().setArtifactId(artifact.getText());
+                    }
+                    if (module.getText().length() > 0) {
+                        getPattern().setModule(module.getText());
+                    }
+                    if (name.getText().length() > 0) {
+                        getPattern().setName(name.getText());
+                    }
+                    if (version.getText().length() > 0) {
+                        getPattern().setVersion(version.getText());
+                    }
+                    markDirty();
+                    toggle();
+                }
+            }
+        });
+
+        if (wc != null) {
+            if (wc.getGbeanLink() != null) {
+                specifyAsLink.setSelection(true);
+            } else if (wc.getPattern() != null) {
+                specifyAsPattern.setSelection(true);
+            }
+        }
+
+        toggle();
+    }
+
+    public void toggle() {
+        gBeanLink.setEnabled(specifyAsLink.getSelection());
+        artifact.setEnabled(specifyAsPattern.getSelection());
+        group.setEnabled(specifyAsPattern.getSelection());
+        module.setEnabled(specifyAsPattern.getSelection());
+        name.setEnabled(specifyAsPattern.getSelection());
+        version.setEnabled(specifyAsPattern.getSelection());
+    }
+
+    /**
+     * @return
+     */
+    private GbeanLocatorType getGBeanLocator() {
+    	GbeanLocatorType wc = plan.getWebContainer();
+        if (wc == null) {
+            wc = namingFactory.createGbeanLocatorType();
+            plan.setWebContainer(wc);
+        }
+        return wc;
+    }
+
+    /**
+     * @return
+     */
+    private PatternType getPattern() {
+        GbeanLocatorType locator = getGBeanLocator();
+        PatternType pattern = locator.getPattern();
+        if (pattern == null) {
+            pattern = namingFactory.createPatternType();
+            locator.setPattern(pattern);
+        }
+        return pattern;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/sections/WebGeneralSection.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,88 @@
+/*
+ * 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.sections;
+
+import javax.xml.bind.JAXBElement;
+
+//import org.apache.geronimo.jee.web.WebApp;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.xml.ns.j2ee.web_1.WebAppType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WebGeneralSection extends CommonGeneralSection {
+
+	protected Text contextRoot;
+
+    protected Text workDir;
+
+    protected Text securityRealmName;
+
+	WebAppType plan;
+
+	public WebGeneralSection(Composite parent, FormToolkit toolkit, int style, JAXBElement plan) {
+		super(parent, toolkit, style, plan);
+		this.plan = (WebAppType) plan.getValue();
+		createClient();
+	}
+
+	protected void createClient() {
+		super.createClient();
+		Composite composite = (Composite) getSection().getClient();
+
+		createLabel(composite, CommonMessages.editorContextRoot);
+
+        contextRoot = toolkit.createText(composite, plan.getContextRoot(), SWT.BORDER);
+        contextRoot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+        contextRoot.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                plan.setContextRoot(contextRoot.getText());
+                markDirty();
+            }
+        });
+
+        createLabel(composite, CommonMessages.editorWorkDir);
+
+//        workDir = toolkit.createText(composite, plan.getWorkDir(), SWT.BORDER);
+//        workDir.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+//        workDir.addModifyListener(new ModifyListener() {
+//            public void modifyText(ModifyEvent e) {
+//                plan.setWorkDir(workDir.getText());
+//                markDirty();
+//            }
+//        });
+
+        createLabel(composite, CommonMessages.editorSecurityRealmName);
+
+        securityRealmName = toolkit.createText(composite, plan.getSecurityRealmName(), SWT.BORDER);
+        securityRealmName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+        securityRealmName.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                plan.setSecurityRealmName(securityRealmName.getText());
+                markDirty();
+            }
+        });
+	}
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/AdminObjectWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/AdminObjectWizard.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/AdminObjectWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/AdminObjectWizard.java Fri Sep 25 15:26:14 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 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.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v11.ui.sections.AdminObjectSection;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.AdminobjectInstanceType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.AdminobjectType;
+import org.apache.geronimo.xml.ns.j2ee.connector_1.ConfigPropertySettingType;
+
+/**
+ * @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+ */
+public class AdminObjectWizard extends AbstractTreeWizard {
+
+    private final int ADMIN_OBJECT = 0;
+    private final int ADMIN_OBJECT_INSTANCE = 1;
+    private final int CONFIG_PROPERTY_SETTING = 2;
+
+    public AdminObjectWizard(AbstractTreeSection section) {
+        super(section, 3, 2);
+        elementTypes[ADMIN_OBJECT] = "Admin Object";
+        elementTypes[ADMIN_OBJECT_INSTANCE] = "Admin Object Instance";
+        elementTypes[CONFIG_PROPERTY_SETTING] = "Config Property";
+    }
+
+    public class EjbRelationWizardPage extends AbstractTreeWizardPage {
+
+        public EjbRelationWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        protected void initControl () {
+            if (eObject == null) {
+                element.select(ADMIN_OBJECT);
+                if (AdminobjectType.class.isInstance(((AdminObjectSection)section).getSelectedObject())) {
+                    element.remove(elementTypes[CONFIG_PROPERTY_SETTING]);
+                }
+                else if (AdminobjectInstanceType.class.isInstance(((AdminObjectSection)section).getSelectedObject())) {
+                    element.select(CONFIG_PROPERTY_SETTING);
+                    element.setEnabled(false);
+                }
+                else {
+                    element.setEnabled(false);
+                }
+            }
+            else {
+                if (AdminobjectType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((AdminobjectType)eObject).getAdminobjectInterface());
+                    textList.get(1).setText(((AdminobjectType)eObject).getAdminobjectClass());
+                    element.select(ADMIN_OBJECT);
+                }
+                else if (AdminobjectInstanceType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((AdminobjectInstanceType)eObject).getMessageDestinationName());
+                    element.select(ADMIN_OBJECT_INSTANCE);
+                }
+                else if (ConfigPropertySettingType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((ConfigPropertySettingType)eObject).getName());
+                    textList.get(1).setText(((ConfigPropertySettingType)eObject).getValue());
+                    element.select(CONFIG_PROPERTY_SETTING);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            if (element.getText().equals(elementTypes[ADMIN_OBJECT])) {
+                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.interfaceName);
+                labelList.get(1).setText(CommonMessages.className);
+            }
+            else if (element.getText().equals(elementTypes[ADMIN_OBJECT_INSTANCE])) {
+                for (int i = 0; i < maxTextFields; i++) {
+                    labelList.get(i).setVisible(i < 1 ? true : false);
+                    textList.get(i).setVisible(i < 1 ? true : false);
+                    if (clearFields == true) {
+                        textList.get(i).setText("");
+                    }
+                }
+                labelList.get(0).setText(CommonMessages.messageDestinationName);
+            }
+            else if (element.getText().equals(elementTypes[CONFIG_PROPERTY_SETTING])) {
+                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.value);
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_AdminObject;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_AdminObject;
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new EjbRelationWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        AdminobjectType admin;
+        if (element.getText().equals(elementTypes[ADMIN_OBJECT])) {
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            admin = (AdminobjectType)eObject;
+            if (admin == null) {
+                admin = (AdminobjectType)getEFactory().create(AdminobjectType.class);
+                List objectList = (List)section.getInput();
+                objectList.add (admin);
+            }
+            admin.setAdminobjectInterface(textList.get(0).getText());
+            admin.setAdminobjectClass(textList.get(1).getText());
+        }
+        else if (element.getText().equals(elementTypes[ADMIN_OBJECT_INSTANCE])) {
+            if (isEmpty(textList.get(0).getText())) {
+                return false;
+            }
+            AdminobjectInstanceType aoInstance = (AdminobjectInstanceType)eObject;
+            if (aoInstance == null) {
+                aoInstance = (AdminobjectInstanceType)getEFactory().create(AdminobjectInstanceType.class);
+                admin = (AdminobjectType)((AdminObjectSection)section).getSelectedObject();
+                admin.getAdminobjectInstance().add(aoInstance);
+            }
+            aoInstance.setMessageDestinationName(textList.get(0).getText());
+        }
+        else if (element.getText().equals(elementTypes[CONFIG_PROPERTY_SETTING])) { 
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            ConfigPropertySettingType property = (ConfigPropertySettingType)eObject;
+            if (property == null) {
+                property = (ConfigPropertySettingType)getEFactory().create(ConfigPropertySettingType.class);
+                AdminobjectInstanceType aoInstance = (AdminobjectInstanceType)((AdminObjectSection)section).getSelectedObject();
+                aoInstance.getConfigPropertySetting().add(property);
+            }
+            property.setName(textList.get(0).getText());
+            property.setValue(textList.get(1).getText());
+        }
+        return true;
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_AdminObject;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_AdminObject;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/ClassFilterWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/ClassFilterWizard.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/ClassFilterWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/ClassFilterWizard.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,112 @@
+/*
+ * 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.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.st.v11.ui.sections.ClassFilterSection;
+import org.apache.geronimo.xml.ns.deployment_1.ClassFilterType;
+import org.apache.geronimo.xml.ns.deployment_1.EnvironmentType;
+
+/**
+ * @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+ */
+public class ClassFilterWizard extends AbstractTableWizard {
+
+    protected boolean isServerEnvironment;
+    
+    public ClassFilterWizard(AbstractTableSection section, boolean isServerEnvironment) {
+        super(section);
+        this.isServerEnvironment = isServerEnvironment;
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "Value" };
+    }
+
+    public void addPages() {
+        addPage(new ClassFilterWizardPage("Page0"));
+    }
+    
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_Dependency;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_Dependency;
+    }
+
+    public class ClassFilterWizardPage extends AbstractTableWizardPage {
+        public ClassFilterWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_Dependency;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_Dependency;
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.geronimo.st.ui.wizards.AbstractTableWizard#performFinish()
+     */
+    public boolean performFinish() {
+        AbstractTableWizardPage page = (AbstractTableWizardPage) getPages()[0];
+
+        if (eObject == null) {
+            eObject = new String();
+            JAXBElement plan = section.getPlan();
+
+            EnvironmentType environment = null;
+          	environment = JAXBModelUtils.getEnvironment(plan, isServerEnvironment);
+            if (environment == null) {
+                environment = (EnvironmentType)getEFactory().create(EnvironmentType.class);
+                JAXBModelUtils.setEnvironment (plan, environment, isServerEnvironment);
+            }
+
+            ClassFilterType filter = ((ClassFilterSection)section).getClassFilter();
+            if (filter == null) {
+                filter = (ClassFilterType)getEFactory().create(ClassFilterType.class);
+                ((ClassFilterSection)section).setClassFilter (filter);
+            }
+            filter.getFilter().add(page.getTextEntry(0).getText());
+        }
+        else {
+        	ClassFilterType filter = ((ClassFilterSection)section).getClassFilter();
+            filter.getFilter().set(filter.getFilter().indexOf(eObject), page.getTextEntry(0).getText());
+        }
+
+        if (section.getViewer().getInput() == null) {
+            section.getViewer().setInput(section.getInput());
+        }
+
+        return true;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/DependencyWizard.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,166 @@
+/*
+ * 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.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractTableWizard;
+import org.apache.geronimo.st.v11.core.GeronimoServerInfo;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.xml.ns.deployment_1.DependencyType;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class DependencyWizard extends AbstractTableWizard {
+
+    private Table dependencyTable;
+    private TabFolder tabFolder;
+
+    public DependencyWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "GroupId", "ArtifactId", "Version", "Type" };
+    }
+
+    protected String[] dependencyToStringArray(DependencyType dependency) {
+        String[] stringArray = new String[getTableColumnEAttributes().length];
+        stringArray[0] = dependency.getGroupId();
+        stringArray[1] = dependency.getArtifactId();
+        stringArray[2] = dependency.getVersion();
+        stringArray[3] = dependency.getType();
+        return stringArray;
+    }
+
+    public void addPages() {
+        addPage(new DependencyWizardPage("AddDependencyPage"));
+    }
+
+    public class DependencyWizardPage extends AbstractTableWizardPage {
+
+        public DependencyWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            parent.setLayoutData(createGridData());
+
+            Composite composite = createComposite(parent);
+            tabFolder = new TabFolder(composite, SWT.NONE);
+            tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+            TabItem item1 = new TabItem(tabFolder, SWT.NONE);
+            item1.setText(CommonMessages.wizardTabManual_Dependency);
+            Composite addManuallyComposite = createComposite(tabFolder);
+            createEditFields(addManuallyComposite);
+            item1.setControl(addManuallyComposite);
+
+            if (eObject == null) {
+                TabItem item2 = new TabItem(tabFolder, SWT.NONE);
+                item2.setText(CommonMessages.wizardTabServer_Dependency);
+                int columnWidths[] = { 80, 220, 50, 65 };
+                dependencyTable = createTable(tabFolder, section.getTableColumnNames(), columnWidths);
+                populateTable();
+                item2.setControl(dependencyTable);
+            }
+            tabFolder.pack();
+            doCustom(composite);
+            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 = 230;
+            data.widthHint = 300;
+            return data;
+        }
+
+        public void populateTable() {
+            List<DependencyType> serverList = GeronimoServerInfo.getInstance().getCommonLibs();
+            List<DependencyType> alreadyAddedDependencies = (List<DependencyType>) section.getObjectContainer();
+            serverList.removeAll(alreadyAddedDependencies);
+            for (int i = 0; i < serverList.size(); ++i) {
+                TableItem tabItem = new TableItem(dependencyTable, SWT.NONE);
+                DependencyType dependency = serverList.get(i);
+                tabItem.setData(dependency);
+                tabItem.setText(dependencyToStringArray(dependency));
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_Dependency;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_Dependency;
+        }
+    }
+
+    public boolean performFinish() {
+        switch (tabFolder.getSelectionIndex()) {
+        case -1:
+            // no item selected!
+            return false;
+        case 0:
+            // Adding Manually
+            if (eObject == null) {
+                eObject = new DependencyType();
+                section.getObjectContainer().add(eObject);
+            }
+            processEAttributes(getPages()[0]);
+            break;
+        case 1:
+            // Adding from Server
+            TableItem[] selectedItems = dependencyTable.getSelection();
+            for (int i = 0; i < selectedItems.length; i++) {
+                TableItem selectedItem = selectedItems[i];
+                DependencyType dependency = (DependencyType) selectedItem.getData();
+                section.getObjectContainer().add(dependency);
+            }
+            break;
+        }
+        return true;
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_Dependency;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_Dependency;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbLocalRefWizard.java Fri Sep 25 15:26:14 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 EjbLocalRefWizard extends AbstractTableWizard {
+
+    public EjbLocalRefWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "RefName", "EjbLink" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_EjbLocalRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_EjbLocalRef;
+    }
+    
+    public void addPages() {
+        addPage(new EjbLocalRefWizardPage("Page0"));
+    }
+
+    public class EjbLocalRefWizardPage extends AbstractTableWizardPage {
+        public EjbLocalRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_EjbLocalRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_EjbLocalRef;
+        }
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRefWizard.java Fri Sep 25 15:26:14 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 EjbRefWizard extends AbstractTableWizard {
+
+    public EjbRefWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String[] getTableColumnEAttributes() {
+        return new String[] { "RefName", "EjbLink" };
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_EjbRef;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_EjbRef;
+    }
+    
+    public void addPages() {
+        addPage(new EjbRefWizardPage("Page0"));
+    }
+
+    public class EjbRefWizardPage extends AbstractTableWizardPage {
+        public EjbRefWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_EjbRef;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_EjbRef;
+        }
+    }
+}

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRelationWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRelationWizard.java?rev=818883&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRelationWizard.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/main/java/org/apache/geronimo/st/v11/ui/wizards/EjbRelationWizard.java Fri Sep 25 15:26:14 2009
@@ -0,0 +1,223 @@
+/*
+ * 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.v11.core.jaxb.JAXBModelUtils;
+import org.apache.geronimo.st.v11.core.jaxb.JAXBObjectFactoryImpl;
+import org.apache.geronimo.st.v11.ui.sections.EjbRelationSection;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationType;
+import org.openejb.xml.ns.openejb_jar_2.EjbRelationshipRoleType;
+import org.openejb.xml.ns.openejb_jar_2.RelationshipsType;
+
+/**
+ * @version $Rev: 720616 $ $Date: 2008-11-26 05:49:55 +0800 (Wed, 26 Nov 2008) $
+ */
+public class EjbRelationWizard extends AbstractTreeWizard {
+
+    private final int EJB_RELATION = 0;
+    private final int RELATIONSHIP_ROLE = 1;
+    private final int CMR_FIELD_MAPPING = 2;
+
+    public EjbRelationWizard(AbstractTreeSection section) {
+        super(section, 3, 3);
+        elementTypes[EJB_RELATION] = "EJB Relation";
+        elementTypes[RELATIONSHIP_ROLE] = "EJB Relationship Role";
+        elementTypes[CMR_FIELD_MAPPING] = "CMR Field Mapping";
+    }
+
+    public class EjbRelationWizardPage extends AbstractTreeWizardPage {
+
+        public EjbRelationWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        protected void initControl () {
+            if (eObject == null) {
+                element.select(EJB_RELATION);
+                if (EjbRelationType.class.isInstance(((EjbRelationSection)section).getSelectedObject())) {
+                    element.remove(elementTypes[CMR_FIELD_MAPPING]);
+                }
+                else if (EjbRelationshipRoleType.class.isInstance(((EjbRelationSection)section).getSelectedObject())) {
+                    element.select(CMR_FIELD_MAPPING);
+                    element.setEnabled(false);
+                }
+                else {
+                    element.setEnabled(false);
+                }
+            }
+            else {
+                if (EjbRelationType.class.isInstance(eObject)) {
+                    textList.get(0).setText(((EjbRelationType)eObject).getEjbRelationName());
+                    textList.get(1).setText(((EjbRelationType)eObject).getManyToManyTableName());
+                    element.select(EJB_RELATION);
+                }
+                else if (EjbRelationshipRoleType.class.isInstance(eObject)) {
+                	EjbRelationshipRoleType role = (EjbRelationshipRoleType)eObject;
+                    textList.get(0).setText(role.getEjbRelationshipRoleName());
+                    textList.get(1).setText(role.getRelationshipRoleSource().getEjbName());
+                    textList.get(2).setText(role.getCmrField().getCmrFieldName());
+                    element.select(RELATIONSHIP_ROLE);
+                }
+                else if (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class.isInstance(eObject)) {
+                	EjbRelationshipRoleType.RoleMapping.CmrFieldMapping fieldMapping =
+                            (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping)eObject;
+                    textList.get(0).setText(fieldMapping.getKeyColumn());
+                    textList.get(1).setText(fieldMapping.getForeignKeyColumn());
+                    element.select(CMR_FIELD_MAPPING);
+                }
+                element.setEnabled(false);
+            }
+        }
+        
+        protected void toggleFields (boolean clearFields) {
+            if (element.getText().equals(elementTypes[EJB_RELATION])) {
+                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.mtmTableName);
+                // if we are doing an add, then we need to make sure that the longest
+                // text can be handled
+                labelList.get(2).setText(CommonMessages.foreignKeyColumn);
+            }
+            else if (element.getText().equals(elementTypes[RELATIONSHIP_ROLE])) {
+                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.ejbSourceName);
+                labelList.get(2).setText(CommonMessages.cmrFieldName);
+            }
+            else if (element.getText().equals(elementTypes[CMR_FIELD_MAPPING])) {
+                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.keyColumn);
+                labelList.get(1).setText(CommonMessages.foreignKeyColumn);
+            }
+        }
+
+        public String getWizardPageTitle() {
+            return CommonMessages.wizardPageTitle_EjbRelation;
+        }
+
+        public String getWizardPageDescription() {
+            return CommonMessages.wizardPageDescription_EjbRelation;
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new EjbRelationWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        EjbRelationType relation;
+        if (element.getText().equals(elementTypes[EJB_RELATION])) {
+            relation = (EjbRelationType)eObject;
+            if (relation == null) {
+                relation = (EjbRelationType)getEFactory().create(EjbRelationType.class);
+                JAXBElement plan = section.getPlan();
+                
+                if (JAXBModelUtils.getEjbRelationships(plan) == null) {
+                	RelationshipsType relationships = (RelationshipsType)getEFactory().create(RelationshipsType.class);
+
+                    JAXBModelUtils.setEjbRelationships(plan, relationships);
+                    ((EjbRelationSection)section).resetInput(relationships);
+                }
+                JAXBModelUtils.getEjbRelationships(plan).add(relation);
+            }
+            relation.setEjbRelationName(textList.get(0).getText());
+            relation.setManyToManyTableName(textList.get(1).getText());
+        }
+        else if (element.getText().equals(elementTypes[RELATIONSHIP_ROLE])) {
+            if (isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            EjbRelationshipRoleType role = (EjbRelationshipRoleType)eObject;
+            if (role == null) {
+                role = (EjbRelationshipRoleType)getEFactory().create(EjbRelationshipRoleType.class);
+                relation = (EjbRelationType)((EjbRelationSection)section).getSelectedObject();
+                relation.getEjbRelationshipRole().add(role);
+            }
+            role.setEjbRelationshipRoleName(textList.get(0).getText());
+            EjbRelationshipRoleType.RelationshipRoleSource source = role.getRelationshipRoleSource();
+            if (source == null) {
+                source = (EjbRelationshipRoleType.RelationshipRoleSource)getEFactory().create(EjbRelationshipRoleType.RelationshipRoleSource.class);
+                role.setRelationshipRoleSource(source);
+            }
+            source.setEjbName(textList.get(1).getText());
+            EjbRelationshipRoleType.CmrField cmrField = role.getCmrField();
+            if (cmrField == null) {
+                cmrField = (EjbRelationshipRoleType.CmrField)getEFactory().create(EjbRelationshipRoleType.CmrField.class);
+                role.setCmrField(cmrField);
+            }
+            cmrField.setCmrFieldName(textList.get(2).getText());
+        }
+        else if (element.getText().equals(elementTypes[CMR_FIELD_MAPPING])) { 
+            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText())) {
+                return false;
+            }
+            EjbRelationshipRoleType.RoleMapping.CmrFieldMapping fieldMapping =
+                    (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping)eObject;
+            if (fieldMapping == null) {
+                fieldMapping = (EjbRelationshipRoleType.RoleMapping.CmrFieldMapping)getEFactory().create(EjbRelationshipRoleType.RoleMapping.CmrFieldMapping.class);
+                EjbRelationshipRoleType role = (EjbRelationshipRoleType)((EjbRelationSection)section).getSelectedObject();
+                EjbRelationshipRoleType.RoleMapping roleMapping = role.getRoleMapping();
+                if (roleMapping == null) {
+                    roleMapping = (EjbRelationshipRoleType.RoleMapping)getEFactory().create(EjbRelationshipRoleType.RoleMapping.class);
+                    role.setRoleMapping(roleMapping);
+                }
+                role.getRoleMapping().getCmrFieldMapping().add(fieldMapping);
+            }
+            fieldMapping.setKeyColumn(textList.get(0).getText());
+            fieldMapping.setForeignKeyColumn(textList.get(1).getText());
+        }
+        return true;
+    }
+
+    public JAXBObjectFactory getEFactory() {
+        return JAXBObjectFactoryImpl.getInstance();
+    }
+
+    public String getAddWizardWindowTitle() {
+        return CommonMessages.wizardNewTitle_EjbRelation;
+    }
+
+    public String getEditWizardWindowTitle() {
+        return CommonMessages.wizardEditTitle_EjbRelation;
+    }
+}



Mime
View raw message