Update of /var/cvs/src/org/mmbase/framework
In directory james.mmbase.org:/tmp/cvs-serv18258

Modified Files:
        BasicComponent.java Component.java VirtualComponent.java 
Log Message:
allowing for 'subversions' without making the code any more complicated..


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/framework


Index: BasicComponent.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/BasicComponent.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- BasicComponent.java 8 Aug 2008 08:53:30 -0000       1.48
+++ BasicComponent.java 14 Aug 2008 20:19:26 -0000      1.49
@@ -24,7 +24,7 @@
  * components, and may be requested several blocks.
  *
  * @author Michiel Meeuwissen
- * @version $Id: BasicComponent.java,v 1.48 2008/08/08 08:53:30 michiel Exp $
+ * @version $Id: BasicComponent.java,v 1.49 2008/08/14 20:19:26 michiel Exp $
  * @since MMBase-1.9
  */
 public class BasicComponent implements Component {
@@ -38,7 +38,7 @@
     private final Map<String, Setting<?>> settings = new 
ConcurrentHashMap<String, Setting<?>>();
     private Block defaultBlock = null;
     private URI uri;
-    private int version = -1;
+    private float version = 0.0f;
 
     protected final Collection<Component> dependencies        = new 
CopyOnWriteArraySet<Component>();
     protected final Collection<VirtualComponent> unsatisfied  = new 
CopyOnWriteArraySet<VirtualComponent>();
@@ -55,7 +55,7 @@
     public URI getUri() {
         return uri;
     }
-    public int getVersion() {
+    public float getVersion() {
         return version;
     }
 
@@ -80,7 +80,7 @@
             for (int i = 0; i < depElements.getLength(); i++) {
                 Element element = (Element) depElements.item(i);
                 String name = element.getAttribute("component");
-                int version = 
Integer.parseInt(element.getAttribute("version"));
+                float version = 
Float.parseFloat(element.getAttribute("version"));
                 Component comp = 
ComponentRepository.getInstance().getComponent(name);
                 if (comp != null && comp.getVersion() >= version) {
                     dependencies.add(comp);


Index: Component.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/Component.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- Component.java      25 Mar 2008 21:00:24 -0000      1.20
+++ Component.java      14 Aug 2008 20:19:26 -0000      1.21
@@ -19,7 +19,7 @@
  * A Component bundles [EMAIL PROTECTED] Block}s, [EMAIL PROTECTED] Action}s 
and [EMAIL PROTECTED] Setting}.
  *
  * @author Michiel Meeuwissen
- * @version $Id: Component.java,v 1.20 2008/03/25 21:00:24 nklasens Exp $
+ * @version $Id: Component.java,v 1.21 2008/08/14 20:19:26 michiel Exp $
  * @since MMBase-1.9
  */
 public interface Component {
@@ -33,7 +33,7 @@
     /**
      * A component has a version number.
      */
-    int getVersion();
+    float getVersion();
 
     /**
      * All (satisfied) depedencies of this Component. See als [EMAIL PROTECTED]


Index: VirtualComponent.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/VirtualComponent.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- VirtualComponent.java       25 Apr 2008 14:31:39 -0000      1.5
+++ VirtualComponent.java       14 Aug 2008 20:19:26 -0000      1.6
@@ -14,7 +14,7 @@
  * A Virtual Component is a component which is only mentioned as a dependency 
of another component.
  *
  * @author Michiel Meeuwissen
- * @version $Id: VirtualComponent.java,v 1.5 2008/04/25 14:31:39 andre Exp $
+ * @version $Id: VirtualComponent.java,v 1.6 2008/08/14 20:19:26 michiel Exp $
  * @since MMBase-1.9
  */
 public class VirtualComponent {
@@ -22,10 +22,10 @@
 
 
     private final String name;
-    private final int version;
+    private final float version;
 
 
-    public VirtualComponent(String name, int v) {
+    public VirtualComponent(String name, float v) {
         this.name = name;
         this.version = v;
     }
@@ -33,7 +33,7 @@
     public String getName() {
         return name;
     }
-    public int getVersion() {
+    public float getVersion() {
         return version;
     }
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to