portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet WebContentPortlet.java SSOIFramePortlet.java
Date Thu, 02 Dec 2004 03:14:56 GMT
taylor      2004/12/01 19:14:56

  Modified:    components/web-content/src/java/org/apache/jetspeed/portlet
                        WebContentPortlet.java SSOIFramePortlet.java
  Log:
  use default rules
  this still needs some refactoring
  
  Revision  Changes    Path
  1.2       +14 -4     jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/WebContentPortlet.java
  
  Index: WebContentPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/WebContentPortlet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebContentPortlet.java	2 Dec 2004 01:06:27 -0000	1.1
  +++ WebContentPortlet.java	2 Dec 2004 03:14:56 -0000	1.2
  @@ -33,13 +33,16 @@
   import org.apache.jetspeed.rewriter.JetspeedRewriterController;
   import org.apache.jetspeed.rewriter.RewriterController;
   import org.apache.jetspeed.rewriter.RewriterException;
  +import org.apache.jetspeed.rewriter.RulesetRewriter;
   import org.apache.jetspeed.rewriter.RulesetRewriterImpl;
   import org.apache.jetspeed.rewriter.WebContentRewriter;
   import org.apache.jetspeed.rewriter.html.SwingParserAdaptor;
  +import org.apache.jetspeed.rewriter.rules.Ruleset;
   import org.apache.jetspeed.rewriter.xml.SaxParserAdaptor;
   
   //standard java stuff
   import java.io.ByteArrayOutputStream;
  +import java.io.FileReader;
   import java.io.InputStreamReader;
   import java.io.OutputStreamWriter;
   import java.io.UnsupportedEncodingException;
  @@ -99,7 +102,7 @@
      boolean isSSOEnabled = false;
      
      /* WebContent rewriter */
  -   WebContentRewriter rewriter = new WebContentRewriter();
  +   RulesetRewriter rewriter = null;
      RewriterController rewriteController = null;
   
       public WebContentPortlet() {
  @@ -264,9 +267,16 @@
       */
      private RewriterController getController(String contextPath) throws Exception
      {        
  -       Class[] rewrtierClasses = new Class[]{WebContentRewriter.class, RulesetRewriterImpl.class};
  +       Class[] rewriterClasses = new Class[]{WebContentRewriter.class, WebContentRewriter.class};
          Class[] adaptorClasses = new Class[]{SwingParserAdaptor.class, SaxParserAdaptor.class};
  -       return new JetspeedRewriterController(contextPath + "conf/rewriter-rules-mapping.xml",
Arrays.asList(rewrtierClasses), Arrays.asList(adaptorClasses));
  +       RewriterController rwc = new JetspeedRewriterController(contextPath + "conf/rewriter-rules-mapping.xml",
Arrays.asList(rewriterClasses), Arrays.asList(adaptorClasses));
  +       
  +       FileReader reader = new FileReader(contextPath + "conf/default-rewriter-rules.xml");
  +       
  +       Ruleset ruleset = rwc.loadRuleset(reader);
  +       reader.close();
  +       rewriter = rwc.createRewriter(ruleset);       
  +       return rwc;
      }
      
      /*
  
  
  
  1.5       +2 -3      jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/SSOIFramePortlet.java
  
  Index: SSOIFramePortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/web-content/src/java/org/apache/jetspeed/portlet/SSOIFramePortlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SSOIFramePortlet.java	1 Dec 2004 01:29:25 -0000	1.4
  +++ SSOIFramePortlet.java	2 Dec 2004 03:14:56 -0000	1.5
  @@ -34,7 +34,6 @@
   import org.apache.jetspeed.sso.SSOException;
   import org.apache.jetspeed.sso.SSOProvider;
   
  -
   /**
    * SSOIFramePortlet
    * 
  @@ -152,7 +151,7 @@
           // get the POST params -- requires HTML post params named
           // ssoUserName 
           String ssoPrincipal = request.getParameter(SSO_FORM_PRINCIPAL);
  -        String ssoCredential = request.getParameter(SSO_FORM_CREDENTIAL);
  +        String ssoCredential = request.getParameter(SSO_FORM_CREDENTIAL);        
           /*
           if (ssoPrincipal == null || ssoCredential == null)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message