incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r126557 - /incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
Date Wed, 26 Jan 2005 23:11:11 GMT
Author: taylor
Date: Wed Jan 26 15:11:11 2005
New Revision: 126557

URL: http://svn.apache.org/viewcvs?view=rev&rev=126557
Log:
add properties
Modified:
   incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java

Modified: incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
Url: http://svn.apache.org/viewcvs/incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java?view=diff&rev=126557&p1=incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java&r1=126556&p2=incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java&r2=126557
==============================================================================
--- incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
(original)
+++ incubator/graffito/trunk/components/src/java/org/apache/portals/graffito/model/impl/CmsObjectImpl.java
Wed Jan 26 15:11:11 2005
@@ -17,6 +17,8 @@
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.portals.graffito.model.CmsObject;
 import org.apache.portals.graffito.model.Folder;
@@ -46,6 +48,8 @@
     protected Date creationDate;
     protected Date lastModified;
     
+    protected Map properties = new HashMap();
+    
     /** 
      * Special attribute telling OJB the object's concrete type.
      *  
@@ -246,4 +250,38 @@
     {
         return this.uri;
     }
+    
+
+    /**
+     * Get a map of all non standard properties for this object
+     *
+     * @return a map of properties
+     */
+    public Map getProperties()
+    {
+        return properties;
+    }
+
+    /**
+     * Get a named property for this object
+     *
+     * @param name of the property
+     * @return the property as an string
+     */
+    public String getProperty(String name)
+    {
+        return (String)properties.get(name);
+    }
+
+    /**
+     * Sets a named property for this string
+     *
+     * @param name
+     * @param property
+     */
+    public void setProperty(String name, String property)
+    {
+        properties.put(name, property);
+    }
+    
 }

Mime
View raw message