Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 88D329CA1 for ; Tue, 3 Apr 2012 05:28:59 +0000 (UTC) Received: (qmail 69425 invoked by uid 500); 3 Apr 2012 05:28:59 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 69379 invoked by uid 500); 3 Apr 2012 05:28:59 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 69366 invoked by uid 99); 3 Apr 2012 05:28:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 05:28:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 05:28:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 537C12388C7C for ; Tue, 3 Apr 2012 05:28:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r811241 [9/15] - in /websites/staging/chemistry/trunk/content: ./ java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/ java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/css/ java/0.7.0/maven/chemistry-ope... Date: Tue, 03 Apr 2012 05:28:23 -0000 To: commits@chemistry.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120403052828.537C12388C7C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,275 @@ + + + + +AbstractRunner xref + + + +
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.tck.runner;
+20  
+21  import java.io.BufferedReader;
+22  import java.io.File;
+23  import java.io.FileInputStream;
+24  import java.io.InputStream;
+25  import java.io.InputStreamReader;
+26  import java.util.ArrayList;
+27  import java.util.HashMap;
+28  import java.util.List;
+29  import java.util.Map;
+30  
+31  import org.apache.chemistry.opencmis.tck.CmisTest;
+32  import org.apache.chemistry.opencmis.tck.CmisTestGroup;
+33  import org.apache.chemistry.opencmis.tck.CmisTestProgressMonitor;
+34  import org.apache.chemistry.opencmis.tck.impl.WrapperCmisTestGroup;
+35  
+36  /**
+37   * Base class for runners.
+38   */
+39  public abstract class AbstractRunner {
+40  
+41      public static final String OVERRIDE_KEY = "org.apache.chemistry";
+42      public static final String DEFAULT_TCK_GROUPS = "/cmis-tck-groups.txt";
+43      public static final String TCK_BUILD_TIMESTAMP = "/META-INF/build-timestamp.txt";
+44      public static final String TCK_BUILD_TIMESTAMP_PARAMETER = "org.apache.chemistry.opencmis.tck.timestamp";
+45  
+46      private Map<String, String> parameters;
+47      private final List<CmisTestGroup> groups = new ArrayList<CmisTestGroup>();
+48      private boolean isCanceled = false;
+49  
+50      // --- parameters ---
+51  
+52      public void setParameters(Map<String, String> orgParameters) {
+53          this.parameters = new HashMap<String, String>();
+54          if (orgParameters != null) {
+55              this.parameters.putAll(orgParameters);
+56          }
+57  
+58          // override with system properties
+59          for (Object key : System.getProperties().keySet()) {
+60              if (!key.toString().startsWith(OVERRIDE_KEY)) {
+61                  continue;
+62              }
+63  
+64              parameters.put(key.toString(), System.getProperties().getProperty(key.toString()));
+65          }
+66  
+67          // set TCK build timestamp
+68          parameters.put(TCK_BUILD_TIMESTAMP_PARAMETER, loadTCKTimestamp());
+69      }
+70  
+71      public void loadParameters(File file) throws Exception {
+72          if (file == null || !file.isFile()) {
+73              throw new IllegalArgumentException("File not found!");
+74          }
+75  
+76          loadParameters(new FileInputStream(file));
+77      }
+78  
+79      public void loadParameters(InputStream stream) throws Exception {
+80          if (stream == null) {
+81              throw new IllegalArgumentException("Stream is null!");
+82          }
+83  
+84          BufferedReader reader = null;
+85          Map<String, String> loadParams = new HashMap<String, String>();
+86  
+87          try {
+88              reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
+89  
+90              String line;
+91              while ((line = reader.readLine()) != null) {
+92                  line = line.trim();
+93                  if (line.startsWith("#") || line.length() == 0) {
+94                      continue;
+95                  }
+96  
+97                  int x = line.indexOf('=');
+98                  if (x < 0) {
+99                      loadParams.put(line.trim(), "");
+100                 } else {
+101                     loadParams.put(line.substring(0, x).trim(), line.substring(x + 1).trim());
+102                 }
+103             }
+104 
+105             setParameters(loadParams);
+106         } finally {
+107             if (reader != null) {
+108                 try {
+109                     reader.close();
+110                 } catch (Exception e) {
+111                 }
+112             }
+113         }
+114     }
+115 
+116     public Map<String, String> getParameters() {
+117         return parameters;
+118     }
+119 
+120     private String loadTCKTimestamp() {
+121         StringBuilder result = new StringBuilder();
+122 
+123         InputStream stream = getClass().getResourceAsStream(TCK_BUILD_TIMESTAMP);
+124         if (stream != null) {
+125             try {
+126                 BufferedReader br = new BufferedReader(new InputStreamReader(stream));
+127 
+128                 String s = null;
+129                 while ((s = br.readLine()) != null) {
+130                     result.append(s);
+131                 }
+132 
+133                 br.close();
+134             } catch (Exception e) {
+135             }
+136         }
+137 
+138         return result.toString();
+139     }
+140 
+141     // --- groups ---
+142 
+143     public void loadDefaultTckGroups() throws Exception {
+144         loadGroups(this.getClass().getResourceAsStream(DEFAULT_TCK_GROUPS));
+145     }
+146 
+147     public void loadGroups(File file) throws Exception {
+148         if (file == null || !file.isFile()) {
+149             throw new IllegalArgumentException("File not found!");
+150         }
+151 
+152         loadGroups(new FileInputStream(file));
+153     }
+154 
+155     public void loadGroups(InputStream stream) throws Exception {
+156         if (stream == null) {
+157             throw new IllegalArgumentException("Stream is null!");
+158         }
+159 
+160         BufferedReader reader = null;
+161 
+162         try {
+163             reader = new BufferedReader(new InputStreamReader(stream, "UTF-8"));
+164 
+165             String line;
+166             while ((line = reader.readLine()) != null) {
+167                 line = line.trim();
+168                 if (line.startsWith("#") || line.length() == 0) {
+169                     continue;
+170                 }
+171 
+172                 addGroup(line);
+173             }
+174         } finally {
+175             if (reader != null) {
+176                 try {
+177                     reader.close();
+178                 } catch (Exception e) {
+179                 }
+180             }
+181         }
+182     }
+183 
+184     public void addGroups(String[] groupClasses) throws Exception {
+185         if (groupClasses == null) {
+186             return;
+187         }
+188 
+189         for (String groupClass : groupClasses) {
+190             addGroup(groupClass);
+191         }
+192     }
+193 
+194     public void addGroup(String groupClass) throws Exception {
+195         if (groupClass == null) {
+196             return;
+197         }
+198 
+199         groupClass = groupClass.trim();
+200         if (groupClass.length() == 0) {
+201             return;
+202         }
+203 
+204         Class<?> clazz = Class.forName(groupClass);
+205         Object o = clazz.newInstance();
+206         CmisTestGroup group = null;
+207 
+208         if (o instanceof CmisTestGroup) {
+209             group = (CmisTestGroup) o;
+210         } else if (o instanceof CmisTest) {
+211             group = new WrapperCmisTestGroup((CmisTest) o);
+212         } else {
+213             throw new Exception("Not a CmisTestGroup or CmisTest class!");
+214         }
+215 
+216         addGroup(group);
+217     }
+218 
+219     public void addGroup(CmisTestGroup group) throws Exception {
+220         if (group != null) {
+221             group.init(parameters);
+222             groups.add(group);
+223         }
+224     }
+225 
+226     public List<CmisTestGroup> getGroups() {
+227         return groups;
+228     }
+229 
+230     // --- run ---
+231 
+232     /**
+233      * Runs all configured groups.
+234      */
+235     public void run(CmisTestProgressMonitor monitor) throws Exception {
+236         isCanceled = false;
+237 
+238         for (CmisTestGroup group : groups) {
+239             synchronized (this) {
+240                 if (isCanceled) {
+241                     break;
+242                 }
+243             }
+244 
+245             if (group == null || !group.isEnabled()) {
+246                 continue;
+247             }
+248 
+249             group.setProgressMonitor(monitor);
+250             group.run();
+251         }
+252     }
+253 
+254     public synchronized boolean isCanceled() {
+255         return isCanceled;
+256     }
+257 
+258     public synchronized void cancel() {
+259         isCanceled = true;
+260     }
+261 }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/CmisTckAntTask.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/CmisTckAntTask.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/CmisTckAntTask.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,166 @@ + + + + +CmisTckAntTask xref + + + +
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.tck.runner;
+20  
+21  import java.io.File;
+22  
+23  import org.apache.chemistry.opencmis.tck.CmisTest;
+24  import org.apache.chemistry.opencmis.tck.CmisTestGroup;
+25  import org.apache.chemistry.opencmis.tck.CmisTestProgressMonitor;
+26  import org.apache.chemistry.opencmis.tck.CmisTestReport;
+27  import org.apache.chemistry.opencmis.tck.report.HtmlReport;
+28  import org.apache.chemistry.opencmis.tck.report.TextReport;
+29  import org.apache.chemistry.opencmis.tck.report.XmlReport;
+30  import org.apache.tools.ant.BuildException;
+31  import org.apache.tools.ant.Task;
+32  
+33  /**
+34   * CMIS TCK Ant Task.
+35   */
+36  public class CmisTckAntTask extends Task {
+37  
+38      private static final String REPORT_TEXT = "text";
+39      private static final String REPORT_XML = "xml";
+40      private static final String REPORT_HTML = "html";
+41  
+42      private static final String DEFAULT_REPORT_NAME = "cmis-tck-report";
+43  
+44      private File parameters;
+45      private File groups;
+46      private File output;
+47      private String format;
+48  
+49      @Override
+50      public void init() {
+51          super.init();
+52          parameters = null;
+53          groups = null;
+54          output = null;
+55          format = REPORT_TEXT;
+56      }
+57  
+58      public void setParameters(File parameters) {
+59          this.parameters = parameters;
+60      }
+61  
+62      public void setGroups(File groups) {
+63          this.groups = groups;
+64      }
+65  
+66      public void setOutput(File output) {
+67          this.output = output;
+68      }
+69  
+70      public void setFormat(String format) {
+71          this.format = format;
+72      }
+73  
+74      @Override
+75      public void execute() {
+76          try {
+77              AntRunner runner = new AntRunner();
+78  
+79              if (parameters == null) {
+80                  runner.setParameters(null);
+81              } else {
+82                  runner.loadParameters(parameters);
+83              }
+84  
+85              if (groups == null) {
+86                  runner.loadDefaultTckGroups();
+87              } else {
+88                  runner.loadGroups(groups);
+89              }
+90  
+91              CmisTestReport report = null;
+92  
+93              if (format == null) {
+94                  report = new TextReport();
+95                  if (output == null) {
+96                      output = new File(DEFAULT_REPORT_NAME + ".txt");
+97                  }
+98              } else {
+99                  format = format.trim().toLowerCase();
+100                 if (REPORT_TEXT.equals(format)) {
+101                     report = new TextReport();
+102                     if (output == null) {
+103                         output = new File(DEFAULT_REPORT_NAME + ".txt");
+104                     }
+105                 } else if (REPORT_XML.equals(format)) {
+106                     report = new XmlReport();
+107                     if (output == null) {
+108                         output = new File(DEFAULT_REPORT_NAME + ".xml");
+109                     }
+110                 } else if (REPORT_HTML.equals(format)) {
+111                     report = new HtmlReport();
+112                     if (output == null) {
+113                         output = new File(DEFAULT_REPORT_NAME + ".html");
+114                     }
+115                 } else {
+116                     throw new Exception("Unknown format!");
+117                 }
+118             }
+119 
+120             runner.run(new AntProgressMonitor());
+121 
+122             log("CMIS TCK Report: " + output.getAbsolutePath());
+123             report.createReport(runner.getParameters(), runner.getGroups(), output);
+124         } catch (Exception e) {
+125             throw new BuildException("OpenCMIS TCK run failed!", e);
+126         }
+127     }
+128 
+129     private static class AntRunner extends AbstractRunner {
+130 
+131     }
+132 
+133     private class AntProgressMonitor implements CmisTestProgressMonitor {
+134         public void startGroup(CmisTestGroup group) {
+135             log(group.getName() + " (" + group.getTests().size() + " tests)");
+136         }
+137 
+138         public void endGroup(CmisTestGroup group) {
+139         }
+140 
+141         public void startTest(CmisTest test) {
+142             log("  " + test.getName());
+143         }
+144 
+145         public void endTest(CmisTest test) {
+146         }
+147 
+148         public void message(String msg) {
+149             log(msg);
+150         }
+151     }
+152 }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/ConsoleRunner.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,95 @@ + + + + +ConsoleRunner xref + + + +
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.tck.runner;
+20  
+21  import java.io.File;
+22  import java.io.PrintWriter;
+23  
+24  import org.apache.chemistry.opencmis.tck.CmisTest;
+25  import org.apache.chemistry.opencmis.tck.CmisTestGroup;
+26  import org.apache.chemistry.opencmis.tck.CmisTestProgressMonitor;
+27  import org.apache.chemistry.opencmis.tck.CmisTestReport;
+28  import org.apache.chemistry.opencmis.tck.report.TextReport;
+29  
+30  /**
+31   * Console Runner.
+32   * 
+33   * This runner can be started for a console and accepts two parameters: OpenCMIS
+34   * Session parameters file name and group list file name.
+35   */
+36  public class ConsoleRunner extends AbstractRunner {
+37  
+38      public ConsoleRunner(String[] args) throws Exception {
+39          if (args.length < 1) {
+40              setParameters(null);
+41          } else {
+42              loadParameters(new File(args[0]));
+43          }
+44  
+45          if (args.length < 2) {
+46              loadDefaultTckGroups();
+47          } else {
+48              loadGroups(new File(args[1]));
+49          }
+50  
+51          run(new ConsoleProgressMonitor());
+52  
+53          CmisTestReport report = new TextReport();
+54          report.createReport(getParameters(), getGroups(), new PrintWriter(System.out));
+55      }
+56  
+57      private static class ConsoleProgressMonitor implements CmisTestProgressMonitor {
+58          public void startGroup(CmisTestGroup group) {
+59              System.out.println(group.getName() + " (" + group.getTests().size() + " tests)");
+60          }
+61  
+62          public void endGroup(CmisTestGroup group) {
+63              System.out.println();
+64          }
+65  
+66          public void startTest(CmisTest test) {
+67              System.out.print(".");
+68          }
+69  
+70          public void endTest(CmisTest test) {
+71          }
+72  
+73          public void message(String msg) {
+74              System.out.println(msg);
+75          }
+76      }
+77  
+78      public static void main(String[] args) throws Exception {
+79          new ConsoleRunner(args);
+80      }
+81  }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/WebRunnerServlet.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/WebRunnerServlet.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/WebRunnerServlet.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,174 @@ + + + + +WebRunnerServlet xref + + + +
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.tck.runner;
+20  
+21  import java.io.IOException;
+22  import java.io.PrintWriter;
+23  import java.util.HashMap;
+24  import java.util.Map;
+25  
+26  import javax.servlet.ServletException;
+27  import javax.servlet.http.HttpServlet;
+28  import javax.servlet.http.HttpServletRequest;
+29  import javax.servlet.http.HttpServletResponse;
+30  
+31  import org.apache.chemistry.opencmis.tck.CmisTest;
+32  import org.apache.chemistry.opencmis.tck.CmisTestGroup;
+33  import org.apache.chemistry.opencmis.tck.CmisTestProgressMonitor;
+34  import org.apache.chemistry.opencmis.tck.report.CoreHtmlReport;
+35  
+36  /**
+37   * Web Runner.
+38   */
+39  public class WebRunnerServlet extends HttpServlet {
+40  
+41      private static final long serialVersionUID = 1L;
+42  
+43      @Override
+44      protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+45          resp.setContentType("text/html; charset=UTF-8");
+46  
+47          PrintWriter pw = resp.getWriter();
+48  
+49          printHeader(pw);
+50  
+51          pw.println("<h1>OpenCMIS TCK</h1>");
+52  
+53          pw.println("<form action=\"" + req.getRequestURI() + "\" method=\"POST\">");
+54          pw.println("<table>");
+55          pw.println("<tr><td>AtomPub URL:</td><td><input type=\"text\" name=\"org.apache.chemistry.opencmis.binding.atompub.url\" size=\"50\"></td></tr>");
+56          pw.println("<tr><td>Username:</td><td><input type=\"text\" name=\"org.apache.chemistry.opencmis.user\" size=\"50\"></td></tr>");
+57          pw.println("<tr><td>Password:</td><td><input type=\"password\" name=\"org.apache.chemistry.opencmis.password\" size=\"50\"></td></tr>");
+58          pw.println("<tr><td>Repository Id:</td><td><input type=\"text\" name=\"org.apache.chemistry.opencmis.session.repository.id\" size=\"50\"></td></tr>");
+59          pw.println("<tr><td></td><td><input type=\"submit\" value=\"Start TCK\"></td></tr>");
+60          pw.println("<input type=\"hidden\" name=\"org.apache.chemistry.opencmis.binding.spi.type\" value=\"atompub\">");
+61          pw.println("</form>");
+62  
+63          printFooter(pw);
+64      }
+65  
+66      @SuppressWarnings("unchecked")
+67      @Override
+68      protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+69          resp.setBufferSize(0);
+70          resp.setContentType("text/html; charset=UTF-8");
+71  
+72          PrintWriter pw = resp.getWriter();
+73  
+74          printHeader(pw);
+75  
+76          Map<String, String> parameters = new HashMap<String, String>();
+77          for (Map.Entry<String, String[]> entry : ((Map<String, String[]>) req.getParameterMap()).entrySet()) {
+78              if ((entry.getValue() == null) || (entry.getValue().length < 1)) {
+79                  continue;
+80              }
+81              parameters.put(entry.getKey(), entry.getValue()[0]);
+82          }
+83  
+84          try {
+85              WebRunner runner = new WebRunner();
+86              runner.setParameters(parameters);
+87              runner.loadDefaultTckGroups();
+88  
+89              pw.println("<div id=\"progress\">");
+90              pw.println("<h1>Running OpenCMIS TCK</h1>");
+91  
+92              runner.run(new WebProgressMonitor(pw));
+93  
+94              pw.println("</div>");
+95  
+96              // let progress div disappear
+97              pw.println("<script language=\"javascript\">");
+98              pw.println("document.getElementById(\"progress\").style.display = \"none\";");
+99              pw.println("</script>");
+100 
+101             (new CoreHtmlReport()).createReport(runner.getParameters(), runner.getGroups(), pw);
+102         } catch (Exception e) {
+103             pw.println("<h2>Exception</h2>");
+104 
+105             pw.println("\n<pre>");
+106             e.printStackTrace(pw);
+107             pw.println("\n</pre>");
+108         }
+109 
+110         printFooter(pw);
+111     }
+112 
+113     protected void printHeader(PrintWriter pw) throws IOException {
+114         pw.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">");
+115         pw.println("<html><head>\n<title>OpenCMIS TCK</title>");
+116         CoreHtmlReport.printStyle(pw);
+117         pw.println("</head><body>");
+118     }
+119 
+120     protected void printFooter(PrintWriter pw) throws IOException {
+121         pw.println("\n</body></html>");
+122         pw.flush();
+123     }
+124 
+125     private static class WebRunner extends AbstractRunner {
+126     }
+127 
+128     private static class WebProgressMonitor implements CmisTestProgressMonitor {
+129         private final PrintWriter pw;
+130 
+131         public WebProgressMonitor(PrintWriter pw) {
+132             this.pw = pw;
+133         }
+134 
+135         public void startGroup(CmisTestGroup group) {
+136             pw.println("<h3>" + group.getName() + " (" + group.getTests().size() + " tests)</h3>");
+137             pw.flush();
+138         }
+139 
+140         public void endGroup(CmisTestGroup group) {
+141             pw.println("<br>");
+142             pw.flush();
+143         }
+144 
+145         public void startTest(CmisTest test) {
+146             pw.print("&nbsp;&nbsp;&nbsp;" + test.getName() + " ... ");
+147             pw.flush();
+148         }
+149 
+150         public void endTest(CmisTest test) {
+151             pw.println("completed<br>");
+152             pw.flush();
+153         }
+154 
+155         public void message(String msg) {
+156             pw.println(msg);
+157             pw.flush();
+158         }
+159     }
+160 }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/package-frame.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/package-frame.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/package-frame.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,48 @@ + + + + + + OpenCMIS Test Compatibility Kit 0.7.0 Reference Package org.apache.chemistry.opencmis.tck.runner + + + + +

+ org.apache.chemistry.opencmis.tck.runner +

+ +

Classes

+ + + + + \ No newline at end of file Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/package-summary.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/package-summary.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/runner/package-summary.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,107 @@ + + + + + + OpenCMIS Test Compatibility Kit 0.7.0 Reference Package org.apache.chemistry.opencmis.tck.runner + + + +
+ +
+
+ +
+ +

Package org.apache.chemistry.opencmis.tck.runner

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
+ AbstractRunner +
+ AntProgressMonitor +
+ AntRunner +
+ CmisTckAntTask +
+ ConsoleProgressMonitor +
+ ConsoleRunner +
+ WebProgressMonitor +
+ WebRunner +
+ WebRunnerServlet +
+ +
+ +
+
+ +
+
+ Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file Added: websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/tests/basics/BasicsTestGroup.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/tests/basics/BasicsTestGroup.html (added) +++ websites/staging/chemistry/trunk/content/java/0.7.0/maven/chemistry-opencmis-test/chemistry-opencmis-test-tck/xref/org/apache/chemistry/opencmis/tck/tests/basics/BasicsTestGroup.html Tue Apr 3 05:28:19 2012 @@ -0,0 +1,56 @@ + + + + +BasicsTestGroup xref + + + +
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.tck.tests.basics;
+20  
+21  import java.util.Map;
+22  
+23  import org.apache.chemistry.opencmis.tck.impl.AbstractSessionTestGroup;
+24  
+25  /**
+26   * This test group contains tests that check the CMIS basics such the repository
+27   * info or types.
+28   */
+29  public class BasicsTestGroup extends AbstractSessionTestGroup {
+30      @Override
+31      public void init(Map<String, String> parameters) throws Exception {
+32          super.init(parameters);
+33  
+34          setName("Basics Test Group");
+35          setDescription("Basic tests.");
+36  
+37          addTest(new SecurityTest());
+38          addTest(new RepositoryInfoTest());
+39          addTest(new RootFolderTest());
+40          addTest(new TypesTest());
+41      }
+42  }
+
+
+ +