You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ge...@apache.org on 2005/05/26 03:22:23 UTC

svn commit: r178563 - /jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/generic/LookupCommand.java

Author: germuska
Date: Wed May 25 18:22:21 2005
New Revision: 178563

URL: http://svn.apache.org/viewcvs?rev=178563&view=rev
Log:
Expose catalogFactory so that subclasses can get at it.

Modified:
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/generic/LookupCommand.java

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/generic/LookupCommand.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/generic/LookupCommand.java?rev=178563&r1=178562&r2=178563&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/generic/LookupCommand.java (original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/generic/LookupCommand.java Wed May 25 18:22:21 2005
@@ -48,12 +48,13 @@
     // -------------------------------------------------------------- Constructors
 
     /**
-     * Create an instance with an unspecified <code>catalogFactory</code> property.  
-     * This property can be set later using <code>setProperty</code>, or if it is not set,
-     * the static singleton instance from <code>CatalogFactory.getInstance()</code> will be used. 
+     * Create an instance, setting its <code>catalogFactory</code> property to the
+     * value of <code>CatalogFactory.getInstance()</code>. 
      * 
      */
-    public LookupCommand() {    }
+    public LookupCommand() {    
+        this(CatalogFactory.getInstance());
+    }
     
     /**
      * Create an instance and initialize the <code>catalogFactory</code> property
@@ -66,9 +67,7 @@
 
     // -------------------------------------------------------------- Properties
 
-
-
-    private CatalogFactory catalogFactory = null;
+    protected CatalogFactory catalogFactory = null;
 
     /**
      * <p>Set the {@link CatalogFactory} from which lookups will be
@@ -77,6 +76,16 @@
     public void setCatalogFactory(CatalogFactory catalogFactory) {
         this.catalogFactory = catalogFactory;
     }
+    
+    /**
+     * Return the {@link CatalogFactory} from which lookups will be performed. 
+     * @return
+     */
+    public CatalogFactory getCatalogFactory() {
+
+        return this.catalogFactory;
+    }
+
     
     private String catalogName = null;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org