You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by th...@apache.org on 2007/11/14 21:39:01 UTC

svn commit: r595037 - /lenya/tags/RELEASE_2_0_RC_1/src/modules-core/properties/java/src/org/apache/lenya/cms/cocoon/components/modules/input/PropertiesModule.java

Author: thorsten
Date: Wed Nov 14 12:39:00 2007
New Revision: 595037

URL: http://svn.apache.org/viewvc?rev=595037&view=rev
Log:
Fixing accident commit

Modified:
    lenya/tags/RELEASE_2_0_RC_1/src/modules-core/properties/java/src/org/apache/lenya/cms/cocoon/components/modules/input/PropertiesModule.java

Modified: lenya/tags/RELEASE_2_0_RC_1/src/modules-core/properties/java/src/org/apache/lenya/cms/cocoon/components/modules/input/PropertiesModule.java
URL: http://svn.apache.org/viewvc/lenya/tags/RELEASE_2_0_RC_1/src/modules-core/properties/java/src/org/apache/lenya/cms/cocoon/components/modules/input/PropertiesModule.java?rev=595037&r1=595036&r2=595037&view=diff
==============================================================================
--- lenya/tags/RELEASE_2_0_RC_1/src/modules-core/properties/java/src/org/apache/lenya/cms/cocoon/components/modules/input/PropertiesModule.java (original)
+++ lenya/tags/RELEASE_2_0_RC_1/src/modules-core/properties/java/src/org/apache/lenya/cms/cocoon/components/modules/input/PropertiesModule.java Wed Nov 14 12:39:00 2007
@@ -17,7 +17,6 @@
 package org.apache.lenya.cms.cocoon.components.modules.input;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.util.Enumeration;
 import java.util.HashSet;
@@ -33,17 +32,12 @@
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.modules.input.DefaultsModule;
 import org.apache.cocoon.components.modules.input.InputModule;
-import org.apache.cocoon.environment.Request;
 import org.apache.commons.lang.SystemUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
@@ -51,10 +45,6 @@
 import org.apache.lenya.cms.publication.Publication;	
 import org.apache.lenya.cms.publication.PublicationUtil;
 import org.apache.lenya.cms.module.ModuleManager;
-import org.apache.lenya.cms.publication.DocumentFactory;
-import org.apache.lenya.cms.publication.DocumentUtil;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationManager;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
@@ -66,7 +56,7 @@
  * directories.
  */
 public class PropertiesModule extends DefaultsModule implements InputModule,
-        Initializable, ThreadSafe, Serviceable, Contextualizable {
+        Initializable, ThreadSafe, Serviceable {
     
     private HashSet pubInit;
     
@@ -78,14 +68,6 @@
     
     private ServiceManager serviceManager;
 
-    private ServiceManager manager;
-
-    private PublicationManager publicationManager;
-
-    private DocumentFactory factory;
-
-    private Context context;
-
     private final static String lenyaHome = "context:/";
 
     private final static String DEFAULT_HOME_PROP = "lenya.home";
@@ -151,10 +133,6 @@
     }
 
     public void initialize() throws Exception {
-        Request request = ContextHelper.getRequest(context);
-        factory = DocumentUtil.getDocumentFactory(manager, request);
-        Publication[] pubs = publicationManager.getPublications(factory);
-        System.out.println("pubs:"+pubs.length);
         pubInit = new HashSet();
         
         // add all homes important to Lenya to the properties
@@ -252,7 +230,6 @@
             ParserConfigurationException, SAXException {
 
         Source source = null;
-        InputStream in = null;
         try {
 
             source = m_resolver.resolveURI(propertiesStringURI);
@@ -288,12 +265,6 @@
             if (source != null) {
                 m_resolver.release(source);
             }
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (IOException e) {
-                }
-            }
         }
 
         return filteringProperties;
@@ -329,10 +300,8 @@
 
     public void service(ServiceManager manager) throws ServiceException {        
         this.serviceManager = manager;
-        this.manager=manager;
         m_resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE);
         moduleManager = (ModuleManager) manager.lookup(ModuleManager.ROLE);
-        publicationManager = (PublicationManager) manager.lookup(PublicationManager.ROLE);
     }
 
     /**
@@ -349,10 +318,6 @@
      */
     private final void debug(String debugString) {
         getLogger().debug(debugString);
-    }
-
-    public void contextualize(Context context) throws ContextException {
-        this.context = context;
     }
 
 }



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