You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by re...@apache.org on 2005/04/22 16:42:33 UTC
svn commit: r164244 -
/cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java
Author: reinhard
Date: Fri Apr 22 07:42:32 2005
New Revision: 164244
URL: http://svn.apache.org/viewcvs?rev=164244&view=rev
Log:
overlooked version conflict - this should fix it (hopefully)
Modified:
cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java
Modified: cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java?rev=164244&r1=164243&r2=164244&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java Fri Apr 22 07:42:32 2005
@@ -32,20 +32,12 @@
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.Constants;
-<<<<<<< .mine
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.flow.ContinuationsManager;
import org.apache.cocoon.components.flow.WebContinuationDataBean;
-import org.apache.cocoon.configuration.Settings;
-=======
->>>>>>> .r164238
import org.apache.cocoon.core.Core;
-<<<<<<< .mine
-import org.apache.cocoon.environment.SourceResolver;
-import org.apache.cocoon.generation.ServiceableGenerator;
-=======
import org.apache.cocoon.core.Settings;
->>>>>>> .r164238
+import org.apache.cocoon.environment.SourceResolver;
import org.apache.commons.lang.SystemUtils;
import org.apache.excalibur.store.Store;
import org.apache.excalibur.store.StoreJanitor;
@@ -74,7 +66,7 @@
* cocoon-version CDATA #IMPLIED
* >
*
- * <!ELEMENT group (group|value|cont)*>
+ * <!ELEMENT group (group|value)*>
* <!ATTLIST group
* name CDATA #IMPLIED
* >
@@ -93,17 +85,13 @@
* @author <a href="mailto:g-froehlich@gmx.de">Gerhard Froehlich</a>
* @version $Id$
*/
-public class StatusGenerator extends ServiceableGenerator {
+public class StatusGenerator
+ extends ServiceableGenerator {
+
private static final String SHOW_CONTINUATIONS_INFO = "show-cont";
/**
- * The StoreJanitor used to get cache statistics
- */
- protected StoreJanitor storejanitor;
- protected Store store_persistent;
-
- /**
* The ContinuationManager
*/
protected ContinuationsManager continuationsManager;
@@ -114,21 +102,28 @@
protected boolean showContinuationsInformation = false;
/**
+ * The StoreJanitor used to get cache statistics
+ */
+ protected StoreJanitor storejanitor;
+ protected Store store_persistent;
+
+ /**
* The XML namespace for the output document.
*/
- protected static final String namespace = "http://apache.org/cocoon/status/2.0";
+ protected static final String namespace =
+ "http://apache.org/cocoon/status/2.0";
/**
* The XML namespace for xlink
*/
- protected static final String xlinkNamespace = "http://www.w3.org/1999/xlink";
+ protected static final String xlinkNamespace =
+ "http://www.w3.org/1999/xlink";
/**
* The namespace prefix for xlink namespace
*/
protected static final String xlinkPrefix = "xlink";
-
/**
* Set the current <code>ServiceManager</code> instance used by this
* <code>Serviceable</code>.
@@ -150,9 +145,18 @@
continuationsManager = (ContinuationsManager) this.manager.lookup(ContinuationsManager.ROLE);
} else {
getLogger().info("ContinuationsManager is not available. Sorry no overview of created continuations");
- }
+ }
}
+ public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
+ throws ProcessingException, SAXException, IOException {
+ super.setup(resolver, objectModel, src, parameters);
+ this.showContinuationsInformation = parameters.getParameterAsBoolean(SHOW_CONTINUATIONS_INFO, false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.avalon.framework.activity.Disposable#dispose()
+ */
public void dispose() {
if (this.manager != null) {
this.manager.release(this.store_persistent);
@@ -162,13 +166,6 @@
}
super.dispose();
}
-
-
- public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
- throws ProcessingException, SAXException, IOException {
- super.setup(resolver, objectModel, src, parameters);
- this.showContinuationsInformation = parameters.getParameterAsBoolean(SHOW_CONTINUATIONS_INFO, false);
- }
/** Generate the status information in XML format.
* @throws SAXException
@@ -214,18 +211,18 @@
atts.addAttribute(namespace, "host", "host", "CDATA", localHost);
atts.addAttribute(namespace, "cocoon-version", "cocoon-version", "CDATA", Constants.VERSION);
this.xmlConsumer.startElement(namespace, "statusinfo", "statusinfo", atts);
-
+
if(this.showContinuationsInformation) {
genContinuationsTree();
- }
+ }
genSettings();
genVMStatus();
genProperties();
-
+
// End root element.
this.xmlConsumer.endElement(namespace, "statusinfo", "statusinfo");
}
-
+
private void genContinuationsTree() throws SAXException {
startGroup("Continuations");
List continuationsAsDataBeansList = this.continuationsManager.getWebContinuationsDataBeanList();
@@ -251,7 +248,7 @@
}
this.xmlConsumer.endElement(namespace, "cont", "cont");
}
-
+
private void genVMStatus() throws SAXException {
AttributesImpl atts = new AttributesImpl();
@@ -417,9 +414,6 @@
this.addValue(Settings.KEY_SHOWTIME, s.isShowTime());
this.addValue(Settings.KEY_HIDE_SHOWTIME, s.isHideShowTime());
this.addValue(Settings.KEY_LAZY_MODE, s.isLazyMode());
-
- this.endGroup();
-
}
private void genProperties() throws SAXException {
@@ -549,4 +543,4 @@
}
this.xmlConsumer.endElement(namespace, "value", "value");
}
-}
+}
\ No newline at end of file