Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 85309 invoked by uid 500); 30 Jan 2003 05:21:56 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 85298 invoked by uid 500); 30 Jan 2003 05:21:55 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 30 Jan 2003 05:21:54 -0000 Message-ID: <20030130052154.74662.qmail@icarus.apache.org> From: vgritsenko@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation SessionPostTransformer.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N vgritsenko 2003/01/29 21:21:54 Modified: src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/acting AuthAction.java src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components CopletThread.java PortalManager.java src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context SessionContextImpl.java src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/acting AuthAction.java LoginAction.java src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components ApplicationHandler.java src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation SessionPostTransformer.java Log: cosmetic changes (unused variables, unthrown exceptions, unnecessary casts) Revision Changes Path 1.2 +7 -11 xml-cocoon2/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/acting/AuthAction.java Index: AuthAction.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/acting/AuthAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AuthAction.java 27 Sep 2002 09:05:17 -0000 1.1 +++ AuthAction.java 30 Jan 2003 05:21:53 -0000 1.2 @@ -75,24 +75,20 @@ String source, Parameters par) throws Exception { - if (this.getLogger().isDebugEnabled() == true) { - this.getLogger().debug("BEGIN act resolver="+resolver+ - ", objectModel="+objectModel+ - ", source="+source+ - ", par="+par); + if (getLogger().isDebugEnabled() == true) { + getLogger().debug("BEGIN act resolver="+resolver+ + ", objectModel="+objectModel+ + ", source="+source+ + ", par="+par); } final String copletID = par.getParameter("coplet", null); - PortalManager portal = null; - Map map = null; - + PortalManager portal = (PortalManager)this.manager.lookup( PortalManager.ROLE ); try { - portal = (PortalManager)this.manager.lookup( PortalManager.ROLE ); portal.configurationTest(); - if ( null != copletID) { + if (null != copletID) { portal.checkAuthentication(redirector, copletID); } - } finally { this.manager.release( portal ); } 1.4 +4 -8 xml-cocoon2/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/CopletThread.java Index: CopletThread.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/CopletThread.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CopletThread.java 7 Jan 2003 23:56:10 -0000 1.3 +++ CopletThread.java 30 Jan 2003 05:21:53 -0000 1.4 @@ -91,7 +91,6 @@ private Logger logger; private String copletID; private Map objectModel; - private Response response; private Object[] loadedCoplet; private ComponentManager manager; private SourceResolver resolver; @@ -119,7 +118,6 @@ this.copletID = copletID; this.objectModel = objectModel; this.logger = logger; - this.response = response; this.loadedCoplet = loadedCoplet; this.manager = manager; this.resolver = resolver; @@ -193,8 +191,6 @@ } } if ( includeFragment ) { - String res; - if (this.logger.isDebugEnabled() ) { this.logger.debug("portal: Loading coplet " + copletID); } @@ -232,14 +228,13 @@ for(int i=0; i 1000000) { @@ -1439,7 +1444,7 @@ DocumentFragment base, String path, Element deltaElement) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws SAXException, javax.xml.transform.TransformerException { // calling method is already synchronized Element originalRoot = (Element)DOMUtil.getSingleNode(original, path); Element baseRoot = (Element)DOMUtil.getSingleNode(base, path); @@ -1694,6 +1699,7 @@ /** * Check if the profile is already cached + * FIXME: This method is not used. Should be removed? */ private boolean isProfileCached(String profileID, Map configuration) throws ProcessingException { @@ -1859,7 +1865,7 @@ private void buildRunProfile(Map profileMap, SessionContext context, DocumentFragment baseProfile) - throws SAXException, ProcessingException, javax.xml.transform.TransformerException { + throws ProcessingException, javax.xml.transform.TransformerException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN buildRunProfile context="+context+", profile="+baseProfile); @@ -2143,7 +2149,7 @@ private void buildTypeProfile(Map theProfile, SessionContext context, DocumentFragment baseProfile) - throws SAXException, ProcessingException, javax.xml.transform.TransformerException { + throws javax.xml.transform.TransformerException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN buildTypeProfile context="+context+", profile="+baseProfile); @@ -2225,7 +2231,7 @@ * Set the tpe information */ private void setTypeInfo(DocumentFragment baseProfile, List paths, List confPaths) - throws SAXException, javax.xml.transform.TransformerException { + throws javax.xml.transform.TransformerException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN setTypeInfo profile="+baseProfile+", paths="+paths); @@ -2355,7 +2361,7 @@ */ private Map buildPortalLayouts(SessionContext context, DocumentFragment baseProfile) - throws SAXException, ProcessingException, javax.xml.transform.TransformerException { + throws ProcessingException, javax.xml.transform.TransformerException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN buildPortalLayouts context="+context+", profile="+baseProfile); @@ -2383,7 +2389,7 @@ */ private Map buildcopleyLayouts(SessionContext context, DocumentFragment baseProfile) - throws SAXException, ProcessingException, javax.xml.transform.TransformerException { + throws ProcessingException, javax.xml.transform.TransformerException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN buildcopleyLayouts context="+context+", profile="+baseProfile); @@ -2413,7 +2419,7 @@ DocumentFragment delta, String deltaRootTagName, String deltaTag) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN importProfileDelta root=" + profileRoot + ", delta=" + delta + ", deltaRoot:" + deltaRootTagName + ", delta: " + deltaTag); @@ -2448,7 +2454,7 @@ DocumentFragment delta, String deltaRootTagName, String deltaTag) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN addProfilePart root=" + profileRoot + ", delta=" + delta + ", deltaRoot:" + deltaRootTagName + ", delta: " + deltaTag); @@ -2464,7 +2470,7 @@ if (deltaRoot != null) { // root tag found in delta found, now search root tag in profile - oldNode = (Element)DOMUtil.getFirstNodeFromPath(profileRoot, new String[] {deltaTag}, false); + oldNode = DOMUtil.getFirstNodeFromPath(profileRoot, new String[] {deltaTag}, false); if (oldNode == null) { profileRoot.appendChild(profileRoot.getOwnerDocument().importNode(deltaRoot, true)); } else { @@ -2627,7 +2633,7 @@ XMLConsumer consumer, String copletNotAvailableMessage, long defaultCopletTimeout) - throws ProcessingException, SAXException, IOException, javax.xml.transform.TransformerException { + throws ProcessingException, SAXException, javax.xml.transform.TransformerException { // calling method is synced for(int i = 0; i < copletList.size(); i++) { this.processCoplet((Object[])copletList.get(i), @@ -2646,7 +2652,7 @@ boolean parallelCoplets, long defaultCopletTimeout, Element statusProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException, javax.xml.transform.TransformerException { // calling method is synced // All children, which are coplets are processed, all other tags // are ignored @@ -2683,7 +2689,7 @@ boolean parallelCoplets, long defaultCopletTimeout, Element statusProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException, javax.xml.transform.TransformerException { // calling method is synced String copletID = element.getAttributeNS(null, "id"); @@ -2801,7 +2807,6 @@ long defaultCopletTimeout) throws ProcessingException, SAXException, - IOException, javax.xml.transform.TransformerException { // calling method is synced @@ -2830,7 +2835,7 @@ } // now the status parameter - SourceParameters p = DOMUtil.createParameters(DOMUtil.getFirstNodeFromPath(element, new String[] {"status"}, false), null); + // SourceParameters p = DOMUtil.createParameters(DOMUtil.getFirstNodeFromPath(element, new String[] {"status"}, false), null); consumer.startElement("", "status", "status", attr); children = DOMUtil.selectNodeList(element, "status/*"); if (children != null && children.getLength() > 0) { @@ -2878,7 +2883,7 @@ } catch (ComponentException e) { throw new ProcessingException("Component for XMLDeserializer not found." + e, e); } finally { - if (interpreter != null) this.manager.release((Component)interpreter); + if (interpreter != null) this.manager.release(interpreter); } } } else { @@ -2923,7 +2928,7 @@ String copletID, String copletNr, Node[] miscNodes) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws javax.xml.transform.TransformerException { // calling method is synced Element node = null; @@ -2957,7 +2962,7 @@ SessionContext context, Map theProfile, DocumentFragment profile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException, javax.xml.transform.TransformerException { // synchronized as the caller is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN modifyCoplet request=" + requestString); @@ -3176,7 +3181,7 @@ String copletID, Map defaultCoplets, Map mediaCoplets) - throws ProcessingException { + { // no sync required if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN isCopletAvailable coplet="+copletID); @@ -3261,7 +3266,7 @@ * so later requests get the cached result. */ private Map getConfiguration() - throws SAXException, IOException, ProcessingException { + throws ProcessingException { // synchronized if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN getConfiguration"); @@ -3489,7 +3494,7 @@ * and optional the type profile */ private DocumentFragment buildBaseProfile(Map config, boolean adminProfile) - throws ProcessingException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN buildBaseProfile config="+config+", adminProfile="+adminProfile); @@ -3588,7 +3593,7 @@ private void buildGlobalProfile(Element profileRoot, Map config, boolean adminProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug("BEGIN buildGlobalProfile profileRoot="+profileRoot+", config="+config+", adminProfile="+adminProfile); @@ -3648,7 +3653,7 @@ Map config, String role, boolean adminProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced DocumentFragment roleFragment; @@ -3705,7 +3710,7 @@ String role, String id, boolean adminProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced DocumentFragment userFragment; SourceParameters pars; @@ -3762,7 +3767,7 @@ String role, String id, boolean adminProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced String res = (String)config.get(PortalConstants.CONF_STATUS_LOADRESOURCE); @@ -3810,20 +3815,18 @@ String role, String id, boolean adminProfile) - throws ProcessingException, SAXException, javax.xml.transform.TransformerException { + throws ProcessingException { // calling method is synced String res = (String)config.get(PortalConstants.CONF_STATUS_SAVERESOURCE); Element statusProfile = (Element)DOMUtil.getFirstNodeFromPath((DocumentFragment)profile.get(PortalConstants.PROFILE_PROFILE), new String[] {"profile","status-profile"}, false); if (res != null && statusProfile != null) { DocumentFragment userFragment = statusProfile.getOwnerDocument().createDocumentFragment(); - Element oldParent = (Element)statusProfile.getParentNode(); Element saveStatus = (Element)statusProfile.cloneNode(true); userFragment.appendChild(saveStatus); // now filter all not persistent coplets! NodeList list = DOMUtil.getNodeListFromPath(saveStatus, new String[] {"customization","coplet"}); String copletID; - String copletNumber; Element coplet; Element copletConfig; Map copletConfigs = (Map)profile.get(PortalConstants.PROFILE_DEFAULT_COPLETS); @@ -3832,7 +3835,6 @@ for(int i = 0; i < list.getLength(); i++) { coplet = (Element)list.item(i); copletID = coplet.getAttributeNS(null, "id"); - copletNumber = coplet.getAttributeNS(null, "number"); copletConfig = this.getCopletConfiguration(copletID, copletConfigs, mediaCopletConfigs); isPersistent = DOMUtil.getValueAsBooleanOf(copletConfig, "configuration/persistent", false); if (isPersistent == false) { @@ -4088,7 +4090,7 @@ int oldNumber, int columnNumber, Node[] miscNodes) - throws SAXException, javax.xml.transform.TransformerException { + throws javax.xml.transform.TransformerException { // calling method is (hopefully) synced if (columnNumber < oldNumber) { // remove columns and all coplets to the first one 1.4 +14 -15 xml-cocoon2/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java Index: SessionContextImpl.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/context/SessionContextImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SessionContextImpl.java 3 Dec 2002 16:04:44 -0000 1.3 +++ SessionContextImpl.java 30 Jan 2003 05:21:53 -0000 1.4 @@ -52,8 +52,6 @@ import org.apache.avalon.framework.component.ComponentManager; import org.apache.cocoon.ProcessingException; -import org.apache.cocoon.environment.ObjectModelHelper; -import org.apache.cocoon.environment.Request; import org.apache.cocoon.webapps.portal.PortalConstants; import org.apache.cocoon.webapps.portal.components.PortalManager; import org.apache.cocoon.webapps.session.context.SessionContext; @@ -62,10 +60,15 @@ import org.apache.cocoon.xml.dom.DOMUtil; import org.apache.excalibur.source.SourceParameters; import org.apache.excalibur.source.SourceResolver; -import org.w3c.dom.*; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; import org.xml.sax.ext.LexicalHandler; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.w3c.dom.DocumentFragment; +import org.w3c.dom.Attr; import java.io.IOException; import java.util.HashMap; @@ -142,7 +145,6 @@ this.setup(name, null, null); // try to get the resource connector info - Request request = ObjectModelHelper.getRequest(objectModel); Map info = (Map)SessionContextImpl.copletInfo.get(); if (info != null) { SessionContextImpl.copletInfo.set(null); @@ -205,7 +207,7 @@ * Get the configuration DOM */ private void getConfigurationDOM(PortalManager portal) - throws ProcessingException, IOException, SAXException { + throws ProcessingException, IOException { if (this.configurationDOM == null && portal != null) { try { String contextID = null; @@ -413,10 +415,9 @@ */ public synchronized Node getSingleNode(String path) throws ProcessingException { - Node result = null; - + // Node result = null; throw new ProcessingException("getSingleNode() not implemented."); - //return result; + // return result; } /** @@ -424,9 +425,9 @@ */ public synchronized NodeList getNodeList(String path) throws ProcessingException { - NodeList result = null; + // NodeList result = null; throw new ProcessingException("getNodeList() not implemented."); - /*return result;*/ + // return result; } /** @@ -471,11 +472,9 @@ */ public synchronized String getValueOfNode(String path) throws ProcessingException { - String value = null; - + // String value = null; throw new ProcessingException("getValueOfNode() not implemented."); - - /*return value;*/ + // return value; } /** @@ -531,5 +530,5 @@ throws SAXException, ProcessingException, IOException { throw new ProcessingException("The context " + this.name + " does not support saving."); } +} -} \ No newline at end of file 1.4 +0 -4 xml-cocoon2/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/acting/AuthAction.java Index: AuthAction.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/acting/AuthAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AuthAction.java 7 Jan 2003 20:48:33 -0000 1.3 +++ AuthAction.java 30 Jan 2003 05:21:53 -0000 1.4 @@ -55,9 +55,7 @@ import org.apache.avalon.framework.parameters.Parameters; import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.acting.ComposerAction; -import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Redirector; -import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.SourceResolver; import org.apache.cocoon.webapps.authentication.components.AuthenticationManager; @@ -94,8 +92,6 @@ Map map = null; try { - final Request request = ObjectModelHelper.getRequest( objectModel ); - handlerName = par.getParameter("handler", null); applicationName = par.getParameter("application", null); 1.3 +2 -4 xml-cocoon2/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/acting/LoginAction.java Index: LoginAction.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/acting/LoginAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- LoginAction.java 7 Jan 2003 20:48:33 -0000 1.2 +++ LoginAction.java 30 Jan 2003 05:21:53 -0000 1.3 @@ -56,9 +56,7 @@ import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.acting.ComposerAction; -import org.apache.cocoon.environment.ObjectModelHelper; import org.apache.cocoon.environment.Redirector; -import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.SourceResolver; import org.apache.cocoon.webapps.authentication.components.AuthenticationManager; import org.apache.cocoon.webapps.session.SessionConstants; @@ -94,9 +92,9 @@ } final String handlerName = par.getParameter("handler", null); - if ( handlerName == null ) + if ( handlerName == null ) { throw new ProcessingException("LoginAction requires at least the handler parameter."); - final Request request = ObjectModelHelper.getRequest( objectModel ); + } // build authentication parameters SourceParameters authenticationParameters = new SourceParameters(); 1.4 +0 -2 xml-cocoon2/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/ApplicationHandler.java Index: ApplicationHandler.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/ApplicationHandler.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ApplicationHandler.java 7 Jan 2003 20:48:35 -0000 1.3 +++ ApplicationHandler.java 30 Jan 2003 05:21:53 -0000 1.4 @@ -138,8 +138,6 @@ public void configure(SourceResolver resolver, Configuration appconf) throws ProcessingException, SAXException, IOException, ConfigurationException { Configuration child = null; - String uri = null; - String classname = null; // test for loadondemand attribute this.loadOnDemand = appconf.getAttributeAsBoolean("loadondemand", false); 1.5 +2 -1 xml-cocoon2/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation/SessionPostTransformer.java Index: SessionPostTransformer.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation/SessionPostTransformer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SessionPostTransformer.java 7 Jan 2003 20:48:34 -0000 1.4 +++ SessionPostTransformer.java 30 Jan 2003 05:21:54 -0000 1.5 @@ -302,7 +302,8 @@ } else if (name.equals(REMOVEXML_ELEMENT) == true) { String path = (String)stack.pop(); String contextName = (String)stack.pop(); - String text = this.endTextRecording(); //this is ignored + // result is ignored + endTextRecording(); this.getSessionManager().removeContextFragment(contextName, path); // Element: savexml ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org