karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@gmail.com>
Subject Re: svn commit: r1028746 - in /karaf/trunk/jaas/config/src/main: java/org/apache/karaf/jaas/config/impl/Module.java java/org/apache/karaf/jaas/config/impl/NamespaceHandler.java resources/org/apache/karaf/jaas/config/karaf-jaas.xsd
Date Tue, 16 Nov 2010 11:18:32 GMT
Well, the xsd is versioned, so any change should be reflected ideally.
I've done that for the cm namespace in aries:
  see http://svn.apache.org/viewvc?view=revision&revision=1002327

On Tue, Nov 16, 2010 at 11:37, Ioannis Canellos <iocanel@gmail.com> wrote:
> If its a standard procedure (when changing the namespace to increase the
> version number) then I guess we should.
>
>
>
> On Tue, Nov 16, 2010 at 11:55 AM, Guillaume Nodet <gnodet@gmail.com> wrote:
>
>> Shouldn't we bump the xsd / namespace version to 1.1.0 in order to
>> reflect this change?
>>
>> On Fri, Oct 29, 2010 at 15:56,  <iocanel@apache.org> wrote:
>> > Author: iocanel
>> > Date: Fri Oct 29 13:56:43 2010
>> > New Revision: 1028746
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1028746&view=rev
>> > Log:
>> > [KARAF-188] Added name as a new property of Jaas Module.
>> >
>> > Modified:
>> >
>>  karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/Module.java
>> >
>>  karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/NamespaceHandler.java
>> >
>>  karaf/trunk/jaas/config/src/main/resources/org/apache/karaf/jaas/config/karaf-jaas.xsd
>> >
>> > Modified:
>> karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/Module.java
>> > URL:
>> http://svn.apache.org/viewvc/karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/Module.java?rev=1028746&r1=1028745&r2=1028746&view=diff
>> >
>> ==============================================================================
>> > ---
>> karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/Module.java
>> (original)
>> > +++
>> karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/Module.java
>> Fri Oct 29 13:56:43 2010
>> > @@ -24,10 +24,19 @@ import java.util.Properties;
>> >  */
>> >  public class Module {
>> >
>> > +    private String name;
>> >     private String className;
>> >     private String flags;
>> >     private Properties options;
>> >
>> > +    public String getName() {
>> > +        return name;
>> > +    }
>> > +
>> > +    public void setName(String name) {
>> > +        this.name = name;
>> > +    }
>> > +
>> >     public String getClassName() {
>> >         return className;
>> >     }
>> >
>> > Modified:
>> karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/NamespaceHandler.java
>> > URL:
>> http://svn.apache.org/viewvc/karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/NamespaceHandler.java?rev=1028746&r1=1028745&r2=1028746&view=diff
>> >
>> ==============================================================================
>> > ---
>> karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/NamespaceHandler.java
>> (original)
>> > +++
>> karaf/trunk/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/NamespaceHandler.java
>> Fri Oct 29 13:56:43 2010
>> > @@ -16,48 +16,38 @@
>> >  */
>> >  package org.apache.karaf.jaas.config.impl;
>> >
>> > +import org.apache.aries.blueprint.ParserContext;
>> > +import org.apache.aries.blueprint.mutable.*;
>> > +import org.apache.karaf.jaas.boot.ProxyLoginModule;
>> > +import org.apache.karaf.jaas.config.JaasRealm;
>> > +import org.apache.karaf.jaas.config.KeystoreInstance;
>> > +import
>> org.osgi.service.blueprint.container.ComponentDefinitionException;
>> > +import org.osgi.service.blueprint.reflect.ComponentMetadata;
>> > +import org.osgi.service.blueprint.reflect.Metadata;
>> > +import org.osgi.service.blueprint.reflect.RefMetadata;
>> > +import org.osgi.service.blueprint.reflect.ValueMetadata;
>> > +import org.w3c.dom.*;
>> > +
>> >  import java.net.URL;
>> >  import java.util.Arrays;
>> >  import java.util.HashSet;
>> >  import java.util.Set;
>> >
>> > -import org.w3c.dom.Element;
>> > -import org.w3c.dom.Node;
>> > -import org.w3c.dom.NodeList;
>> > -import org.w3c.dom.CharacterData;
>> > -import org.w3c.dom.Comment;
>> > -import org.w3c.dom.EntityReference;
>> > -
>> > -import
>> org.osgi.service.blueprint.container.ComponentDefinitionException;
>> > -import org.osgi.service.blueprint.reflect.ComponentMetadata;
>> > -import org.osgi.service.blueprint.reflect.ValueMetadata;
>> > -import org.osgi.service.blueprint.reflect.RefMetadata;
>> > -import org.osgi.service.blueprint.reflect.Metadata;
>> > -import org.apache.karaf.jaas.config.JaasRealm;
>> > -import org.apache.karaf.jaas.config.KeystoreInstance;
>> > -import org.apache.karaf.jaas.boot.ProxyLoginModule;
>> > -import org.apache.aries.blueprint.mutable.MutableBeanMetadata;
>> > -import org.apache.aries.blueprint.mutable.MutableValueMetadata;
>> > -import org.apache.aries.blueprint.mutable.MutableRefMetadata;
>> > -import org.apache.aries.blueprint.mutable.MutableCollectionMetadata;
>> > -import org.apache.aries.blueprint.mutable.MutableServiceMetadata;
>> > -import org.apache.aries.blueprint.ParserContext;
>> > -
>> >  public class NamespaceHandler implements
>> org.apache.aries.blueprint.NamespaceHandler {
>> >
>> >     public URL getSchemaLocation(String namespace) {
>> >         return
>> getClass().getResource("/org/apache/karaf/jaas/config/karaf-jaas.xsd");
>> >     }
>> >
>> > -       public Set<Class> getManagedClasses() {
>> > -               return new HashSet<Class>(Arrays.asList(
>> > -                       Config.class,
>> > -                       ResourceKeystoreInstance.class
>> > -               ));
>> > -       }
>> > +    public Set<Class> getManagedClasses() {
>> > +        return new HashSet<Class>(Arrays.asList(
>> > +                Config.class,
>> > +                ResourceKeystoreInstance.class
>> > +        ));
>> > +    }
>> >
>> >     public Metadata parse(Element element, ParserContext context) {
>> > -               String name = element.getLocalName() != null ?
>> element.getLocalName() : element.getNodeName();
>> > +        String name = element.getLocalName() != null ?
>> element.getLocalName() : element.getNodeName();
>> >         if ("config".equals(name)) {
>> >             return parseConfig(element, context);
>> >         } else if ("keystore".equals(name)) {
>> > @@ -88,6 +78,9 @@ public class NamespaceHandler implements
>> >                 MutableBeanMetadata md =
>> context.createMetadata(MutableBeanMetadata.class);
>> >                 md.setRuntimeClass(Module.class);
>> >                 md.addProperty("className", createValue(context,
>> childElement.getAttribute("className")));
>> > +                if (childElement.getAttribute("name") != null) {
>> > +                    md.addProperty("name", createValue(context,
>> childElement.getAttribute("name")));
>> > +                }
>> >                 if (childElement.getAttribute("flags") != null) {
>> >                     md.addProperty("flags", createValue(context,
>> childElement.getAttribute("flags")));
>> >                 }
>> > @@ -101,7 +94,7 @@ public class NamespaceHandler implements
>> >         }
>> >         // Publish Config
>> >         MutableServiceMetadata service =
>> context.createMetadata(MutableServiceMetadata.class);
>> > -               service.setId(name);
>> > +        service.setId(name);
>> >         service.setServiceComponent(bean);
>> >         service.addInterface(JaasRealm.class.getName());
>> >         service.addServiceProperty(createValue(context,
>> ProxyLoginModule.PROPERTY_MODULE), createValue(context, name));
>> > @@ -136,7 +129,7 @@ public class NamespaceHandler implements
>> >         }
>> >         // Publish Config
>> >         MutableServiceMetadata service =
>> context.createMetadata(MutableServiceMetadata.class);
>> > -               service.setId(name);
>> > +        service.setId(name);
>> >         service.setServiceComponent(bean);
>> >         service.addInterface(KeystoreInstance.class.getName());
>> >         return service;
>> >
>> > Modified:
>> karaf/trunk/jaas/config/src/main/resources/org/apache/karaf/jaas/config/karaf-jaas.xsd
>> > URL:
>> http://svn.apache.org/viewvc/karaf/trunk/jaas/config/src/main/resources/org/apache/karaf/jaas/config/karaf-jaas.xsd?rev=1028746&r1=1028745&r2=1028746&view=diff
>> >
>> ==============================================================================
>> > ---
>> karaf/trunk/jaas/config/src/main/resources/org/apache/karaf/jaas/config/karaf-jaas.xsd
>> (original)
>> > +++
>> karaf/trunk/jaas/config/src/main/resources/org/apache/karaf/jaas/config/karaf-jaas.xsd
>> Fri Oct 29 13:56:43 2010
>> > @@ -30,7 +30,8 @@
>> >             <xs:sequence>
>> >                 <xs:element name="module" minOccurs="0"
>> maxOccurs="unbounded">
>> >                     <xs:complexType mixed="true">
>> > -                        <xs:attribute name="className" use="required"
>> type="xs:string" />
>> > +                        <xs:attribute name="name" use="optional"
>> type="xs:string"/>
>> > +                        <xs:attribute name="className" use="required"
>> type="xs:string"/>
>> >                         <xs:attribute name="flags" default="required">
>> >                             <xs:simpleType>
>> >                                 <xs:restriction base="xs:NMTOKEN">
>> > @@ -44,19 +45,19 @@
>> >                     </xs:complexType>
>> >                 </xs:element>
>> >             </xs:sequence>
>> > -            <xs:attribute name="name" use="required" type="xs:string"
/>
>> > -            <xs:attribute name="rank" use="optional" default="0"
>> type="xs:int" />
>> > +            <xs:attribute name="name" use="required" type="xs:string"/>
>> > +            <xs:attribute name="rank" use="optional" default="0"
>> type="xs:int"/>
>> >         </xs:complexType>
>> >     </xs:element>
>> >
>> >     <xs:element name="keystore">
>> >         <xs:complexType>
>> > -            <xs:attribute name="name" use="required" type="xs:string"
/>
>> > -            <xs:attribute name="rank" use="optional" default="0"
>> type="xs:int" />
>> > -            <xs:attribute name="path" use="required" type="xs:string"
/>
>> > -            <xs:attribute name="keystorePassword" use="optional"
>> type="xs:string" />
>> > -            <xs:attribute name="keyPasswords" use="optional"
>> type="xs:string" />
>> > +            <xs:attribute name="name" use="required" type="xs:string"/>
>> > +            <xs:attribute name="rank" use="optional" default="0"
>> type="xs:int"/>
>> > +            <xs:attribute name="path" use="required" type="xs:string"/>
>> > +            <xs:attribute name="keystorePassword" use="optional"
>> type="xs:string"/>
>> > +            <xs:attribute name="keyPasswords" use="optional"
>> type="xs:string"/>
>> >         </xs:complexType>
>> >     </xs:element>
>> > -
>> > +
>> >  </xs:schema>
>> >
>> >
>> >
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>
>
>
> --
> *Ioannis Canellos*
> http://iocanel.blogspot.com
>
> Integration Engineer @ Upstream S.A. <http://www.upstreamsystems.com>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Mime
View raw message