You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2005/04/18 12:57:30 UTC

svn commit: r161754 - lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java

Author: andreas
Date: Mon Apr 18 03:57:29 2005
New Revision: 161754

URL: http://svn.apache.org/viewcvs?view=rev&rev=161754
Log:
[minor change] removed unused method

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java?view=diff&r1=161753&r2=161754
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java Mon Apr 18 03:57:29 2005
@@ -91,30 +91,4 @@
         }
     }
 
-    /**
-     * Adds an asset.
-     */
-    protected void addAsset() {
-        String title = getParameterAsString("title");
-        String creator = getParameterAsString("creator");
-        String rights = getParameterAsString("rights");
-        Part file = getPart("file");
-
-        Map metadata = new HashMap();
-        metadata.put("title", title);
-        metadata.put("creator", creator);
-        metadata.put("rights", rights);
-        ResourcesManager resourcesManager = null;
-        try {
-            resourcesManager = (ResourcesManager) this.manager.lookup(ResourcesManager.ROLE);
-            resourcesManager.addResource(getSourceDocument(), file, metadata);
-        } catch (final Exception e) {
-            getLogger().error("The resource could not be added: ", e);
-            addErrorMessage("The resource could not be added (see log files for details).");
-        } finally {
-            if (resourcesManager != null) {
-                this.manager.release(resourcesManager);
-            }
-        }
-    }
 }



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