portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl PropertyImpl.java PropertyKeyImpl.java NodeImpl.java PropertySetDefImpl.java
Date Sat, 06 Mar 2004 18:29:41 GMT
dlestrat    2004/03/06 10:29:41

  Modified:    components/prefs/src/java/org/apache/jetspeed/prefs/om/impl
                        PropertyImpl.java PropertyKeyImpl.java
                        NodeImpl.java
  Removed:     components/prefs/src/java/org/apache/jetspeed/prefs/om/impl
                        PropertySetDefImpl.java
  Log:
  Prefs OM impl.
  
  Revision  Changes    Path
  1.2       +18 -2     jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/PropertyImpl.java
  
  Index: PropertyImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/PropertyImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyImpl.java	26 Feb 2004 04:30:45 -0000	1.1
  +++ PropertyImpl.java	6 Mar 2004 18:29:41 -0000	1.2
  @@ -51,10 +51,11 @@
        * @param valueObjectType The value object type.
        * @param valueObject The value object.
        */
  -    public PropertyImpl(int propertyKeyId, int nodeId, short valueObjectType, Object valueObject)
  +    public PropertyImpl(int nodeId, int propertyKeyId, PropertyKey propertyKey, short valueObjectType,
Object valueObject)
       {
  -        this.propertyKeyId = propertyKeyId;
           this.nodeId = nodeId;
  +        this.propertyKeyId = propertyKeyId;
  +        this.propertyKey = propertyKey;
           this.creationDate = new Timestamp(System.currentTimeMillis());
           this.modifiedDate = this.creationDate;
   
  @@ -317,6 +318,21 @@
       public void setModifiedDate(Timestamp modifiedDate)
       {
           this.modifiedDate = modifiedDate;
  +    }
  +
  +    /**
  +     * <p>Convert <code>Property</code> to string.</p>
  +     * @return The Property string value.
  +     */
  +    public String toString()
  +    {
  +        String toStringProperty = "[[nodeId, " + this.nodeId + "], "
  +            + "[propertyKeyId, " + this.propertyKeyId + "], "
  +            + "[propertyKey, " + this.propertyKey + "], "
  +            + "[propertyValue, " + getPropertyValue(propertyKey.getPropertyKeyType()) +
"], "
  +            + "[creationDate, " + this.creationDate + "], "
  +            + "[modifiedDate, " + this.modifiedDate + "]]";
  +        return toStringProperty;
       }
   
   }
  
  
  
  1.2       +14 -22    jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/PropertyKeyImpl.java
  
  Index: PropertyKeyImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/PropertyKeyImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PropertyKeyImpl.java	26 Feb 2004 04:30:45 -0000	1.1
  +++ PropertyKeyImpl.java	6 Mar 2004 18:29:41 -0000	1.2
  @@ -37,15 +37,12 @@
       /**
        * <p>Property key constructor given the associated
        * property set definition, the property key name and type.</p>
  -     * @param propertySetDefId The property set definition.
        * @param propertyKeyName The property key name.
        * @param propertyKeyType The property key type.
        */
  -    public PropertyKeyImpl(int propertySetDefId,
  -                           String propertyKeyName,
  +    public PropertyKeyImpl(String propertyKeyName,
                              short propertyKeyType)
       {
  -        this.propertySetDefId = propertySetDefId;
           this.propertyKeyName = propertyKeyName;
           this.propertyKeyType = propertyKeyType;
           this.creationDate = new Timestamp(System.currentTimeMillis());
  @@ -70,24 +67,6 @@
           this.propertyKeyId = propertyKeyId;
       }
   
  -    private int propertySetDefId;
  -
  -    /**
  -     * @see org.apache.jetspeed.prefs.om.PropertyKey#getPropertySetDefId()
  -     */
  -     public int getPropertySetDefId()
  -     {
  -        return this.propertySetDefId;
  -     }
  -
  -    /**
  -     * @see org.apache.jetspeed.prefs.om.PropertyKey#setPropertySetDefId(int)
  -     */
  -    public void setPropertySetDefId(int propertySetDefId)
  -    {
  -        this.propertySetDefId = propertySetDefId;
  -    }
  -
       private String propertyKeyName;
   
       /**
  @@ -158,6 +137,19 @@
       public void setModifiedDate(Timestamp modifiedDate)
       {
           this.modifiedDate = modifiedDate;
  +    }
  +
  +    /**
  +     * <p>Convert <code>PropertyKey</code> to string.</p>
  +     * @return The Property string value.
  +     */
  +    public String toString()
  +    {
  +        String toStringPropertyKey = "[[propertyKeyName, " + this.propertyKeyName + "],
"
  +            + "[propertyKeyType, " + this.propertyKeyType + "], "
  +            + "[creationDate, " + this.creationDate + "], "
  +            + "[modifiedDate, " + this.modifiedDate + "]]";
  +        return toStringPropertyKey;
       }
   
   }
  
  
  
  1.3       +22 -39    jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/prefs/src/java/org/apache/jetspeed/prefs/om/impl/NodeImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NodeImpl.java	27 Feb 2004 22:04:15 -0000	1.2
  +++ NodeImpl.java	6 Mar 2004 18:29:41 -0000	1.3
  @@ -14,11 +14,11 @@
    */
   package org.apache.jetspeed.prefs.om.impl;
   
  +import java.util.ArrayList;
   import java.util.Collection;
   import java.sql.Timestamp;
   
   import org.apache.jetspeed.prefs.om.Node;
  -import org.apache.jetspeed.prefs.om.PropertySetDef;
   
   /**
    * <p>{@link Node} interface implementation.</p>
  @@ -48,19 +48,19 @@
        *  <li>Full path.</li>
        * </ul>
        * @param parentNodeId The parent node id.
  -     * @param propertySetDefId The property set definition id.
        * @param nodeName The node name.
        * @param nodeType The node type.
        * @param fullPath The full path.
        */
  -    public NodeImpl(Integer parentNodeId, Integer propertySetDefId,
  -                    String nodeName, short nodeType, String fullPath)
  +    public NodeImpl(Integer parentNodeId, String nodeName,
  +                    short nodeType, String fullPath)
       {
           this.parentNodeId = parentNodeId;
  -        this.propertySetDefId = propertySetDefId;
           this.nodeName = nodeName;
           this.nodeType = nodeType;
           this.fullPath = fullPath;
  +        this.nodeKeys = new ArrayList(0);
  +        this.nodeProperties = new ArrayList(0);
           this.creationDate = new Timestamp(System.currentTimeMillis());
           this.modifiedDate = this.creationDate;
       }
  @@ -101,58 +101,40 @@
           this.parentNodeId = parentNodeId;
       }
   
  -    private Collection properties;
  +    private Collection nodeProperties;
   
       /**
  -     * @see org.apache.jetspeed.prefs.om.Node#getProperties()
  +     * @see org.apache.jetspeed.prefs.om.Node#getNodeProperties()
        */
  -    public Collection getProperties()
  +    public Collection getNodeProperties()
       {
  -        return this.properties;
  +        return this.nodeProperties;
       }
   
       /**
  -     * @see org.apache.jetspeed.prefs.om.Node#setProperties(java.util.Collection)
  +     * @see org.apache.jetspeed.prefs.om.Node#setNodeProperties(java.util.Collection)
        */
  -    public void setProperties(Collection properties)
  +    public void setNodeProperties(Collection nodeProperties)
       {
  -        this.properties = properties;
  +        this.nodeProperties = nodeProperties;
       }
   
  -    private Integer propertySetDefId;
  +    private Collection nodeKeys;
   
       /**
  -     * @see org.apache.jetspeed.prefs.om.Node#getPropertySetDefId()
  +     * @see org.apache.jetspeed.prefs.om.Node#getNodeKeys()
        */
  -    public Integer getPropertySetDefId()
  +    public Collection getNodeKeys()
       {
  -        return this.propertySetDefId;
  +        return this.nodeKeys;
       }
   
       /**
  -     * @see org.apache.jetspeed.prefs.om.Node#setPropertySetDefId(java.lang.Integer)
  +     * @see org.apache.jetspeed.prefs.om.Node#setNodeKeys(java.util.Collection)
        */
  -    public void setPropertySetDefId(Integer propertySetDefId)
  +    public void setNodeKeys(Collection nodeKeys)
       {
  -        this.propertySetDefId = propertySetDefId;
  -    }
  -
  -    private PropertySetDef propertySetDef;
  -
  -    /**
  -     * @see org.apache.jetspeed.prefs.om.Node#getPropertySetDef()
  -     */
  -    public PropertySetDef getPropertySetDef()
  -    {
  -        return this.propertySetDef;
  -    }
  -
  -    /**
  -     * @see org.apache.jetspeed.prefs.om.Node#setPropertySetDef(org.apache.jetspeed.prefs.om.PropertySetDef)
  -     */
  -    public void setPropertySetDef(PropertySetDef propertySetDef)
  -    {
  -        this.propertySetDef = propertySetDef;
  +        this.nodeKeys = nodeKeys;
       }
   
       private String nodeName;
  @@ -252,10 +234,11 @@
       public String toString()
       {
           String toStringNode = "[[parentNodeId, " + this.parentNodeId + "], "
  -            + "[propertySetDefId, " + this.propertySetDefId + "], "
               + "[nodeName, " + this.nodeName + "], "
  -            + "[nodeType, " + this.nodeType + "], "
               + "[fullPath, " + this.fullPath + "], "
  +            + "[nodeType, " + this.nodeType + "], "
  +            + "[nodeKeys, " + this.nodeKeys + "], "
  +            + "[nodeProperties, " + this.nodeProperties + "], "
               + "[creationDate, " + this.creationDate + "], "
               + "[modifiedDate, " + this.modifiedDate + "]]";
           return toStringNode;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message