geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shiv...@apache.org
Subject svn commit: r688452 [3/3] - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.jee.v21.jaxbmodel/src/main/java/org/apache/geronimo/jee/deployment/ org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/ org.apache.geroni...
Date Sun, 24 Aug 2008 05:56:22 GMT
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ExtModuleWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ExtModuleWizard.java?rev=688452&r1=688451&r2=688452&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ExtModuleWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ExtModuleWizard.java
Sat Aug 23 22:56:20 2008
@@ -81,9 +81,7 @@
      * @see org.eclipse.jface.wizard.IWizard#addPages()
      */
     public void addPages() {
-        ModuleWizardPage page = new ModuleWizardPage("Page0");
-        page.setImageDescriptor(descriptor);
-        addPage(page);
+        addPage(new ModuleWizardPage("Page0"));
     }
 
     // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
@@ -318,8 +316,8 @@
             extModule.setInternalPath(null);
         }
 
-        if (section.getTableViewer().getInput() == section.getPlan()) {
-            section.getTableViewer().setInput(section.getInput());
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
         }
 
         return true;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanRefWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanRefWizard.java?rev=688452&r1=688451&r2=688452&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanRefWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanRefWizard.java
Sat Aug 23 22:56:20 2008
@@ -75,9 +75,7 @@
      * @see org.eclipse.jface.wizard.IWizard#addPages()
      */
     public void addPages() {
-        GbeanRefWizardPage page = new GbeanRefWizardPage("Page0");
-        page.setImageDescriptor(descriptor);
-        addPage(page);
+        addPage(new GbeanRefWizardPage("Page0"));
     }
 
     // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
@@ -154,8 +152,8 @@
         GbeanRef gbeanRef = (GbeanRef) eObject;
         gbeanRef.getRefType().add(page.getTextEntry(1).getText());
 
-        if (section.getTableViewer().getInput() == section.getPlan()) {
-            section.getTableViewer().setInput(section.getInput());
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
         }
 
         return true;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanWizard.java?rev=688452&r1=688451&r2=688452&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/GBeanWizard.java
Sat Aug 23 22:56:20 2008
@@ -74,8 +74,8 @@
 
         processEAttributes (page);
 
-        if (section.getTableViewer().getInput() == null) {
-            section.getTableViewer().setInput(section.getInput());
+        if (section.getViewer().getInput() == null) {
+            section.getViewer().setInput(section.getInput());
         }
 
         return true;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/MessageDestWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/MessageDestWizard.java?rev=688452&r1=688451&r2=688452&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/MessageDestWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/MessageDestWizard.java
Sat Aug 23 22:56:20 2008
@@ -75,9 +75,7 @@
      * @see org.eclipse.jface.wizard.IWizard#addPages()
      */
     public void addPages() {
-        MessageDestWizardPage page = new MessageDestWizardPage("Page0");
-        page.setImageDescriptor(descriptor);
-        addPage(page);
+        addPage(new MessageDestWizardPage("Page0"));
     }
 
     // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
@@ -163,8 +161,8 @@
                 JAXBUtils.setValue(msgPattern, attribute, value);
         }
         
-        if (section.getTableViewer().getInput() == section.getPlan()) {
-            section.getTableViewer().setInput(section.getInput());
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
         }
 
         return true;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ModuleWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ModuleWizard.java?rev=688452&r1=688451&r2=688452&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ModuleWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/ModuleWizard.java
Sat Aug 23 22:56:20 2008
@@ -76,9 +76,7 @@
      * @see org.eclipse.jface.wizard.IWizard#addPages()
      */
     public void addPages() {
-        ModuleWizardPage page = new ModuleWizardPage("Page0");
-        page.setImageDescriptor(descriptor);
-        addPage(page);
+        addPage(new ModuleWizardPage("Page0"));
     }
 
     // need to extend the DynamicWizardPage only so that when the Edit dialog is shown
@@ -209,8 +207,8 @@
         path.setValue(altDD);
         module.setAltDd(path);
         
-        if (section.getTableViewer().getInput() == section.getPlan()) {
-            section.getTableViewer().setInput(section.getInput());
+        if (section.getViewer().getInput() == section.getPlan()) {
+            section.getViewer().setInput(section.getInput());
         }
 
         return true;

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java?rev=688452&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java
Sat Aug 23 22:56:20 2008
@@ -0,0 +1,188 @@
+/*
+ * 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.v21.ui.wizards;
+
+import java.util.List;
+
+import org.apache.geronimo.jee.security.DistinguishedName;
+import org.apache.geronimo.jee.security.LoginDomainPrincipal;
+import org.apache.geronimo.jee.security.Principal;
+import org.apache.geronimo.jee.security.RealmPrincipal;
+import org.apache.geronimo.jee.security.Role;
+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.ui.sections.SecurityRoleMappingsSection;
+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$ $Date$
+ */
+public class SecurityRoleMappingsAddWizard extends AbstractWizard {
+    public static final String[] PRINCIPAL_CLASSES = {
+            "org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal",
+            "org.apache.geronimo.security.realm.providers.GeronimoUserPrincipal" };
+
+    protected Combo type;
+    protected Text name;
+    protected Combo clazz;
+    protected Text domainName;
+    protected Combo realmName;
+
+    public SecurityRoleMappingsAddWizard(AbstractTreeSection section) {
+        super(section);
+    }
+
+    public String[] getPrincipalTypes() {
+        return new String[] { "DistinguishedName", "Principal", "LoginDomainPrincipal", "RealmPrincipal"
};
+    }
+
+    protected static String[] getSecurityRealms() {
+        List<String> securityRealms = GeronimoServerInfo.getInstance().getSecurityRealms();
+        return securityRealms.toArray(new String[securityRealms.size()]);
+    }
+
+    public class SecurityRoleMappingsAddWizardPage extends AbstractWizardPage {
+        protected Label nameLabel, clazzLabel, domainNameLabel, realmNameLabel;
+
+        public SecurityRoleMappingsAddWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel(composite, "Type");
+            type = createCombo(composite, getPrincipalTypes(), false);
+            nameLabel = createLabel(composite, "Name");
+            name = createTextFeild(composite, "");
+            name.setFocus();
+            clazzLabel = createLabel(composite, "Clazz");
+            clazz = createCombo(composite, PRINCIPAL_CLASSES, true);
+            clazz.select(0);
+            domainNameLabel = createLabel(composite, "DomainName");
+            domainName = createTextFeild(composite, "");
+            realmNameLabel = createLabel(composite, "RealmName");
+            realmName = createCombo(composite, getSecurityRealms(), true);
+
+            type.addSelectionListener(new SelectionAdapter() {
+                public void widgetSelected(SelectionEvent arg0) {
+                    switch (type.getSelectionIndex()) {
+                    case 0:
+                        showFeilds(false, false, false);
+                        break;
+                    case 1:
+                        showFeilds(true, false, false);
+                        break;
+                    case 2:
+                        showFeilds(true, true, false);
+                        break;
+                    case 3:
+                        showFeilds(true, true, true);
+                    }
+                }
+            });
+            type.select(1);
+            showFeilds(true, false, false);
+            setControl(composite);
+        }
+
+        private void showFeilds(boolean clazzVisibility, boolean domainNameVisibility, boolean
realmNameVisibility) {
+            clazzLabel.setVisible(clazzVisibility);
+            clazz.setVisible(clazzVisibility);
+            domainNameLabel.setVisible(domainNameVisibility);
+            domainName.setVisible(domainNameVisibility);
+            realmNameLabel.setVisible(realmNameVisibility);
+            realmName.setVisible(realmNameVisibility);
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new SecurityRoleMappingsAddWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        Role role = ((SecurityRoleMappingsSection) section).getSelectedRoleDuringAdd();
+        switch (type.getSelectionIndex()) {
+        case 0:
+            if (isEmpty(name.getText())) {
+                return false;
+            }
+            DistinguishedName distinguishedName = new DistinguishedName();
+            distinguishedName.setName(name.getText());
+            role.getDistinguishedName().add(distinguishedName);
+            break;
+        case 1:
+            if (isEmpty(name.getText()) || isEmpty(clazz.getText())) {
+                return false;
+            }
+            Principal principal = new Principal();
+            principal.setName(name.getText());
+            principal.setClazz(clazz.getText());
+            role.getPrincipal().add(principal);
+            break;
+        case 2:
+            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText()))
{
+                return false;
+            }
+            LoginDomainPrincipal loginDomainPrincipal = new LoginDomainPrincipal();
+            loginDomainPrincipal.setName(name.getText());
+            loginDomainPrincipal.setClazz(clazz.getText());
+            loginDomainPrincipal.setDomainName(domainName.getText());
+            role.getLoginDomainPrincipal().add(loginDomainPrincipal);
+            break;
+        case 3:
+            if (isEmpty(name.getText()) || isEmpty(clazz.getText()) || isEmpty(domainName.getText())
+                    || isEmpty(realmName.getText())) {
+                return false;
+            }
+            RealmPrincipal realmPrincipal = new RealmPrincipal();
+            realmPrincipal.setName(name.getText());
+            realmPrincipal.setClazz(clazz.getText());
+            realmPrincipal.setDomainName(domainName.getText());
+            realmPrincipal.setRealmName(realmName.getText());
+            role.getRealmPrincipal().add(realmPrincipal);
+            break;
+        }
+        return true;
+    }
+
+    @Override
+    protected String getWizardWindowTitle() {
+        return "Add Role Mapping";
+        //return CommonMessages.wizardNewTitle_SecurityRole;
+    }
+
+    @Override
+    protected String getWizardPageTitle() {
+        return "New Security Role Mapping";
+        //return CommonMessages.wizardNewTitle_SecurityRole;
+    }
+
+    @Override
+    protected String getWizardPageDescription() {
+        return "Provide details for this role mapping";
+        //return CommonMessages.wizardPageDescription_SecurityRole;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsAddWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java?rev=688452&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java
Sat Aug 23 22:56:20 2008
@@ -0,0 +1,132 @@
+/*
+ * 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.v21.ui.wizards;
+
+import org.apache.geronimo.jee.security.DistinguishedName;
+import org.apache.geronimo.jee.security.LoginDomainPrincipal;
+import org.apache.geronimo.jee.security.Principal;
+import org.apache.geronimo.jee.security.RealmPrincipal;
+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.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SecurityRoleMappingsEditWizard extends AbstractWizard {
+    protected Text name;
+    protected Combo clazz;
+    protected Text domainName;
+    protected Combo realmName;
+
+    public SecurityRoleMappingsEditWizard(AbstractTreeSection section) {
+        super(section);
+    }
+
+    public Object getSelectedObject() {
+        return eObject;
+    }
+
+    public class SecurityRoleMappingsEditWizardPage extends AbstractWizardPage {
+        public SecurityRoleMappingsEditWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel(composite, "Name");
+            name = createTextFeild(composite, "");
+            name.setFocus();
+            if (getSelectedObject() instanceof DistinguishedName) {
+                name.setText(((DistinguishedName) getSelectedObject()).getName());
+            }
+            if (getSelectedObject() instanceof Principal) {
+                name.setText(((Principal) getSelectedObject()).getName());
+                createLabel(composite, "Clazz");
+                clazz = createCombo(composite, SecurityRoleMappingsAddWizard.PRINCIPAL_CLASSES,
true);
+                clazz.setText(((Principal) getSelectedObject()).getClazz());
+            }
+            if (getSelectedObject() instanceof LoginDomainPrincipal) {
+                createLabel(composite, "DomainName");
+                domainName = createTextFeild(composite, "");
+                domainName.setText(((LoginDomainPrincipal) getSelectedObject()).getDomainName());
+            }
+            if (getSelectedObject() instanceof RealmPrincipal) {
+                createLabel(composite, "RealmName");
+                realmName = createCombo(composite, SecurityRoleMappingsAddWizard.getSecurityRealms(),
true);
+                realmName.setText(((RealmPrincipal) getSelectedObject()).getRealmName());
+            }
+            setControl(composite);
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new SecurityRoleMappingsEditWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        if (isEmpty(name.getText())) {
+            return false;
+        }
+        if (getSelectedObject() instanceof DistinguishedName) {
+            ((DistinguishedName) getSelectedObject()).setName(name.getText());
+        }
+        if (getSelectedObject() instanceof Principal) {
+            ((Principal) getSelectedObject()).setName(name.getText());
+            if (isEmpty(clazz.getText())) {
+                return false;
+            }
+            ((Principal) getSelectedObject()).setClazz(clazz.getText());
+        }
+        if (getSelectedObject() instanceof LoginDomainPrincipal) {
+            if (isEmpty(domainName.getText())) {
+                return false;
+            }
+            ((LoginDomainPrincipal) getSelectedObject()).setDomainName(domainName.getText());
+        }
+        if (getSelectedObject() instanceof RealmPrincipal) {
+            if (isEmpty(realmName.getText())) {
+                return false;
+            }
+            ((RealmPrincipal) getSelectedObject()).setRealmName(realmName.getText());
+        }
+        return true;
+    }
+
+    @Override
+    protected String getWizardWindowTitle() {
+        return "Edit Role Mapping";
+        //return CommonMessages.wizardEditTitle_SecurityRole;
+    }
+
+    @Override
+    protected String getWizardPageTitle() {
+        return "Edit Security Role Mapping";
+        //return CommonMessages.wizardNewTitle_SecurityRole;
+    }
+
+    @Override
+    protected String getWizardPageDescription() {
+        return "Provide details for this role mapping";
+        //return CommonMessages.wizardPageDescription_SecurityRole;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRoleMappingsEditWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java?rev=688452&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java
Sat Aug 23 22:56:20 2008
@@ -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.v21.ui.wizards;
+
+import org.apache.geronimo.jee.security.SubjectInfo;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.apache.geronimo.st.v21.ui.sections.SecurityAdvancedSection;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SecurityRunAsSubjectAddWizard extends AbstractWizard {
+    protected Combo role;
+    protected Text realm;
+    protected Text id;
+
+    public SecurityRunAsSubjectAddWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    public class SecurityRunAsSubjectAddWizardPage extends AbstractWizardPage {
+        public SecurityRunAsSubjectAddWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel(composite, "Role");
+            role = createCombo(composite, ((SecurityAdvancedSection) section).getRolesWithoutRunAsSubject(),
false);
+            createLabel(composite, "Realm");
+            realm = createTextFeild(composite, "");
+            createLabel(composite, "Id");
+            id = createTextFeild(composite, "");
+            setControl(composite);
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new SecurityRunAsSubjectAddWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        if (isEmpty(realm.getText()) || isEmpty(id.getText())) {
+            return false;
+        }
+        SubjectInfo subjectInfo = new SubjectInfo();
+        subjectInfo.setRealm(realm.getText());
+        subjectInfo.setId(id.getText());
+        ((SecurityAdvancedSection) section).getRole(role.getText()).setRunAsSubject(subjectInfo);
+        ((SecurityAdvancedSection) section).activateAddButton();
+        return true;
+    }
+
+    @Override
+    protected String getWizardWindowTitle() {
+        return "Add Run-As Subject";
+    }
+
+    @Override
+    protected String getWizardPageTitle() {
+        return "New Security Run-As Subject";
+    }
+
+    @Override
+    protected String getWizardPageDescription() {
+        return "Specify details for this run-as-subject";
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectAddWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java?rev=688452&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java
Sat Aug 23 22:56:20 2008
@@ -0,0 +1,87 @@
+/*
+ * 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.v21.ui.wizards;
+
+import org.apache.geronimo.jee.security.Role;
+import org.apache.geronimo.jee.security.SubjectInfo;
+import org.apache.geronimo.st.ui.sections.AbstractTableSection;
+import org.apache.geronimo.st.ui.wizards.AbstractWizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class SecurityRunAsSubjectEditWizard extends AbstractWizard {
+    protected Text realm;
+    protected Text id;
+
+    public SecurityRunAsSubjectEditWizard(AbstractTableSection section) {
+        super(section);
+    }
+
+    private SubjectInfo getSubjectInfo() {
+        return ((Role)eObject).getRunAsSubject();
+    }
+
+    public class SecurityRunAsSubjectEditWizardPage extends AbstractWizardPage {
+        public SecurityRunAsSubjectEditWizardPage(String pageName) {
+            super(pageName);
+        }
+
+        public void createControl(Composite parent) {
+            Composite composite = createComposite(parent);
+            createLabel(composite, "Realm");
+            realm = createTextFeild(composite, "");
+            realm.setText(getSubjectInfo().getRealm());
+            createLabel(composite, "Id");
+            id = createTextFeild(composite, "");
+            id.setText(getSubjectInfo().getId());
+            setControl(composite);
+        }
+    }
+
+    @Override
+    public void addPages() {
+        addPage(new SecurityRunAsSubjectEditWizardPage("Page0"));
+    }
+
+    @Override
+    public boolean performFinish() {
+        if (isEmpty(realm.getText()) || isEmpty(id.getText())) {
+            return false;
+        }
+        getSubjectInfo().setRealm(realm.getText());
+        getSubjectInfo().setId(id.getText());
+        return true;
+    }
+
+    @Override
+    protected String getWizardWindowTitle() {
+        return "Edit Run-As Subject";
+    }
+
+    @Override
+    protected String getWizardPageTitle() {
+        return "Edit Security Run-As Subject";
+    }
+
+    @Override
+    protected String getWizardPageDescription() {
+        return "Specify details for this run-as-subject";
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/SecurityRunAsSubjectEditWizard.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message