Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 7636 invoked from network); 22 Apr 2005 14:42:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Apr 2005 14:42:41 -0000 Received: (qmail 45623 invoked by uid 500); 22 Apr 2005 14:43:03 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 45530 invoked by uid 500); 22 Apr 2005 14:43:02 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 45478 invoked by uid 99); 22 Apr 2005 14:43:01 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 22 Apr 2005 07:42:59 -0700 Received: (qmail 7546 invoked by uid 65534); 22 Apr 2005 14:42:33 -0000 Message-ID: <20050422144233.7545.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r164244 - /cocoon/trunk/src/java/org/apache/cocoon/generation/StatusGenerator.java Date: Fri, 22 Apr 2005 14:42:33 -0000 To: cvs@cocoon.apache.org From: reinhard@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: reinhard Date: Fri Apr 22 07:42:32 2005 New Revision: 164244 URL: http://svn.apache.org/viewcvs?rev=3D164244&view=3Drev 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/StatusGenerato= r=2Ejava URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/= generation/StatusGenerator.java?rev=3D164244&r1=3D164243&r2=3D164244&view= =3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- 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; -=3D=3D=3D=3D=3D=3D=3D ->>>>>>> .r164238 import org.apache.cocoon.core.Core; -<<<<<<< .mine -import org.apache.cocoon.environment.SourceResolver; -import org.apache.cocoon.generation.ServiceableGenerator; -=3D=3D=3D=3D=3D=3D=3D 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 Gerhard Froehlich * @version $Id$ */ -public class StatusGenerator extends ServiceableGenerator { +public class StatusGenerator=20 + extends ServiceableGenerator { =20 + =20 private static final String SHOW_CONTINUATIONS_INFO =3D "show-cont"; = =20 =20 /** - * 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 =3D false; =20 /** + * 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 =3D "http://apache.org/cocoon= /status/2.0"; + protected static final String namespace =3D + "http://apache.org/cocoon/status/2.0"; =20 /** * The XML namespace for xlink */ - protected static final String xlinkNamespace =3D "http://www.w3.org/19= 99/xlink"; + protected static final String xlinkNamespace =3D + "http://www.w3.org/1999/xlink"; =20 /** * The namespace prefix for xlink namespace */ protected static final String xlinkPrefix =3D "xlink"; =20 - /** * Set the current ServiceManager instance used by this * Serviceable. @@ -150,9 +145,18 @@ continuationsManager =3D (ContinuationsManager) this.manager.l= ookup(ContinuationsManager.ROLE); } else { getLogger().info("ContinuationsManager is not available. Sorry= no overview of created continuations"); - } + } =20 } =20 + public void setup(SourceResolver resolver, Map objectModel, String src= , Parameters parameters)=20 + throws ProcessingException, SAXException, IOException { + super.setup(resolver, objectModel, src, parameters); + this.showContinuationsInformation =3D parameters.getParameterAsBoo= lean(SHOW_CONTINUATIONS_INFO, false); + } =20 + =20 + /* (non-Javadoc) + * @see org.apache.avalon.framework.activity.Disposable#dispose() + */ public void dispose() { if (this.manager !=3D null) { this.manager.release(this.store_persistent); @@ -162,13 +166,6 @@ } super.dispose(); } - =20 - =20 - public void setup(SourceResolver resolver, Map objectModel, String src= , Parameters parameters)=20 - throws ProcessingException, SAXException, IOException { - super.setup(resolver, objectModel, src, parameters); - this.showContinuationsInformation =3D parameters.getParameterAsBoo= lean(SHOW_CONTINUATIONS_INFO, false); - } =20 /** 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); - =20 + if(this.showContinuationsInformation) { genContinuationsTree(); =20 - } =20 + } =20 genSettings(); genVMStatus(); genProperties(); - =20 + // End root element. this.xmlConsumer.endElement(namespace, "statusinfo", "statusinfo"); } - + =20 private void genContinuationsTree() throws SAXException { startGroup("Continuations"); List continuationsAsDataBeansList =3D this.continuationsManager.ge= tWebContinuationsDataBeanList(); @@ -251,7 +248,7 @@ } =20 this.xmlConsumer.endElement(namespace, "cont", "cont"); } =20 - =20 + private void genVMStatus() throws SAXException { AttributesImpl atts =3D new AttributesImpl(); =20 @@ -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()); - =20 - this.endGroup(); - =20 } =20 private void genProperties() throws SAXException { @@ -549,4 +543,4 @@ } this.xmlConsumer.endElement(namespace, "value", "value"); } -} +} \ No newline at end of file