cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r367049 - in /cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon: components/store/impl/ components/xpointer/ environment/ selection/ serialization/
Date Sun, 08 Jan 2006 16:41:20 GMT
Author: antonio
Date: Sun Jan  8 08:41:14 2006
New Revision: 367049

URL: http://svn.apache.org/viewcvs?rev=367049&view=rev
Log:
Remove abstract methods already defined in implemented interface. Remove concrete methods
that only calls parent class method.

Modified:
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/store/impl/JCSDefaultStore.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/xpointer/ElementPathPart.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/Environment.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java
    cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/store/impl/JCSDefaultStore.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/store/impl/JCSDefaultStore.java?rev=367049&r1=367048&r2=367049&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/store/impl/JCSDefaultStore.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/store/impl/JCSDefaultStore.java
Sun Jan  8 08:41:14 2006
@@ -46,10 +46,9 @@
 import org.apache.jcs.engine.control.CompositeCacheManager;
 import org.apache.jcs.engine.memory.MemoryCache;
 
-
 /**
  * This is the default store implementation based on JCS
- * http://jakarta.apache.org/turbine/jcs/BasicJCSConfiguration.html
+ * http://jakarta.apache.org/jcs/BasicJCSConfiguration.html
  * 
  * @version $Id$
  */
@@ -65,13 +64,13 @@
 
     /** The JCS configuration properties */
     protected Properties properties;
-    
+
     /** The JCS region name */
     protected String region;
-    
+
     /** JCS Cache manager */
     private CompositeCacheManager cacheManager;
-    
+
     /** The Java Cache System object */
     private JCSCacheAccess jcs;
 
@@ -83,17 +82,17 @@
 
     /** Service Manager */
     private ServiceManager manager;
-    
+
     /** Store janitor */
     private StoreJanitor janitor;
-    
+
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context aContext) throws ContextException {
         this.context = aContext;
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
@@ -101,7 +100,7 @@
         this.manager = aManager;
         this.janitor = (StoreJanitor)this.manager.lookup(StoreJanitor.ROLE);
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
      */
@@ -120,7 +119,7 @@
         } catch (IOException e) {
             throw new ParameterException("Failure loading cache defaults",e);
         }
-        
+
         this.properties = new Properties(defaults);
         String[] names = parameters.getNames();
         for (int i = 0; i < names.length; i++) {
@@ -128,7 +127,7 @@
                 this.properties.put(names[i], parameters.getParameter(names[i]));
             }
         }
-        
+
         int maxobjects = parameters.getParameterAsInteger("maxobjects", -1);
         if (maxobjects != -1) {
             String key = "jcs.region." + region + ".cacheattributes.MaxObjects";
@@ -167,9 +166,8 @@
         } catch (IOException e) {
             throw new ParameterException("Unable to set directory", e);
         }
-        
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.activity.Initializable#initialize()
      */
@@ -179,7 +177,7 @@
         this.jcs = new JCSCacheAccess(cacheManager.getCache(region));
         this.janitor.register(this);
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.activity.Disposable#dispose()
      */
@@ -202,11 +200,11 @@
             this.manager = null;
         }
     }
-    
+
     protected String getDefaultPropertiesFile() {
         return DEFAULT_PROPERTIES;
     }
-    
+
     /**
      * Sets the disk cache location.
      */
@@ -239,7 +237,7 @@
     }
 
     // ---------------------------------------------------- Store implementation
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#get(java.lang.Object)
      */
@@ -252,27 +250,26 @@
                 getLogger().debug("NOT Found key: " + key);
             }
         }
-        
         return value;
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#store(java.lang.Object, java.lang.Object)
      */
     public void store(Object key, Object value)
     throws IOException {
-        
+
         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Store object " + value + " with key "+ key);
         }
-        
+
         try {
             this.jcs.put(key, value);
         } catch (CacheException ce) {
             getLogger().error("Failure storing object ", ce);
         }
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#free()
      */
@@ -288,7 +285,7 @@
             }
         }
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#clear()
      */
@@ -296,14 +293,14 @@
         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Clearing the store");
         }
-        
+
         try {
             this.jcs.remove();               
         } catch (CacheException ce) {
             getLogger().error("Failure clearing store", ce);
         }
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#remove(java.lang.Object)
      */
@@ -311,22 +308,21 @@
         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Removing item " + key);
         }
-        
+
         try {
            this.jcs.remove(key);
         } catch (CacheException ce) {
             getLogger().error("Failure removing object", ce);
         }
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#containsKey(java.lang.Object)
      */
     public boolean containsKey(Object key) {
         return this.jcs.get(key) != null;
     }
-    
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#keys()
      */
@@ -337,7 +333,7 @@
         return new IteratorEnumeration(Arrays.asList(keys).iterator());
         //return new IteratorEnumeration(this.jcs.getGroupKeys("").iterator());
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.excalibur.store.Store#size()
      */
@@ -347,7 +343,6 @@
         return memoryCache.getSize();
         //return this.jcs.getSize();
     }
-    
 
     private static class JCSCacheAccess extends GroupCacheAccess {
         private JCSCacheAccess(CompositeCache cacheControl) {
@@ -357,10 +352,5 @@
         /*private int getSize() {
             return super.cacheControl.getSize();
         }*/
-        
-        public void dispose() {
-            super.dispose();
-        }
     }
-    
 }

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/xpointer/ElementPathPart.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/xpointer/ElementPathPart.java?rev=367049&r1=367048&r2=367049&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/xpointer/ElementPathPart.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/components/xpointer/ElementPathPart.java
Sun Jan  8 08:41:14 2006
@@ -142,18 +142,6 @@
                 super.endDocument();
         }
 
-        public void startPrefixMapping(String prefix, String uri)
-                throws SAXException {
-            // let namespace prefix alway through
-            super.startPrefixMapping(prefix, uri);
-        }
-
-        public void endPrefixMapping(String prefix)
-                throws SAXException {
-            // let namespace prefix alway through
-            super.endPrefixMapping(prefix);
-        }
-
         public void characters(char c[], int start, int len)
                 throws SAXException {
             if (include)

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/Environment.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/Environment.java?rev=367049&r1=367048&r2=367049&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/Environment.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/environment/Environment.java
Sun Jan  8 08:41:14 2006
@@ -53,7 +53,7 @@
     String getAction();
 
     /**
-     * Redirect to the given URL
+     * Redirect the client to the given URL
      */
     void redirect(String url, boolean global, boolean permanent) 
     throws IOException;

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java?rev=367049&r1=367048&r2=367049&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/selection/AbstractSwitchSelector.java
Sun Jan  8 08:41:14 2006
@@ -29,26 +29,6 @@
     implements SwitchSelector {
 
     /**
-     * Method to create a selector context.
-     *
-     * @param objectModel The <code>Map</code> containing object of the
-     *                    calling environment which may be used
-     *                    to select values to test the expression.
-     * @param parameters  The sitemap parameters, as specified by
-     *                    &lt;parameter/&gt; tags.
-     * @return selector context
-     */
-    public abstract Object getSelectorContext(Map objectModel, Parameters parameters);
-
-    /**
-     * Selectors test pattern against some objects in a <code>Map</code>
-     * model and signals success with the returned boolean value
-     * @param expression  The expression to test.
-     * @return boolean    Signals successful test.
-     */
-    public abstract boolean select(String expression, Object selectorContext);
-
-    /**
      * Selectors test pattern against some objects in a <code>Map</code>
      * model and signals success with the returned boolean value
      * @param expr        The expression to test.
@@ -58,5 +38,3 @@
         return select(expr, getSelectorContext(objectModel, params));
     }
 }
-
-

Modified: cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java?rev=367049&r1=367048&r2=367049&view=diff
==============================================================================
--- cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
(original)
+++ cocoon/trunk/cocoon-core/src/main/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
Sun Jan  8 08:41:14 2006
@@ -42,8 +42,6 @@
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 import javax.xml.transform.stream.StreamResult;
-import java.io.IOException;
-import java.io.OutputStream;
 import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -133,24 +131,24 @@
         return this.getTransformerFactory().newTransformerHandler();
     }
 
-    /**
-     * Set the {@link OutputStream} where the requested resource should
-     * be serialized.
-     */
-    public void setOutputStream(OutputStream out) throws IOException {
-        /*
-         * Add a level of buffering to the output stream. Xalan serializes
-         * every character individually. In conjunction with chunked
-         * transfer encoding this would otherwise lead to a whopping 6-fold
-         * increase of data on the wire.
-         */
-        //  if (outputBufferSize > 0) {
-        //      super.setOutputStream(
-        //        new BufferedOutputStream(out, outputBufferSize));
-        //  } else {
-        super.setOutputStream(out);
-        //  }
-    }
+//    /**
+//     * Set the {@link OutputStream} where the requested resource should
+//     * be serialized.
+//     */
+//    public void setOutputStream(OutputStream out) throws IOException {
+//        /*
+//         * Add a level of buffering to the output stream. Xalan serializes
+//         * every character individually. In conjunction with chunked
+//         * transfer encoding this would otherwise lead to a whopping 6-fold
+//         * increase of data on the wire.
+//         */
+//        //  if (outputBufferSize > 0) {
+//        //      super.setOutputStream(
+//        //        new BufferedOutputStream(out, outputBufferSize));
+//        //  } else {
+//        super.setOutputStream(out);
+//        //  }
+//    }
 
     public void configure(Core core) {
         String defaultEncoding  = core.getSettings().getFormEncoding();
@@ -541,19 +539,4 @@
             this.uriList.clear();
         }
     }
-
-    /* (non-Javadoc)
-     * @see org.xml.sax.ContentHandler#endDocument()
-     */
-    public void endDocument() throws SAXException {
-        super.endDocument();
-
-        //   if (this.output != null) {
-        //       try {
-        //           this.output.flush();
-        //       } catch (IOException ignored) {
-        //       }
-        //   }
-    }
-
 }



Mime
View raw message