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/01/25 18:52:44 UTC

svn commit: r126401 - /lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java /lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java

Author: andreas
Date: Tue Jan 25 09:52:42 2005
New Revision: 126401

URL: http://svn.apache.org/viewcvs?view=rev&rev=126401
Log:
switch to AbstractLogEnabled
Modified:
   lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java
   lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java

Modified: lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java?view=diff&rev=126401&p1=lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java&r1=126400&p2=lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java&r2=126401
==============================================================================
--- lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java	(original)
+++ lenya/trunk/src/test/org/apache/lenya/ac/impl/LDAPUserTest.java	Tue Jan 25 09:52:42 2005
@@ -81,7 +81,8 @@
         String publicationId = "default";
         String servletContextPath = "/home/egli/build/jakarta-tomcat-4.1.21-LE-jdk14/webapps/lenya/";
 
-        return PublicationFactory.getPublication(publicationId, servletContextPath);
+        PublicationFactory factory = PublicationFactory.getInstance(getLogEnabledLogger());
+        return factory.getPublication(publicationId, servletContextPath);
     }
 
     /**

Modified: lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java
Url: http://svn.apache.org/viewcvs/lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java?view=diff&rev=126401&p1=lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java&r1=126400&p2=lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java&r2=126401
==============================================================================
--- lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java	(original)
+++ lenya/trunk/src/test/org/apache/lenya/cms/PublicationHelper.java	Tue Jan 25 09:52:42 2005
@@ -1,21 +1,21 @@
 /*
- * Copyright  1999-2004 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.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
+ * Copyright 1999-2004 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. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ *  
  */
 
-/* $Id: PublicationHelper.java,v 1.7 2004/03/04 15:41:09 egli Exp $  */
+/* $Id$ */
 
 package org.apache.lenya.cms;
 
@@ -27,36 +27,35 @@
 import org.apache.lenya.cms.publication.PublicationFactory;
 
 public class PublicationHelper {
-    
+
     /**
      * Constructor for PublicationHelper.
-     *
+     *  
      */
-    protected PublicationHelper() {}
-    
+    protected PublicationHelper() {
+    }
+
     /**
-     * Initializes the object with the first parameters from the command line arguments
-     * <code>args</code>. The remainder of the array is returned.
+     * Initializes the object with the first parameters from the command line
+     * arguments <code>args</code>. The remainder of the array is returned.
      * 
      * @param args The command line arguments of the test.
-     * @return The remainder of the arguments after the publication parameters are extracted.
-     * 
+     * @return The remainder of the arguments after the publication parameters
+     *         are extracted.
+     *  
      */
     public static String[] extractPublicationArguments(String[] args) {
         String servletContextPath = args[0];
         String publicationId = args[1];
         try {
-            publication =
-                PublicationFactory.getPublication(
-                    publicationId,
-                    servletContextPath);
+            PublicationFactory factory = PublicationFactory.getInstance(null);
+            publication = factory.getPublication(publicationId, servletContextPath);
         } catch (PublicationException e) {
             e.printStackTrace();
         }
 
         List subList = Arrays.asList(args).subList(2, args.length);
-        String[] remainder =
-            (String[])subList.toArray(new String[subList.size()]);
+        String[] remainder = (String[]) subList.toArray(new String[subList.size()]);
 
         return remainder;
     }
@@ -70,4 +69,4 @@
     public static Publication getPublication() {
         return publication;
     }
-}
+}
\ No newline at end of file

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