You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by jw...@apache.org on 2005/05/14 17:49:28 UTC

svn commit: r170145 - /lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java

Author: jwkaltz
Date: Sat May 14 08:49:27 2005
New Revision: 170145

URL: http://svn.apache.org/viewcvs?rev=170145&view=rev
Log:
[minor change] add individual setter methods

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java?rev=170145&r1=170144&r2=170145&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java Sat May 14 08:49:27 2005
@@ -35,7 +35,7 @@
     private String sourceUri;
     private ServiceManager serviceManager;
 
-    private DublinCoreImpl dublinCore;
+    private DublinCoreImpl dublinCoreMetaData;
     private LenyaMetaData lenyaMetaData;
     private CustomMetaData customMetaData;
 
@@ -54,10 +54,20 @@
      * @throws DocumentException if the meta-data could not be retrieved
      */
     public DublinCoreImpl getDublinCoreMetaData() throws DocumentException {
-        if (dublinCore == null) {
-            dublinCore = new DublinCoreImpl(this.sourceUri, this.serviceManager, getLogger());
+        if (dublinCoreMetaData == null) {
+            dublinCoreMetaData = new DublinCoreImpl(this.sourceUri, this.serviceManager, getLogger());
         }
-        return dublinCore;
+        return dublinCoreMetaData;
+    }
+
+    /**
+     * Set the dublin-core meta-data managed by this instance.
+     * @param dcMetaDataValues the dublin-core meta-data
+     * @throws DocumentException if the meta-data could not be written
+     */
+    public void setDublinCoreMetaData(Map dcMetaDataValues) throws DocumentException {
+        dublinCoreMetaData = new DublinCoreImpl(this.sourceUri, this.serviceManager, getLogger());
+        setMetaData(dublinCoreMetaData, dcMetaDataValues);
     }
 
     /**
@@ -73,6 +83,16 @@
     }
 
     /**
+     * Set the Lenya internal meta-data managed by this instance.
+     * @param lenyaMetaDataValues the Lenya meta-data
+     * @throws DocumentException if the meta-data could not be written
+     */
+    public void setLenyaMetaData(Map lenyaMetaDataValues) throws DocumentException {
+        lenyaMetaData = new LenyaMetaData(this.sourceUri, this.serviceManager, getLogger());
+        setMetaData(lenyaMetaData, lenyaMetaDataValues);
+    }
+
+    /**
      * Retrieve the custom meta-data managed by this instance.
      * @return the custom meta-data
      * @throws DocumentException if the meta-data could not be retrieved
@@ -82,6 +102,16 @@
             customMetaData = new CustomMetaData(this.sourceUri, this.serviceManager, getLogger());
         }
         return customMetaData;
+    }
+
+    /**
+     * Set the custom meta-data managed by this instance.
+     * @param customMetaDataValues the custom meta-data
+     * @throws DocumentException if the meta-data could not be written
+     */
+    public void setCustomMetaData(Map customMetaDataValues) throws DocumentException {
+        customMetaData = new CustomMetaData(this.sourceUri, this.serviceManager, getLogger());
+        setMetaData(customMetaData, customMetaDataValues);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org