geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Jiang <genspr...@gmail.com>
Subject Re: svn commit: r1359524 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.schemas/v30/ org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/ org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/
Date Tue, 10 Jul 2012 08:59:37 GMT
We'd better to file a jira before the code committ

On Tue, Jul 10, 2012 at 4:41 PM, <johnxiao@apache.org> wrote:

> Author: johnxiao
> Date: Tue Jul 10 08:41:40 2012
> New Revision: 1359524
>
> URL: http://svn.apache.org/viewvc?rev=1359524&view=rev
> Log:
> Could not synchronize the security tab with source tab in
> geronimo-application.xml and openejb-jar.xml
>
> Added:
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
>   (with props)
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
>   (with props)
> Modified:
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.schemas/v30/openejb-jar-2.2.xsd
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoJAXBBasedEditor.java
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.jaxbmodel/src/main/java/org/apache/geronimo/jee/loginconfig/LoginConfig.java
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractDeploymentPlanFormPage.java
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractGeronimoFormPage.java
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/SecurityRealmSection.java
>
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.schemas/v30/openejb-jar-2.2.xsd
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.schemas/v30/openejb-jar-2.2.xsd?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.schemas/v30/openejb-jar-2.2.xsd
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.schemas/v30/openejb-jar-2.2.xsd
> Tue Jul 10 08:41:40 2012
> @@ -18,27 +18,25 @@
>    */
>  -->
>
> -<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="
> http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:o="
> http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:tns="
> http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:pkgen="
> http://openejb.apache.org/xml/ns/pkgen-2.1" xmlns:sys="
> http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:naming="
> http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ns1="
> http://geronimo.apache.org/xml/ns/security-2.0" xmlns:app="
> http://geronimo.apache.org/xml/ns/j2ee/application-1.2" xmlns:xs="
> http://www.w3.org/2001/XMLSchema">
> -
> -<xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.2"
> schemaLocation="geronimo-naming-1.2.xsd"/>
> -
> - <xs:import namespace="http://geronimo.apache.org/xml/ns/security-2.0"
> schemaLocation="geronimo-security-2.0.xsd"/>
> -
> - <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.2"
> -        schemaLocation="geronimo-module-1.2.xsd">
> -        <xs:annotation>
> -            <xs:documentation>
> -                Import Geronimo Services deployment plans. The imported
> plan
> -                includes complex types like moduleType, environmentType,
> -                dependenciesType, etc. required by this plan schema.
> -            </xs:documentation>
> -        </xs:annotation>
> -    </xs:import>
> +<xs:schema elementFormDefault="qualified" version="1.0"
> +    targetNamespace="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> +    xmlns:o="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> +    xmlns:tns="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> +    xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1"
> +    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"
> +    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
> +    xmlns:ns1="http://geronimo.apache.org/xml/ns/security-2.0"
> +    xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.2"
> +    xmlns:xs="http://www.w3.org/2001/XMLSchema"
> +    xmlns:per="http://java.sun.com/xml/ns/persistence">
> +
> +    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.2"
> schemaLocation="geronimo-naming-1.2.xsd"/>
> +    <xs:import namespace="http://openejb.apache.org/xml/ns/pkgen-2.1"
> schemaLocation="pkgen-2.1.xsd"/>
> +    <xs:import namespace="
> http://geronimo.apache.org/xml/ns/deployment-1.2"
> schemaLocation="geronimo-module-1.2.xsd"/>
> +    <xs:import namespace="http://geronimo.apache.org/xml/ns/security-2.0"
> schemaLocation="geronimo-security-2.0.xsd"/>
> +    <xs:import namespace="
> http://geronimo.apache.org/xml/ns/j2ee/application-1.2"
> schemaLocation="geronimo-application-1.2.xsd"/>
> +    <xs:import namespace="http://java.sun.com/xml/ns/persistence"
> schemaLocation="persistence_2_0.xsd"/>
>
> -  <xs:import namespace="http://openejb.apache.org/xml/ns/pkgen-2.1"
> schemaLocation="pkgen-2.1.xsd"/>
> -
> -  <xs:import namespace="
> http://geronimo.apache.org/xml/ns/j2ee/application-1.2"
> schemaLocation="geronimo-application-1.2.xsd"/>
> -
>    <xs:element name="jndi">
>      <xs:complexType>
>        <xs:sequence/>
> @@ -143,7 +141,7 @@
>        <xs:element name="tss" type="naming:patternType" minOccurs="0"/>
>        <xs:choice maxOccurs="unbounded">
>          <xs:element ref="naming:abstract-naming-entry"/>
> -        <xs:element ref="naming:entity-manager-factory-ref"/>
> +        <xs:element ref="naming:persistence-context-ref"/>
>          <xs:element ref="naming:gbean-ref"/>
>        </xs:choice>
>        <xs:element ref="naming:persistence-context-ref"
> maxOccurs="unbounded" minOccurs="0"/>
> @@ -160,6 +158,7 @@
>      <xs:attribute name="id" type="xs:ID"/>
>    </xs:complexType>
>
> +<!--
>    <xs:complexType name="ejb-refType">
>      <xs:sequence>
>        <xs:element ref="naming:ref-name"/>
> @@ -171,6 +170,7 @@
>        <xs:element ref="naming:ejb-link" minOccurs="0"/>
>      </xs:sequence>
>    </xs:complexType>
> +-->
>
>    <xs:complexType name="web-service-securityType">
>      <xs:sequence>
> @@ -238,13 +238,13 @@
>          </xs:complexType>
>        </xs:element>
>        <xs:element ref="naming:message-destination" maxOccurs="unbounded"
> minOccurs="0"/>
> -      <xs:element ref="app:security"/>
> -      <xs:element ref="ns1:security"/>
> -      <xs:choice maxOccurs="unbounded">
> +      <xs:element ref="app:security" minOccurs="0" />
> +      <xs:element ref="ns1:security" minOccurs="0"/>
> +      <xs:choice maxOccurs="unbounded" minOccurs="0">
>          <xs:element ref="sys:service"/>
>          <xs:element ref="sys:gbean"/>
>        </xs:choice>
> -      <xs:element ref="persistence" maxOccurs="unbounded"/>
> +      <xs:element ref="per:persistence" maxOccurs="unbounded"
> minOccurs="0"/>
>      </xs:sequence>
>    </xs:complexType>
>
> @@ -255,7 +255,7 @@
>        <xs:element name="activation-config"
> type="tns:activation-configType" minOccurs="0"/>
>        <xs:choice maxOccurs="unbounded">
>          <xs:element ref="naming:abstract-naming-entry"/>
> -        <xs:element ref="naming:entity-manager-factory-ref"/>
> +        <xs:element ref="naming:persistence-context-ref"/>
>          <xs:element ref="naming:gbean-ref"/>
>        </xs:choice>
>        <xs:element ref="naming:persistence-context-ref"
> maxOccurs="unbounded" minOccurs="0"/>
> @@ -313,7 +313,7 @@
>        </xs:element>
>        <xs:choice maxOccurs="unbounded">
>          <xs:element ref="naming:abstract-naming-entry"/>
> -        <xs:element ref="naming:entity-manager-factory-ref"/>
> +        <xs:element ref="naming:persistence-context-ref"/>
>          <xs:element ref="naming:gbean-ref"/>
>        </xs:choice>
>        <xs:element ref="naming:persistence-context-ref"
> maxOccurs="unbounded" minOccurs="0"/>
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoJAXBBasedEditor.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoJAXBBasedEditor.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoJAXBBasedEditor.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/AbstractGeronimoJAXBBasedEditor.java
> Tue Jul 10 08:41:40 2012
> @@ -241,9 +241,9 @@ public abstract class AbstractGeronimoJA
>                      IFormPage page = pages[i];
>                      IManagedForm mform = page.getManagedForm();
>                      if (mform != null) {
> -                        if (page instanceof AbstractGeronimoFormPage) {
> -                            AbstractGeronimoFormPage geronimoPage =
> (AbstractGeronimoFormPage)page;
> -                            geronimoPage.refresh();
> +                        if (page instanceof Refreshable) {
> +                            Refreshable refreshablePage = (Refreshable)
> page;
> +                            refreshablePage.refresh();
>                          }
>                      }
>                  }
>
> Added:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java?rev=1359524&view=auto
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
> (added)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
> Tue Jul 10 08:41:40 2012
> @@ -0,0 +1,27 @@
> +/**
> + *  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.ui.editors;
> +
> +/**
> + *
> + *
> + * @version $Rev$ $Date$
> + */
> +public interface Refreshable {
> +    public void refresh();
> +
> +}
>
> Propchange:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
>
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
>
> ------------------------------------------------------------------------------
>     svn:keywords = Date Revision
>
> Propchange:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/editors/Refreshable.java
>
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/pages/AbstractGeronimoFormPage.java
> Tue Jul 10 08:41:40 2012
> @@ -22,6 +22,7 @@ import org.apache.geronimo.st.core.Deplo
>  import
> org.apache.geronimo.st.core.descriptor.AbstractDeploymentDescriptor;
>  import org.apache.geronimo.st.ui.Activator;
>  import org.apache.geronimo.st.ui.editors.AbstractGeronimoJAXBBasedEditor;
> +import org.apache.geronimo.st.ui.editors.Refreshable;
>  import org.apache.geronimo.st.ui.editors.SharedDeploymentPlanEditor;
>  import org.apache.geronimo.st.ui.internal.Messages;
>  import org.eclipse.core.resources.IProject;
> @@ -45,7 +46,7 @@ import org.eclipse.ui.forms.widgets.Sect
>  /**
>   * @version $Rev$ $Date$
>   */
> -public abstract class AbstractGeronimoFormPage extends FormPage {
> +public abstract class AbstractGeronimoFormPage extends FormPage
> implements Refreshable {
>
>      JAXBElement deploymentPlan;
>
> @@ -68,6 +69,7 @@ public abstract class AbstractGeronimoFo
>          runtimeVersion =
> ((SharedDeploymentPlanEditor)editor).getRuntimeVersion();
>      }
>
> +    @Override
>      public void refresh() {
>          // clear the old composite and tool bar
>          Control[] controls = body.getChildren();
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.jaxbmodel/src/main/java/org/apache/geronimo/jee/loginconfig/LoginConfig.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.jaxbmodel/src/main/java/org/apache/geronimo/jee/loginconfig/LoginConfig.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.jaxbmodel/src/main/java/org/apache/geronimo/jee/loginconfig/LoginConfig.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.jaxbmodel/src/main/java/org/apache/geronimo/jee/loginconfig/LoginConfig.java
> Tue Jul 10 08:41:40 2012
> @@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlAcce
>  import javax.xml.bind.annotation.XmlAccessorType;
>  import javax.xml.bind.annotation.XmlElement;
>  import javax.xml.bind.annotation.XmlElements;
> +import javax.xml.bind.annotation.XmlRootElement;
>  import javax.xml.bind.annotation.XmlType;
>
>
> @@ -54,6 +55,7 @@ import javax.xml.bind.annotation.XmlType
>   *
>   *
>   */
> +@XmlRootElement
>  @XmlAccessorType(XmlAccessType.FIELD)
>  @XmlType(name = "login-configType", propOrder = {
>      "loginModuleRefOrLoginModule"
>
> Added:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java?rev=1359524&view=auto
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
> (added)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
> Tue Jul 10 08:41:40 2012
> @@ -0,0 +1,46 @@
> +/**
> + *  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.v30.ui.internal;
> +
> +import javax.xml.bind.JAXBElement;
> +
> +import org.apache.geronimo.jee.deployment.XmlAttributeType;
> +import org.apache.geronimo.jee.loginconfig.LoginConfig;
> +import org.apache.geronimo.jee.loginconfig.LoginModule;
> +
> +/**
> + *
> + *
> + * @version $Rev$ $Date$
> + */
> +public class GeronimoUIHelper {
> +    @SuppressWarnings("unchecked")
> +    public static LoginModule getLoginModule(JAXBElement<?> ele) {
> +        Object loginObject = ((XmlAttributeType) ele.getValue()).getAny();
> +        LoginConfig loginConfig = null;
> +        if(loginObject instanceof JAXBElement) {
> +            loginConfig = (LoginConfig) ((JAXBElement<LoginConfig>)
> loginObject).getValue();
> +        } else if (loginObject instanceof LoginConfig) {
> +            loginConfig = (LoginConfig) loginObject;
> +        }
> +        if(loginConfig != null) {
> +            LoginModule loginModule = (LoginModule)
> ((LoginConfig)loginConfig).getLoginModuleRefOrLoginModule().get(0);
> +            return loginModule;
> +        }
> +        return null;
> +    }
> +}
>
> Propchange:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
>
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Propchange:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
>
> ------------------------------------------------------------------------------
>     svn:keywords = Date Revision
>
> Propchange:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/GeronimoUIHelper.java
>
> ------------------------------------------------------------------------------
>     svn:mime-type = text/plain
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractDeploymentPlanFormPage.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractDeploymentPlanFormPage.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractDeploymentPlanFormPage.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractDeploymentPlanFormPage.java
> Tue Jul 10 08:41:40 2012
> @@ -48,6 +48,7 @@ public abstract class AbstractDeployment
>          super(id, title);
>      }
>
> +    @Override
>      public void refresh() {
>          // clear the old composite and tool bar
>          Control[] controls = body.getChildren();
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractGeronimoFormPage.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractGeronimoFormPage.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractGeronimoFormPage.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/pages/AbstractGeronimoFormPage.java
> Tue Jul 10 08:41:40 2012
> @@ -19,6 +19,7 @@ package org.apache.geronimo.st.v30.ui.pa
>  import javax.xml.bind.JAXBElement;
>
>  import org.apache.geronimo.st.ui.editors.AbstractGeronimoJAXBBasedEditor;
> +import org.apache.geronimo.st.ui.editors.Refreshable;
>  import org.apache.geronimo.st.ui.internal.Messages;
>  import org.apache.geronimo.st.v30.ui.Activator;
>  import org.eclipse.core.resources.IProject;
> @@ -42,7 +43,7 @@ import org.eclipse.ui.forms.widgets.Sect
>  /**
>   * @version $Rev$ $Date$
>   */
> -public abstract class AbstractGeronimoFormPage extends FormPage {
> +public abstract class AbstractGeronimoFormPage extends FormPage
> implements Refreshable {
>
>      protected JAXBElement rootElement;
>
> @@ -66,7 +67,8 @@ public abstract class AbstractGeronimoFo
>      public AbstractGeronimoFormPage(String id, String title) {
>          super(id, title);
>      }
> -
> +
> +    @Override
>      public void refresh() {
>          // clear the old composite and tool bar
>          Control[] controls = body.getChildren();
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/SecurityRealmSection.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/SecurityRealmSection.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/SecurityRealmSection.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/SecurityRealmSection.java
> Tue Jul 10 08:41:40 2012
> @@ -26,9 +26,9 @@ import javax.xml.bind.JAXBElement;
>  import org.apache.geronimo.jee.deployment.Attribute;
>  import org.apache.geronimo.jee.deployment.Gbean;
>  import org.apache.geronimo.jee.deployment.XmlAttributeType;
> -import org.apache.geronimo.jee.loginconfig.LoginConfig;
>  import org.apache.geronimo.jee.loginconfig.LoginModule;
>  import org.apache.geronimo.st.v30.ui.CommonMessages;
> +import org.apache.geronimo.st.v30.ui.internal.GeronimoUIHelper;
>  import org.apache.geronimo.st.v30.ui.pages.SecurityPage;
>  import org.apache.geronimo.st.v30.ui.wizards.SecurityRealmWizard;
>  import org.eclipse.jface.viewers.ITableLabelProvider;
> @@ -178,10 +178,10 @@ public class SecurityRealmSection extend
>              if (XmlAttributeType.class.isInstance(ele.getValue())
>                  && ((XmlAttributeType) ele.getValue()).getName()
>                      .equals("LoginModuleConfiguration")) {
> -            LoginModule loginModule = (LoginModule) ((LoginConfig)
> ((XmlAttributeType) ele
> -                .getValue()).getAny())
> -                .getLoginModuleRefOrLoginModule().get(0);
> -            return loginModule.getLoginModuleClass();
> +                LoginModule loginModule =
> GeronimoUIHelper.getLoginModule(ele);
> +                if(loginModule != null) {
> +                    return loginModule.getLoginModuleClass();
> +                }
>              }
>          }
>          return null;
>
> Modified:
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java
> URL:
> http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java?rev=1359524&r1=1359523&r2=1359524&view=diff
>
> ==============================================================================
> ---
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java
> (original)
> +++
> geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java
> Tue Jul 10 08:41:40 2012
> @@ -43,8 +43,8 @@ import org.apache.geronimo.st.v30.core.j
>  import org.apache.geronimo.st.v30.core.jaxb.JAXBObjectFactoryImpl;
>  import org.apache.geronimo.st.v30.ui.Activator;
>  import org.apache.geronimo.st.v30.ui.CommonMessages;
> +import org.apache.geronimo.st.v30.ui.internal.GeronimoUIHelper;
>  import org.apache.geronimo.st.v30.ui.sections.AbstractTableSection;
> -import org.apache.geronimo.st.v30.ui.wizards.AbstractTableWizard;
>  import org.eclipse.core.runtime.IStatus;
>  import org.eclipse.core.runtime.Status;
>  import org.eclipse.jface.dialogs.ErrorDialog;
> @@ -1111,14 +1111,14 @@ public class SecurityRealmWizard extends
>          List<JAXBElement<?>> elelist = gbean
>              .getAttributeOrXmlAttributeOrReference();
>          for (JAXBElement<?> ele : elelist) {
> -        if (XmlAttributeType.class.isInstance(ele.getValue())
> -            && ((XmlAttributeType) ele.getValue()).getName()
> -                .equals("LoginModuleConfiguration")) {
> -            LoginModule loginModule = (LoginModule) ((LoginConfig)
> ((XmlAttributeType) ele
> -                .getValue()).getAny())
> -                .getLoginModuleRefOrLoginModule().get(0);
> -            return loginModule.getLoginModuleClass();
> -        }
> +            if (XmlAttributeType.class.isInstance(ele.getValue())
> +                && ((XmlAttributeType) ele.getValue()).getName()
> +                    .equals("LoginModuleConfiguration")) {
> +                LoginModule loginModule =
> GeronimoUIHelper.getLoginModule(ele);
> +                if(loginModule != null) {
> +                    return loginModule.getLoginModuleClass();
> +                }
> +            }
>          }
>          return null;
>      } catch (NullPointerException e) {
> @@ -1133,19 +1133,19 @@ public class SecurityRealmWizard extends
>          List<JAXBElement<?>> elelist = gbean
>              .getAttributeOrXmlAttributeOrReference();
>          for (JAXBElement<?> ele : elelist) {
> -        if (XmlAttributeType.class.isInstance(ele.getValue())
> -            && ((XmlAttributeType) ele.getValue()).getName()
> -                .equals("LoginModuleConfiguration")) {
> -            LoginModule loginModule = (LoginModule) ((LoginConfig)
> ((XmlAttributeType) ele
> -                .getValue()).getAny())
> -                .getLoginModuleRefOrLoginModule().get(0);
> -            List<Option> options = loginModule.getOption();
> -            for (Option opt : options) {
> -            if (opt.getName().equals(optionName))
> -                return opt.getValue();
> +            if (XmlAttributeType.class.isInstance(ele.getValue())
> +                && ((XmlAttributeType) ele.getValue()).getName()
> +                    .equals("LoginModuleConfiguration")) {
> +                LoginModule loginModule =
> GeronimoUIHelper.getLoginModule(ele);
> +                if(loginModule != null) {
> +                    List<Option> options = loginModule.getOption();
> +                    for (Option opt : options) {
> +                    if (opt.getName().equals(optionName))
> +                        return opt.getValue();
> +                    }
> +                }
>              }
>          }
> -        }
>          return null;
>      } catch (NullPointerException e) {
>          // ignore
>
>
>


-- 
Shawn

Mime
View raw message