lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwka...@apache.org
Subject svn commit: r165625 - in /lenya/trunk/src/java/org/apache/lenya: cms/editors/ cms/metadata/ cms/metadata/dublincore/ cms/publication/ cms/site/usecases/ cms/usecase/ transaction/
Date Mon, 02 May 2005 13:13:50 GMT
Author: jwkaltz
Date: Mon May  2 06:13:49 2005
New Revision: 165625

URL: http://svn.apache.org/viewcvs?rev=165625&view=rev
Log:
[minor change] added some logging and comments

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java
    lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreProxy.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentFactory.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/Resource.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java
    lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java
    lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java   (props changed)
    lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java   (contents,
props changed)
    lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseProxy.java   (props changed)
    lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java   (props changed)
    lenya/trunk/src/java/org/apache/lenya/transaction/IdentifiableFactory.java   (contents,
props changed)
    lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMap.java   (contents, props
changed)
    lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java   (contents, props
changed)

Modified: lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -65,4 +65,4 @@
     protected Transactionable[] getObjectsToLock() throws UsecaseException {
         return getSourceDocument().getRepositoryNodes();
     }
-}
\ No newline at end of file
+}

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java
------------------------------------------------------------------------------
    svn:keywords = Id

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?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -69,6 +69,10 @@
     }
 
     /**
+     * Delegates to the main assets usecase; the name of
+     * the usecase being delegated to is set in the
+     * configuration parameter "asset-usecase".
+     *
      * @see org.apache.lenya.cms.usecase.Usecase#advance()
      */
     public void advance() throws UsecaseException {
@@ -78,6 +82,9 @@
             try {
                 invoker = (UsecaseInvoker) this.manager.lookup(UsecaseInvoker.ROLE);
                 String usecaseName = getParameterAsString("asset-usecase");
+
+                if (getLogger().isDebugEnabled())
+                    getLogger().debug("InsertAsset::advance() calling invoker with usecaseName
[" + usecaseName + "]");
                 invoker.invoke(getSourceURL(), usecaseName, getParameters());
                 loadResources();
             }
@@ -91,4 +98,4 @@
         }
     }
 
-}
\ No newline at end of file
+}

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/editors/InsertAsset.java
------------------------------------------------------------------------------
    svn:keywords = Id

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=165625&r1=165624&r2=165625&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 Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataManager.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/metadata/MetaDataOwner.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreImpl.java Mon
May  2 06:13:49 2005
@@ -28,6 +28,9 @@
 
 import javax.xml.parsers.ParserConfigurationException;
 
+import org.apache.avalon.framework.container.ContainerUtil;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.excalibur.source.SourceNotFoundException;
@@ -44,7 +47,8 @@
  * Access dublin core meta data in documents. This class uses the dublin core specification
from
  * 2003-03-04.
  */
-public class DublinCoreImpl {
+public class DublinCoreImpl extends AbstractLogEnabled {
+
     private String sourceUri;
 
     private Map elements = new HashMap();
@@ -94,7 +98,8 @@
      * @param manager The service manager.
      * @throws DocumentException if an error occurs
      */
-    public DublinCoreImpl(String sourceUri, ServiceManager manager) throws DocumentException
{
+    public DublinCoreImpl(String sourceUri, ServiceManager manager, Logger _logger) throws
DocumentException {
+        ContainerUtil.enableLogging(this, _logger);
         this.sourceUri = sourceUri;
         this.manager = manager;
         loadValues();
@@ -145,6 +150,9 @@
      */
     protected void save() throws DocumentException {
 
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("DublinCoreImpl::save() called, sourceUri [" + sourceUri +
"]");
+
         try {
             Document doc = getDocument();
             Element metaElement = getMetaElement(doc);
@@ -447,4 +455,4 @@
         return (String[]) keys.toArray(new String[keys.size()]);
     }
 
-}
\ No newline at end of file
+}

Modified: lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreProxy.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreProxy.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreProxy.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/metadata/dublincore/DublinCoreProxy.java Mon
May  2 06:13:49 2005
@@ -19,6 +19,9 @@
 
 package org.apache.lenya.cms.metadata.dublincore;
 
+import org.apache.avalon.framework.container.ContainerUtil;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.lenya.cms.metadata.MetaDataManager;
 import org.apache.lenya.cms.publication.DocumentException;
@@ -27,7 +30,7 @@
  * A proxy to the dublin core meta implementation so that meta data is 
  * only read from file when it is actually requested.
  */
-public class DublinCoreProxy implements DublinCore {
+public class DublinCoreProxy extends AbstractLogEnabled implements DublinCore {
 
     private DublinCoreImpl dcCore;
     private String sourceUri;
@@ -38,7 +41,8 @@
      * @param sourceUri The source URI.
      * @param manager The service manager.
      */
-    public DublinCoreProxy(String sourceUri, ServiceManager manager) {
+    public DublinCoreProxy(String sourceUri, ServiceManager manager, Logger _logger) {
+        ContainerUtil.enableLogging(this, _logger);
         this.sourceUri = sourceUri;
         this.manager = manager;
     }
@@ -51,7 +55,7 @@
      */
     protected DublinCoreImpl instance() throws DocumentException {
         if (this.dcCore == null) {
-            this.dcCore = new DublinCoreImpl(this.sourceUri, this.manager);
+            this.dcCore = new DublinCoreImpl(this.sourceUri, this.manager, getLogger());
         }
         return this.dcCore;
     }
@@ -99,13 +103,12 @@
         instance().removeAllValues(key);
     }
     
-	/**
-	 * @see org.apache.lenya.cms.metadata.MetaDataManager#replaceBy(org.apache.lenya.cms.metadata.MetaDataManager)
-	 */
-	public void replaceBy(MetaDataManager other) throws DocumentException {
-		instance().replaceBy((DublinCore) other);
-
-	}
+    /**
+     * @see org.apache.lenya.cms.metadata.MetaDataManager#replaceBy(org.apache.lenya.cms.metadata.MetaDataManager)
+     */
+    public void replaceBy(MetaDataManager other) throws DocumentException {
+        instance().replaceBy((DublinCore) other);
+    }
 
     /**
      * @see org.apache.lenya.cms.metadata.dublincore.DublinCore#addValues(java.lang.String,
java.lang.String[])

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java Mon May  2
06:13:49 2005
@@ -389,7 +389,7 @@
      * @see org.apache.lenya.cms.metadata.MetaDataOwner#getMetaData()
      */
     public MetaDataManager getMetaData() {
-        return new DublinCoreProxy(getSourceURI(), this.manager);
+        return new DublinCoreProxy(getSourceURI(), this.manager, getLogger());
     }
 
     private History history;

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultResourcesManager.java Mon
May  2 06:13:49 2005
@@ -119,7 +119,7 @@
             // convert spaces in the file name to underscores
             fileName = fileName.replace(' ', '_');
 
-            Resource resource = new Resource(document, fileName, this.manager);
+            Resource resource = new Resource(document, fileName, this.manager, getLogger());
             Transactionable[] nodes = resource.getRepositoryNodes();
             for (int i = 0; i < nodes.length; i++) {
                 nodes[i].lock();
@@ -259,7 +259,7 @@
      */
     protected Resource[] getResources(Document document, FileFilter filter) {
         File[] files = new File[0];
-        Resource tempResource = new Resource(document, "temp", this.manager);
+        Resource tempResource = new Resource(document, "temp", this.manager, getLogger());
 
         SourceResolver resolver = null;
         Source source = null;
@@ -275,7 +275,7 @@
                 }
                 resources = new Resource[files.length];
                 for (int i = 0; i < files.length; i++) {
-                    resources[i] = new Resource(document, files[i].getName(), this.manager);
+                    resources[i] = new Resource(document, files[i].getName(), this.manager,
getLogger());
                 }
             }
             else {
@@ -330,7 +330,7 @@
             for (int i = 0; i < resources.length; i++) {
                 Resource sourceResource = resources[i];
                 Resource destinationResource = new Resource(destinationDocument, sourceResource
-                        .getName(), this.manager);
+                        .getName(), this.manager, getLogger());
 
                 Source sourceSource = null;
                 Source sourceMetaSource = null;
@@ -393,4 +393,4 @@
         }
     }
 
-}
\ No newline at end of file
+}

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentFactory.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentFactory.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentFactory.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentFactory.java Mon May  2
06:13:49 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -30,6 +30,8 @@
 
 /**
  * Document factory.
+ *
+ * @version $Id:$
  */
 public class DocumentFactory extends AbstractLogEnabled implements IdentifiableFactory {
 
@@ -107,6 +109,9 @@
      */
     public Identifiable build(IdentityMap map, String key) throws Exception {
 
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("DocumentFactory::build() called with key [" + key + "]");
+
         String[] snippets = key.split(":");
         String publicationId = snippets[0];
         String area = snippets[1];
@@ -145,7 +150,10 @@
                 this.manager.release(resolver);
             }
         }
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("DocumentFactory::build() done.");
+
         return document;
     }
 
-}
\ No newline at end of file
+}

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdentityMap.java Mon May
 2 06:13:49 2005
@@ -69,11 +69,17 @@
      */
     public Document get(Publication publication, String area, String documentId, String language)
             throws DocumentBuildException {
+
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("DocumentIdentityMap::get() called on publication [" + publication.getId()
+ "], area [" + area + "], documentId [" + documentId + "], language [" + language + "]");
+
         DocumentFactory factory = (DocumentFactory) getFactory(Document.TRANSACTIONABLE_TYPE);
-        return (Document) get(Document.TRANSACTIONABLE_TYPE, factory.getKey(publication,
-                area,
-                documentId,
-                language));
+        String key = factory.getKey(publication, area, documentId, language);
+
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("DocumentIdentityMap::get() got key [" + key + "] from DocumentFactory");
+
+        return (Document) get(Document.TRANSACTIONABLE_TYPE, key);
     }
 
     /**
@@ -225,4 +231,4 @@
             throw new DocumentBuildException(e);
         }
     }
-}
\ No newline at end of file
+}

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/Resource.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/Resource.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/Resource.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/Resource.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -16,6 +16,9 @@
  */
 package org.apache.lenya.cms.publication;
 
+import org.apache.avalon.framework.container.ContainerUtil;
+import org.apache.avalon.framework.logger.AbstractLogEnabled;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceNotFoundException;
@@ -32,7 +35,7 @@
  * 
  * @version $Id:$
  */
-public class Resource implements MetaDataOwner {
+public class Resource extends AbstractLogEnabled implements MetaDataOwner {
 
     private Document document;
     private String name;
@@ -44,7 +47,8 @@
      * @param name The name.
      * @param manager The service manager.
      */
-    public Resource(Document document, String name, ServiceManager manager) {
+    public Resource(Document document, String name, ServiceManager manager, Logger _logger)
{
+        ContainerUtil.enableLogging(this, _logger);
         this.document = document;
         this.name = name;
         this.manager = manager;
@@ -68,7 +72,7 @@
      * @see org.apache.lenya.cms.metadata.MetaDataOwner#getMetaData()
      */
     public MetaDataManager getMetaData() {
-        return new DublinCoreProxy(getMetaSourceURI(), this.manager);
+        return new DublinCoreProxy(getMetaSourceURI(), this.manager, getLogger());
     }
 
     /**
@@ -215,4 +219,4 @@
         }
     }
     
-}
\ No newline at end of file
+}

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/publication/Resource.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/Assets.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -112,6 +112,10 @@
      * Adds an asset.
      */
     protected void addAsset() {
+
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("Assets::addAsset() called");
+
         String title = getParameterAsString("title");
         String creator = getParameterAsString("creator");
         String rights = getParameterAsString("rights");
@@ -133,6 +137,10 @@
                 this.manager.release(resourcesManager);
             }
         }
+
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("Assets::addAsset() done.");
+
     }
 
-}
\ No newline at end of file
+}

Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/site/usecases/CreateDocument.java Mon May  2
06:13:49 2005
@@ -108,6 +108,13 @@
         Publication publication = parent.getPublication();
         String area = parent.getArea();
 
+        /*
+         * Get an instance of Document.
+         * This will (ultimately) be created by the implementation for
+         * the DocumentBuilder role.
+         */
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("createDocument() creating Document instance");
         Document document = parent.getIdentityMap().get(publication,
                 area,
                 documentId,
@@ -117,7 +124,13 @@
             nodes[i].lock();
         }
 
-        // create an instance of DocumentType
+        /*
+         * Create an instance of DocumentType, and then
+         * use the creator for this DocumentType to actually
+         * physically create a document of this type.
+         */
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("createDocument() looking up a DocumentTypeBuilder so that
we can call the creator");
         DocumentTypeBuilder documentTypeBuilder = null;
         DocumentType documentType = null;
         try {
@@ -127,8 +140,8 @@
 
             String parentId = parent.getId().substring(1);
             String childId = document.getName();
-
-            documentType.getCreator().create(
+            ParentChildCreatorInterface creator = documentType.getCreator();
+            creator.create(
                 documentType.getSampleContentLocation(),
                 new File(publication.getContentDirectory(area), parentId),
                 childId,

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/usecase/DummyUsecase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -39,4 +39,4 @@
      */
     void invoke(String webappUrl, String usecaseName, Map parameters) throws UsecaseException;
 
-}
\ No newline at end of file
+}

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseInvokerImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseProxy.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: lenya/trunk/src/java/org/apache/lenya/cms/usecase/UsecaseView.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/transaction/IdentifiableFactory.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/transaction/IdentifiableFactory.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/transaction/IdentifiableFactory.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/transaction/IdentifiableFactory.java Mon May  2
06:13:49 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.

Propchange: lenya/trunk/src/java/org/apache/lenya/transaction/IdentifiableFactory.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMap.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMap.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMap.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMap.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -24,9 +24,12 @@
 public interface IdentityMap {
 
     /**
+     * Retrieve an instance from the map. If no instance exists
+     * for the given key, the factory is used to build one.
+     * @see #getFactory(java.lang.String)
      * @param type The type of the transactionable.
      * @param key The key for the transactionable.
-     * @return A transcationable.
+     * @return A transactionable.
      */
     Identifiable get(String type, String key);
 
@@ -60,4 +63,4 @@
      */
     Identifiable[] getObjects();
 
-}
\ No newline at end of file
+}

Propchange: lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMap.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java?rev=165625&r1=165624&r2=165625&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java Mon May  2 06:13:49
2005
@@ -1,5 +1,5 @@
 /*
- * Copyright  1999-2004 The Apache Software Foundation
+ * Copyright  1999-2005 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -43,6 +43,10 @@
             this.maps.put(type, map);
         }
         Identifiable object = (Identifiable) map.get(key);
+
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("IdentityMapImpl::get() looked up type [" + type + "], key
[" + key + "] in map, is it there ? " + (object != null));
+
         if (object == null) {
             try {
                 object = getFactory(type).build(this, key);
@@ -101,4 +105,4 @@
         return (Identifiable[]) objects.toArray(new Identifiable[objects.size()]);
     }
 
-}
\ No newline at end of file
+}

Propchange: lenya/trunk/src/java/org/apache/lenya/transaction/IdentityMapImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id



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


Mime
View raw message