felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r565378 - in /felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin: ./ om/ om/metatype/ xml/
Date Mon, 13 Aug 2007 15:38:54 GMT
Author: cziegeler
Date: Mon Aug 13 08:38:53 2007
New Revision: 565378

URL: http://svn.apache.org/viewvc?view=rev&rev=565378
Log:
Start adding metatype objects to om.

Added:
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java
  (with props)
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java
  (with props)
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java
  (with props)
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java
  (with props)
Modified:
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/SCRDescriptorMojo.java
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Component.java
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Property.java
    felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/xml/ComponentDescriptorIO.java

Modified: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/SCRDescriptorMojo.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/SCRDescriptorMojo.java?view=diff&rev=565378&r1=565377&r2=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/SCRDescriptorMojo.java
(original)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/SCRDescriptorMojo.java
Mon Aug 13 08:38:53 2007
@@ -31,6 +31,10 @@
 import org.apache.felix.sandbox.scrplugin.om.Components;
 import org.apache.felix.sandbox.scrplugin.om.Implementation;
 import org.apache.felix.sandbox.scrplugin.om.Interface;
+import org.apache.felix.sandbox.scrplugin.om.metatype.AD;
+import org.apache.felix.sandbox.scrplugin.om.metatype.Designate;
+import org.apache.felix.sandbox.scrplugin.om.metatype.MTObject;
+import org.apache.felix.sandbox.scrplugin.om.metatype.OCD;
 import org.apache.felix.sandbox.scrplugin.tags.JavaClassDescription;
 import org.apache.felix.sandbox.scrplugin.tags.JavaClassDescriptorManager;
 import org.apache.felix.sandbox.scrplugin.tags.JavaField;
@@ -362,9 +366,30 @@
         final String metaType = tag.getNamedParameter(SCRDescriptor.COMPONENT_METATYPE);
         final boolean hasMetaType = metaType == null || "yes".equalsIgnoreCase(metaType)
             || "true".equalsIgnoreCase(metaType);
-        component.setHasMetaType(hasMetaType);
-        component.setLabel(tag.getNamedParameter(SCRDescriptor.COMPONENT_LABEL));
-        component.setDescription(tag.getNamedParameter(SCRDescriptor.COMPONENT_DESCRIPTION));
+        if ( hasMetaType ) {
+            // ocd
+            final OCD ocd = new OCD();
+            component.setOcd(ocd);
+            ocd.setId(component.getName());
+            String ocdName = tag.getNamedParameter(SCRDescriptor.COMPONENT_LABEL);
+            if ( ocdName == null ) {
+                ocdName = "%" + component.getName() + ".name";
+            }
+            ocd.setName(ocdName);
+            String ocdDescription = tag.getNamedParameter(SCRDescriptor.COMPONENT_DESCRIPTION);
+            if ( ocdDescription == null ) {
+                ocdDescription = "%" + component.getName() + ".description";
+            }
+            ocd.setDescription(ocdDescription);
+            // designate
+            final Designate designate = new Designate();
+            component.setDesignate(designate);
+            designate.setPid(component.getName());
+            // designate.object
+            final MTObject mtobject = new MTObject();
+            designate.setObject(mtobject);
+            mtobject.setOcdref(component.getName());
+        }
     }
 
     /**
@@ -529,48 +554,65 @@
         if (!StringUtils.isEmpty(name)) {
             org.apache.felix.sandbox.scrplugin.om.Property prop = new org.apache.felix.sandbox.scrplugin.om.Property(property);
             prop.setName(name);
-            prop.setLabel(property.getNamedParameter(SCRDescriptor.PROPERTY_LABEL));
-            prop.setDescription(property.getNamedParameter(SCRDescriptor.PROPERTY_DESCRIPTION));
-            prop.setValue(property.getNamedParameter(SCRDescriptor.PROPERTY_VALUE));
             prop.setType(property.getNamedParameter(SCRDescriptor.PROPERTY_TYPE));
-            prop.setPrivateProperty(this.getBoolean(property,
-                SCRDescriptor.PROPERTY_PRIVATE, prop.isPrivateProperty()));
-
-            // set optional multivalues, cardinality might be overwritten by setValues !!
-            final String value = property.getNamedParameter(SCRDescriptor.PROPERTY_CARDINALITY);
-            if (value != null) {
-                if ("-".equals(value)) {
-                    // unlimited vector
-                    prop.setCardinality(new Integer(Integer.MIN_VALUE));
-                } else if ("+".equals(value)) {
-                   // unlimited array
-                    prop.setCardinality(new Integer(Integer.MAX_VALUE));
-                } else {
-                    try {
-                        prop.setCardinality(Integer.valueOf(value));
-                    } catch (NumberFormatException nfe) {
-                        // default to scalar in case of conversion problem
+            prop.setValue(property.getNamedParameter(SCRDescriptor.PROPERTY_VALUE));
+            prop.setValues(property.getNamedParameterMap());
+            final boolean isPrivate = this.getBoolean(property, SCRDescriptor.PROPERTY_PRIVATE,
false);
+            // if this is a public property and the component is generating metatype info
+            // store the information!
+            if ( !isPrivate && component.getOcd() != null ) {
+                final OCD ocd = component.getOcd();
+                final AD ad = new AD();
+                ocd.getProperties().add(ad);
+                ad.setId(prop.getName());
+                ad.setType(prop.getType());
+
+                String adName = property.getNamedParameter(SCRDescriptor.PROPERTY_LABEL);
+                if ( adName == null ) {
+                    adName = "%" + prop.getName() + ".name";
+                }
+                ad.setName(adName);
+                String adDesc = property.getNamedParameter(SCRDescriptor.PROPERTY_DESCRIPTION);
+                if ( adDesc == null ) {
+                    adDesc = "%" + prop.getName() + ".description";
+                }
+                ad.setDescription(adDesc);
+                // set optional multivalues, cardinality might be overwritten by setValues
!!
+                final String value = property.getNamedParameter(SCRDescriptor.PROPERTY_CARDINALITY);
+                if (value != null) {
+                    if ("-".equals(value)) {
+                        // unlimited vector
+                        ad.setCardinality(new Integer(Integer.MIN_VALUE));
+                    } else if ("+".equals(value)) {
+                       // unlimited array
+                        ad.setCardinality(new Integer(Integer.MAX_VALUE));
+                    } else {
+                        try {
+                            ad.setCardinality(Integer.valueOf(value));
+                        } catch (NumberFormatException nfe) {
+                            // default to scalar in case of conversion problem
+                        }
                     }
                 }
-            }
-            prop.setValues(property.getNamedParameterMap());
+                ad.setDefaultValue(prop.getValue());
 
-            // check options
-            String[] parameters = property.getParameters();
-            Map options = null;
-            for (int j=0; j < parameters.length; j++) {
-                if (SCRDescriptor.PROPERTY_OPTIONS.equals(parameters[j])) {
-                    options = new LinkedHashMap();
-                } else if (options != null) {
-                    String optionLabel = parameters[j];
-                    String optionValue = (j < parameters.length-2) ? parameters[j+2] :
null;
-                    if (optionValue != null) {
-                        options.put(optionLabel, optionValue);
+                // check options
+                String[] parameters = property.getParameters();
+                Map options = null;
+                for (int j=0; j < parameters.length; j++) {
+                    if (SCRDescriptor.PROPERTY_OPTIONS.equals(parameters[j])) {
+                        options = new LinkedHashMap();
+                    } else if (options != null) {
+                        String optionLabel = parameters[j];
+                        String optionValue = (j < parameters.length-2) ? parameters[j+2]
: null;
+                        if (optionValue != null) {
+                            options.put(optionLabel, optionValue);
+                        }
+                        j += 2;
                     }
-                    j += 2;
                 }
+                ad.setOptions(options);
             }
-            prop.setOptions(options);
 
             component.addProperty(prop);
         }

Modified: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Component.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Component.java?view=diff&rev=565378&r1=565377&r2=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Component.java
(original)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Component.java
Mon Aug 13 08:38:53 2007
@@ -22,6 +22,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.felix.sandbox.scrplugin.om.metatype.Designate;
+import org.apache.felix.sandbox.scrplugin.om.metatype.OCD;
 import org.apache.felix.sandbox.scrplugin.tags.JavaClassDescription;
 import org.apache.felix.sandbox.scrplugin.tags.JavaMethod;
 import org.apache.felix.sandbox.scrplugin.tags.JavaParameter;
@@ -59,19 +61,15 @@
     /** The references. */
     protected List references = new ArrayList();
 
-    /** The label. */
-    protected String label;
-
-    /** The description. */
-    protected String description;
-
     /** Is this an abstract description? */
     protected boolean isAbstract;
 
-    protected boolean hasMetatype;
-
     protected boolean serviceFactory;
 
+    protected OCD ocd;
+
+    protected Designate designate;
+
     /**
      * Default constructor.
      */
@@ -161,22 +159,6 @@
         this.references.add(ref);
     }
 
-    public String getLabel() {
-        return this.label;
-    }
-
-    public void setLabel(String label) {
-        this.label = label;
-    }
-
-    public String getDescription() {
-        return this.description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
     public boolean isAbstract() {
         return this.isAbstract;
     }
@@ -185,14 +167,6 @@
         this.isAbstract = isAbstract;
     }
 
-    public boolean isHasMetaType() {
-        return this.hasMetatype;
-    }
-
-    public void setHasMetaType(boolean hasMetatype) {
-        this.hasMetatype = hasMetatype;
-    }
-
     public boolean isServiceFactory() {
         return this.serviceFactory;
     }
@@ -321,4 +295,19 @@
         }
     }
 
+    public OCD getOcd() {
+        return this.ocd;
+    }
+
+    public void setOcd(OCD ocd) {
+        this.ocd = ocd;
+    }
+
+    public Designate getDesignate() {
+        return this.designate;
+    }
+
+    public void setDesignate(Designate designate) {
+        this.designate = designate;
+    }
 }

Modified: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Property.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Property.java?view=diff&rev=565378&r1=565377&r2=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Property.java
(original)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/Property.java
Mon Aug 13 08:38:53 2007
@@ -36,15 +36,6 @@
     protected String type;
     protected String text;
 
-    protected String label;
-    protected String description;
-
-    protected Integer cardinality;
-
-    protected boolean privateProperty = false;
-
-    protected Map options;
-
     /**
      * Default constructor.
      */
@@ -91,38 +82,6 @@
         this.text = text;
     }
 
-    public String getLabel() {
-        return this.label;
-    }
-
-    public void setLabel(String label) {
-        this.label = label;
-    }
-
-    public String getDescription() {
-        return this.description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Integer getCardinality() {
-        return this.cardinality;
-    }
-
-    public void setCardinality(Integer cardinality) {
-        this.cardinality = cardinality;
-    }
-
-    public boolean isPrivateProperty() {
-        return this.privateProperty;
-    }
-
-    public void setPrivateProperty(boolean privateProperty) {
-        this.privateProperty = privateProperty;
-    }
-
     public void setValues(Map valueMap) {
         List values = new ArrayList();
         for (Iterator vi = valueMap.entrySet().iterator(); vi.hasNext();) {
@@ -135,20 +94,7 @@
 
         if (!values.isEmpty()) {
             this.value = values;
-
-            // assume array if set to scalar currently
-            if (this.cardinality == null) {
-                this.cardinality = new Integer(Integer.MAX_VALUE);
-            }
         }
-    }
-
-    public Map getOptions() {
-        return this.options;
-    }
-
-    public void setOptions(Map options) {
-        this.options = options;
     }
 
     /**

Added: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java?view=auto&rev=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java
(added)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java
Mon Aug 13 08:38:53 2007
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.sandbox.scrplugin.om.metatype;
+
+import java.util.List;
+import java.util.Map;
+
+public class AD {
+
+    protected String id;
+
+    protected String type;
+
+    protected Object defaultValue;
+
+    protected String name;
+
+    protected String description;
+
+    protected Integer cardinality;
+
+    protected Map options;
+
+    public String getId() {
+        return this.id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getType() {
+        return this.type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Object getDefaultValue() {
+        return this.defaultValue;
+    }
+
+    public void setDefaultValue(Object defaultValue) {
+        this.defaultValue = defaultValue;
+        if ( defaultValue instanceof List ) {
+            // assume array if set to scalar currently
+            if ( ((List)defaultValue).size() > 0 && this.cardinality == null )
{
+                this.cardinality = new Integer(Integer.MAX_VALUE);
+            }
+        }
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return this.description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Integer getCardinality() {
+        return this.cardinality;
+    }
+
+    public void setCardinality(Integer cardinality) {
+        this.cardinality = cardinality;
+    }
+
+    public Map getOptions() {
+        return this.options;
+    }
+
+    public void setOptions(Map options) {
+        this.options = options;
+    }
+}

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/AD.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java?view=auto&rev=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java
(added)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java
Mon Aug 13 08:38:53 2007
@@ -0,0 +1,42 @@
+/*
+ * 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.felix.sandbox.scrplugin.om.metatype;
+
+public class Designate {
+
+    protected String pid;
+
+    protected MTObject object;
+
+    public String getPid() {
+        return this.pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
+
+    public MTObject getObject() {
+        return this.object;
+    }
+
+    public void setObject(MTObject object) {
+        this.object = object;
+    }
+}

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/Designate.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java?view=auto&rev=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java
(added)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java
Mon Aug 13 08:38:53 2007
@@ -0,0 +1,32 @@
+/*
+ * 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.felix.sandbox.scrplugin.om.metatype;
+
+public class MTObject {
+
+    protected String ocdref;
+
+    public String getOcdref() {
+        return this.ocdref;
+    }
+
+    public void setOcdref(String ocdref) {
+        this.ocdref = ocdref;
+    }
+}

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/MTObject.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Added: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java?view=auto&rev=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java
(added)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java
Mon Aug 13 08:38:53 2007
@@ -0,0 +1,65 @@
+/*
+ * 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.felix.sandbox.scrplugin.om.metatype;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class OCD {
+
+    protected String id;
+
+    protected String name;
+
+    protected String description;
+
+    protected List properties = new ArrayList();
+
+    public String getId() {
+        return this.id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDescription() {
+        return this.description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public List getProperties() {
+        return this.properties;
+    }
+
+    public void setProperties(List properties) {
+        this.properties = properties;
+    }
+}

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/om/metatype/OCD.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/xml/ComponentDescriptorIO.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/xml/ComponentDescriptorIO.java?view=diff&rev=565378&r1=565377&r2=565378
==============================================================================
--- felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/xml/ComponentDescriptorIO.java
(original)
+++ felix/sandbox/cziegeler/maven-scr-plugin/src/main/java/org/apache/felix/sandbox/scrplugin/xml/ComponentDescriptorIO.java
Mon Aug 13 08:38:53 2007
@@ -63,10 +63,9 @@
         this.xstream.useAttributeFor(org.apache.felix.sandbox.scrplugin.om.Component.class,
"name");
         this.xstream.useAttributeFor(org.apache.felix.sandbox.scrplugin.om.Component.class,
"enabled");
         this.xstream.useAttributeFor(org.apache.felix.sandbox.scrplugin.om.Component.class,
"immediate");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "label");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "description");
+        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "ocd");
+        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "designate");
         this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "isAbstract");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "hasMetatype");
         this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Component.class, "serviceFactory");
 
         this.xstream.alias("implementation", org.apache.felix.sandbox.scrplugin.om.Implementation.class);
@@ -75,10 +74,6 @@
         this.xstream.alias("property", org.apache.felix.sandbox.scrplugin.om.Property.class);
         this.xstream.useAttributeFor(org.apache.felix.sandbox.scrplugin.om.Property.class,
"name");
         this.xstream.useAttributeFor(org.apache.felix.sandbox.scrplugin.om.Property.class,
"value");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Property.class, "label");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Property.class, "description");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Property.class, "options");
-        this.xstream.omitField(org.apache.felix.sandbox.scrplugin.om.Property.class, "privateProperty");
 
         this.xstream.alias("service", org.apache.felix.sandbox.scrplugin.om.Service.class);
         this.xstream.addImplicitCollection(org.apache.felix.sandbox.scrplugin.om.Service.class,
"interfaces");



Mime
View raw message