You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2004/03/17 13:09:52 UTC

cvs commit: cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components PipelineAuthenticator.java

cziegeler    2004/03/17 04:09:52

  Modified:    src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components
                        DefaultSessionManager.java
               src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components
                        PortalManagerImpl.java
               src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation
                        SessionPostTransformer.java
               src/java/org/apache/cocoon/components/source SourceUtil.java
               src/java/org/apache/cocoon/transformation
                        SourceWritingTransformer.java
               src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation
                        ConfigurationGenerator.java
               src/java/org/apache/cocoon/xml/dom DocumentWrapper.java
               src/blocks/webdav/java/org/apache/cocoon/transformation
                        DASLTransformer.java
               src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components
                        PipelineAuthenticator.java
  Log:
  Don't use deprecated methods
  
  Revision  Changes    Path
  1.6       +5 -5      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java
  
  Index: DefaultSessionManager.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/components/DefaultSessionManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultSessionManager.java	5 Mar 2004 13:02:22 -0000	1.5
  +++ DefaultSessionManager.java	17 Mar 2004 12:09:51 -0000	1.6
  @@ -182,7 +182,7 @@
           frag = context.getXML(path);
   
           if (this.getLogger().isDebugEnabled() ) {
  -            this.getLogger().debug("END getContextFragment documentFragment=" + (frag == null ? "null" : XMLUtils.serializeNodeToXML(frag)));
  +            this.getLogger().debug("END getContextFragment documentFragment=" + (frag == null ? "null" : XMLUtils.serializeNode(frag, XMLUtils.createPropertiesForXML(false))));
           }
           return frag;
       }
  @@ -248,7 +248,7 @@
   
           if (this.getLogger().isDebugEnabled()) {
               this.getLogger().debug("BEGIN setContextFragment name=" + contextName + ", path=" + path +
  -               ", fragment=" + (fragment == null ? "null" : XMLUtils.serializeNodeToXML(fragment)));
  +               ", fragment=" + (fragment == null ? "null" : XMLUtils.serializeNode(fragment, XMLUtils.createPropertiesForXML(false))));
           }
           // test arguments
           if (contextName == null) {
  @@ -294,7 +294,7 @@
           if (this.getLogger().isDebugEnabled() ) {
               this.getLogger().debug("BEGIN appendContextFragment name=" + contextName +
                                 ", path=" + path +
  -                              ", fragment=" + (fragment == null ? "null" : XMLUtils.serializeNodeToXML(fragment)));
  +                              ", fragment=" + (fragment == null ? "null" : XMLUtils.serializeNode(fragment, XMLUtils.createPropertiesForXML(false))));
           }
           // test arguments
           if (contextName == null) {
  @@ -339,7 +339,7 @@
           // synchronized via context
           if (this.getLogger().isDebugEnabled() ) {
               this.getLogger().debug("BEGIN mergeContextFragment name=" + contextName + ", path=" + path +
  -                ", fragment=" + (fragment == null ? "null" : XMLUtils.serializeNodeToXML(fragment)));
  +                ", fragment=" + (fragment == null ? "null" : XMLUtils.serializeNode(fragment, XMLUtils.createPropertiesForXML(false))));
           }
   
           // test arguments
  
  
  
  1.5       +3 -3      cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java
  
  Index: PortalManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal-fw/java/org/apache/cocoon/webapps/portal/components/PortalManagerImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PortalManagerImpl.java	5 Mar 2004 13:02:18 -0000	1.4
  +++ PortalManagerImpl.java	17 Mar 2004 12:09:51 -0000	1.5
  @@ -752,7 +752,7 @@
           }
   
           if (this.getLogger().isDebugEnabled() ) {
  -            this.getLogger().debug("END getStatusProfile statusProfile="+(statusProfile == null ? "null" : XMLUtils.serializeNodeToXML(statusProfile)));
  +            this.getLogger().debug("END getStatusProfile statusProfile="+(statusProfile == null ? "null" : XMLUtils.serializeNode(statusProfile, XMLUtils.createPropertiesForXML(false))));
           }
           return statusProfile;
       }
  @@ -4230,7 +4230,7 @@
           }
               
           if (this.getLogger().isDebugEnabled()) {
  -            this.getLogger().debug("END getUsers fragment="+(frag == null ? "null" : XMLUtils.serializeNodeToXML(frag)));
  +            this.getLogger().debug("END getUsers fragment="+(frag == null ? "null" : XMLUtils.serializeNode(frag, XMLUtils.createPropertiesForXML(false))));
           }
           return frag;
       }
  
  
  
  1.6       +10 -3     cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation/SessionPostTransformer.java
  
  Index: SessionPostTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/transformation/SessionPostTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SessionPostTransformer.java	5 Mar 2004 13:02:23 -0000	1.5
  +++ SessionPostTransformer.java	17 Mar 2004 12:09:51 -0000	1.6
  @@ -18,6 +18,9 @@
   import java.io.ByteArrayInputStream;
   import java.io.IOException;
   import java.util.Map;
  +import java.util.Properties;
  +
  +import javax.xml.transform.OutputKeys;
   
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
  @@ -341,7 +344,9 @@
                           }
                           if (validationNode != null && validationNode.getNodeType() == Node.ELEMENT_NODE
                                   && validationNode.getNodeName().equals(FORM_VALIDATESET_ELEMENT)) {
  -                            String validationXML = XMLUtils.serializeNodeToXML(validationNode);
  +                            Properties props = XMLUtils.createPropertiesForXML(false);
  +                            props.put(OutputKeys.ENCODING, "ISO-8859-1");
  +                            String validationXML = XMLUtils.serializeNode(validationNode, props);
                               DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                               conf = builder.build(new ByteArrayInputStream(validationXML.getBytes()));
                               session.setAttribute(this.formName + "validate-set", conf);
  @@ -367,7 +372,9 @@
                       }
                       if (validationNode != null && validationNode.getNodeType() == Node.ELEMENT_NODE
                               && validationNode.getNodeName().equals("root")) {
  -                        String validationXML = XMLUtils.serializeNodeToXML(validationNode);
  +                        Properties props = XMLUtils.createPropertiesForXML(false);
  +                        props.put(OutputKeys.ENCODING, "ISO-8859-1");
  +                        String validationXML = XMLUtils.serializeNode(validationNode, props);
                           DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                           Configuration conf = builder.build(new ByteArrayInputStream(validationXML.getBytes()));
                           Session session = this.getSessionManager().getSession(true);
  
  
  
  1.14      +10 -5     cocoon-2.1/src/java/org/apache/cocoon/components/source/SourceUtil.java
  
  Index: SourceUtil.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/source/SourceUtil.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SourceUtil.java	5 Mar 2004 13:02:50 -0000	1.13
  +++ SourceUtil.java	17 Mar 2004 12:09:51 -0000	1.14
  @@ -20,6 +20,9 @@
   import java.io.OutputStream;
   import java.util.Iterator;
   import java.util.Map;
  +import java.util.Properties;
  +
  +import javax.xml.transform.OutputKeys;
   
   import org.apache.avalon.framework.component.Component;
   import org.apache.avalon.framework.component.ComponentException;
  @@ -539,8 +542,9 @@
   						}
   	                }
                   } else {
  -	                final String content = XMLUtils.serializeNode(frag,
  -	                                           XMLUtils.defaultSerializeToXMLFormat(false));
  +                    Properties props = XMLUtils.createPropertiesForXML(false);
  +                    props.put(OutputKeys.ENCODING, "ISO-8859-1");
  +	                final String content = XMLUtils.serializeNode(frag, props);
   	                OutputStream oStream = ws.getOutputStream();
   	
   	                oStream.write(content.getBytes());
  @@ -580,8 +584,9 @@
                       }
   					content = oStream.toString();
   				} else {
  -                    content = XMLUtils.serializeNode(frag,
  -                                           XMLUtils.defaultSerializeToXMLFormat(false));
  +                    Properties props = XMLUtils.createPropertiesForXML(false);
  +                    props.put(OutputKeys.ENCODING, "ISO-8859-1");
  +                    content = XMLUtils.serializeNode(frag, props);
   				}
   				
                   if (parameters==null) {
  
  
  
  1.11      +2 -2      cocoon-2.1/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java
  
  Index: SourceWritingTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/transformation/SourceWritingTransformer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SourceWritingTransformer.java	5 Mar 2004 13:02:59 -0000	1.10
  +++ SourceWritingTransformer.java	17 Mar 2004 12:09:52 -0000	1.11
  @@ -582,7 +582,7 @@
                                 ", create="+create+
                                 ", overwrite="+overwrite+
                                 ", reinsert="+reinsertPath+
  -                              ", fragment="+(fragment == null ? "null" : XMLUtils.serializeNodeToXML(fragment)));
  +                              ", fragment="+(fragment == null ? "null" : XMLUtils.serializeNode(fragment, XMLUtils.createPropertiesForXML(false))));
           }
           // test parameter
           if (systemID == null) {
  
  
  
  1.8       +2 -2      cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation/ConfigurationGenerator.java
  
  Index: ConfigurationGenerator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/generation/ConfigurationGenerator.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConfigurationGenerator.java	5 Mar 2004 13:01:41 -0000	1.7
  +++ ConfigurationGenerator.java	17 Mar 2004 12:09:52 -0000	1.8
  @@ -463,7 +463,7 @@
           }
   
           if (this.getLogger().isDebugEnabled() == true) {
  -            this.getLogger().debug("END getUsers fragment="+(frag == null ? "null" : XMLUtils.serializeNodeToXML(frag)));
  +            this.getLogger().debug("END getUsers fragment="+(frag == null ? "null" : XMLUtils.serializeNode(frag, XMLUtils.createPropertiesForXML(false))));
           }
           return frag;
       }
  
  
  
  1.5       +2 -2      cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java
  
  Index: DocumentWrapper.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/xml/dom/DocumentWrapper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DocumentWrapper.java	5 Mar 2004 13:03:02 -0000	1.4
  +++ DocumentWrapper.java	17 Mar 2004 12:09:52 -0000	1.5
  @@ -71,7 +71,7 @@
   
       public String toString() {
           try {
  -            return XMLUtils.serializeNodeToXML(this.document);
  +            return XMLUtils.serializeNode(this.document, XMLUtils.createPropertiesForXML(false));
           } catch (ProcessingException e) {
           }
           return "";
  
  
  
  1.6       +6 -1      cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/transformation/DASLTransformer.java
  
  Index: DASLTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/transformation/DASLTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DASLTransformer.java	5 Mar 2004 13:02:26 -0000	1.5
  +++ DASLTransformer.java	17 Mar 2004 12:09:52 -0000	1.6
  @@ -17,6 +17,9 @@
   
   import java.io.IOException;
   import java.util.Enumeration;
  +import java.util.Properties;
  +
  +import javax.xml.transform.OutputKeys;
   
   import org.apache.cocoon.ProcessingException;
   import org.apache.cocoon.xml.XMLUtils;
  @@ -181,7 +184,9 @@
           if (name.equals(QUERY_TAG) && uri.equals(DASL_QUERY_NS)) {
               DocumentFragment frag = this.endRecording();
               try {
  -                query = XMLUtils.serializeNodeToXML(frag);
  +                Properties props = XMLUtils.createPropertiesForXML(false);
  +                props.put(OutputKeys.ENCODING, "ISO-8859-1");
  +                query = XMLUtils.serializeNode(frag, props);
                   // Perform the DASL query
                   this.performSearchMethod(query);
               } catch (ProcessingException e) {
  
  
  
  1.14      +2 -2      cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java
  
  Index: PipelineAuthenticator.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/components/PipelineAuthenticator.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PipelineAuthenticator.java	5 Mar 2004 13:01:40 -0000	1.13
  +++ PipelineAuthenticator.java	17 Mar 2004 12:09:52 -0000	1.14
  @@ -66,7 +66,7 @@
           // calling method is synced
           if (this.getLogger().isDebugEnabled() ) {
               this.getLogger().debug("BEGIN isValidAuthenticationFragment fragment="
  -                                   + XMLUtils.serializeNodeToXML(authenticationFragment));
  +                                   + XMLUtils.serializeNode(authenticationFragment, XMLUtils.createPropertiesForXML(false)));
           }
           boolean isValid = false;