incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From piergior...@apache.org
Subject svn commit: r1233061 - in /incubator/lcf/branches/CONNECTORS-388: ./ connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/ connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/ fram...
Date Wed, 18 Jan 2012 20:53:18 GMT
Author: piergiorgio
Date: Wed Jan 18 20:53:17 2012
New Revision: 1233061

URL: http://svn.apache.org/viewvc?rev=1233061&view=rev
Log:
starting to work on Apache Velocity: added and updated libraries, initial ui-core integration,
CMIS connector integration, updated build files (CONNECTORS-388)

Added:
    incubator/lcf/branches/CONNECTORS-388/lib/antlr-2.7.5.jar   (with props)
    incubator/lcf/branches/CONNECTORS-388/lib/avalon-logkit-2.1.jar   (with props)
    incubator/lcf/branches/CONNECTORS-388/lib/velocity-1.7.jar   (with props)
    incubator/lcf/branches/CONNECTORS-388/lib/werken-xpath-0.9.4.jar   (with props)
Modified:
    incubator/lcf/branches/CONNECTORS-388/build.xml
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html
    incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html
    incubator/lcf/branches/CONNECTORS-388/framework/build.xml
    incubator/lcf/branches/CONNECTORS-388/framework/ui-core/pom.xml
    incubator/lcf/branches/CONNECTORS-388/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
    incubator/lcf/branches/CONNECTORS-388/lib/commons-collections.jar

Modified: incubator/lcf/branches/CONNECTORS-388/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/build.xml?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/build.xml (original)
+++ incubator/lcf/branches/CONNECTORS-388/build.xml Wed Jan 18 20:53:17 2012
@@ -937,7 +937,7 @@
         <mkdir dir="build/example"/>
         <manifest file="build/example/manifest">
             <attribute name="Main-Class" value="org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner"/>
-            <attribute name="Class-Path" value="lib/commons-lang.jar lib/commons-codec.jar
lib/commons-collections.jar lib/commons-el.jar lib/commons-fileupload.jar lib/commons-httpclient-mcf.jar
lib/commons-io.jar lib/commons-logging.jar lib/hsqldb.jar lib/derbyclient.jar lib/derby.jar
lib/derbyLocale_cs.jar lib/derbyLocale_de_DE.jar lib/derbyLocale_es.jar lib/derbyLocale_fr.jar
lib/derbyLocale_hu.jar lib/derbyLocale_it.jar lib/derbyLocale_ja_JP.jar lib/derbyLocale_ko_KR.jar
lib/derbyLocale_pl.jar lib/derbyLocale_pt_BR.jar lib/derbyLocale_ru.jar lib/derbyLocale_zh_CN.jar
lib/derbyLocale_zh_TW.jar lib/derbynet.jar lib/derbyrun.jar lib/derbytools.jar lib/eclipse-ecj.jar
lib/jasper-6.0.24.jar lib/jasper-el-6.0.24.jar lib/jdbcpool-0.99.jar lib/jetty-6.1.26-patched-JETTY-1340.jar
lib/jetty-util-6.1.26-patched-JETTY-1340.jar lib/jsp-api-2.1-glassfish-2.1.v20091210.jar lib/json.jar
lib/mcf-agents.jar lib/mcf-core.jar lib/mcf-jetty-runner.jar lib/mcf-pull-agent.jar lib/mcf-ui-core.
 jar lib/log4j-1.2.jar lib/postgresql.jar lib/mysql-connector-java-5.1.18.jar lib/serializer.jar
lib/servlet-api-2.5-20081211.jar lib/tomcat-juli-6.0.24.jar lib/xalan2.jar lib/xercesImpl-mcf.jar
lib/xml-apis.jar"/>
+            <attribute name="Class-Path" value="lib/commons-lang.jar lib/commons-codec.jar
lib/commons-collections.jar lib/commons-el.jar lib/commons-fileupload.jar lib/commons-httpclient-mcf.jar
lib/commons-io.jar lib/commons-logging.jar lib/hsqldb.jar lib/derbyclient.jar lib/derby.jar
lib/derbyLocale_cs.jar lib/derbyLocale_de_DE.jar lib/derbyLocale_es.jar lib/derbyLocale_fr.jar
lib/derbyLocale_hu.jar lib/derbyLocale_it.jar lib/derbyLocale_ja_JP.jar lib/derbyLocale_ko_KR.jar
lib/derbyLocale_pl.jar lib/derbyLocale_pt_BR.jar lib/derbyLocale_ru.jar lib/derbyLocale_zh_CN.jar
lib/derbyLocale_zh_TW.jar lib/derbynet.jar lib/derbyrun.jar lib/derbytools.jar lib/eclipse-ecj.jar
lib/jasper-6.0.24.jar lib/jasper-el-6.0.24.jar lib/jdbcpool-0.99.jar lib/jetty-6.1.26-patched-JETTY-1340.jar
lib/jetty-util-6.1.26-patched-JETTY-1340.jar lib/jsp-api-2.1-glassfish-2.1.v20091210.jar lib/json.jar
lib/mcf-agents.jar lib/mcf-core.jar lib/mcf-jetty-runner.jar lib/mcf-pull-agent.jar lib/mcf-ui-core.
 jar lib/log4j-1.2.jar lib/postgresql.jar lib/mysql-connector-java-5.1.18.jar lib/serializer.jar
lib/servlet-api-2.5-20081211.jar lib/tomcat-juli-6.0.24.jar lib/xalan2.jar lib/xercesImpl-mcf.jar
lib/xml-apis.jar lib/velocity-1.7.jar lib/antlr-2.7.5.jar lib/avalon-logkit-2.1 lib/jdom-1.0.jar
lib/maven-ant-tasks-2.0.9.jar lib/oro-2.0.8.jar lib/werken-xpath-0.9.4.jar"/>
         </manifest>
         <jar destfile="dist/example/start.jar" manifest="build/example/manifest"/>
     </target>
@@ -945,7 +945,7 @@
     <target name="deliver-framework-doc" depends="doc-framework">
         <mkdir dir="dist/doc/api/framework"/>
         <copy todir="dist/doc/api/framework">
-	  <fileset dir="framework/dist/doc"/>
+    <fileset dir="framework/dist/doc"/>
         </copy>
     </target>
 
@@ -996,7 +996,7 @@
     <target name="general-connector-doc-delivery" depends="general-connector-doc-check"
if="${connector-name}.has-doc">
         <mkdir dir="dist/doc/api/${connector-name}"/>
         <copy todir="dist/doc/api/${connector-name}">
-	  <fileset dir="connectors/${connector-name}/dist/doc"/>
+    <fileset dir="connectors/${connector-name}/dist/doc"/>
         </copy>
     </target>
 
@@ -1433,10 +1433,10 @@
     </target>
 
     <target name="calculate-opensearchserver-condition" depends="build-opensearchserver-connector">
-	    <available file="connectors/opensearchserver/dist/lib" type="dir" property="opensearchserver.exists"/>
-	    <condition property="opensearchserver.include">
-	        <isset property="opensearchserver.exists"/>
-	    </condition>
+      <available file="connectors/opensearchserver/dist/lib" type="dir" property="opensearchserver.exists"/>
+      <condition property="opensearchserver.include">
+          <isset property="opensearchserver.exists"/>
+      </condition>
     </target>
 
     <target name="calculate-opensearchserver-doc-condition" depends="doc-opensearchserver-connector">
@@ -1884,10 +1884,10 @@
     <target name="run-alfresco-tests-mysql" depends="build-tests-framework,build-tests-alfresco-connector,build-tests-nulloutput-connector,calculate-alfresco-tests-condition"
if="alfresco-tests.include">
         <ant dir="tests/alfresco" target="run-mysql"/>
     </target>
-	
+  
     <target name="run-alfresco-UI-tests-derby" depends="build-tests-framework,build-tests-alfresco-connector,build-tests-nulloutput-connector,calculate-alfresco-tests-condition"
if="alfresco-tests.include">
-	      <ant dir="tests/alfresco" target="run-UI-derby"/>
-	  </target>
+        <ant dir="tests/alfresco" target="run-UI-derby"/>
+    </target>
 
     <target name="run-cmis-tests-postgresql" depends="build-tests-framework,build-tests-cmis-connector,build-tests-nulloutput-connector,calculate-cmis-tests-condition"
if="cmis-tests.include">
         <ant dir="tests/cmis" target="run-postgresql"/>

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
Wed Jan 18 20:53:17 2012
@@ -697,7 +697,7 @@ public class CmisRepositoryConnector ext
       String value = params.getParameter(key);
       paramMap.put(key,value);
     }
-    Messages.outputResource(out,locale,resName,paramMap,true);
+    Messages.outputResourceWithVelocity(out,locale,resName,paramMap,true);
   }
   
   /**

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/Messages.java
Wed Jan 18 20:53:17 2012
@@ -121,5 +121,13 @@ public class Messages extends org.apache
       substitutionParameters,mapToUpperCase);
   }
   
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String
resourceKey,
+      Map<String,String> substitutionParameters, boolean mapToUpperCase)
+      throws ManifoldCFException
+    {
+      outputResourceWithVelocity(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
+        substitutionParameters,mapToUpperCase);
+    }
+  
 }
 

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editConfiguration_en_US.html
Wed Jan 18 20:53:17 2012
@@ -16,49 +16,49 @@
 -->
 
 <table class="displaytable">
-	<tr>
-		<td class="separator" colspan="2">
-			<hr />
-		</td>
-	</tr>
-	<tr>
-		<td class="description">
-			<nobr>
-				Binding:
-			</nobr>
-		</td>
-		<td class="value">
-			<select id="binding" name="binding">
-				<option value="atom" selected="selected">
-					AtomPub
-				</option>
-				<option value="ws">
-					Web Services
-				</option>
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td class="description">
-			<nobr>
-				Username:
-			</nobr>
-		</td>
-		<td class="value">
-			<input type="text" id="username" name="username" value="${USERNAME:A}" />
-		</td>
-	</tr>
-	<tr>
-		<td class="description">
-			<nobr>
-				Password:
-			</nobr>
-		</td>
-		<td class="value">
-			<input type="password" id="password" name="password" value="${PASSWORD:A}" />
-		</td>
-	</tr>
-	<tr>
+  <tr>
+    <td class="separator" colspan="2">
+      <hr />
+    </td>
+  </tr>
+  <tr>
+    <td class="description">
+      <nobr>
+        Binding:
+      </nobr>
+    </td>
+    <td class="value">
+      <select id="binding" name="binding">
+        <option value="atom" selected="selected">
+          AtomPub
+        </option>
+        <option value="ws">
+          Web Services
+        </option>
+      </select>
+    </td>
+  </tr>
+  <tr>
+    <td class="description">
+      <nobr>
+        Username:
+      </nobr>
+    </td>
+    <td class="value">
+      <input type="text" id="username" name="username" value="$USERNAME:A" />
+    </td>
+  </tr>
+  <tr>
+    <td class="description">
+      <nobr>
+        Password:
+      </nobr>
+    </td>
+    <td class="value">
+      <input type="password" id="password" name="password" value="$PASSWORD:A" />
+    </td>
+  </tr>
+  <tr>
     <td class="description">
       <nobr>
         Protocol:
@@ -78,7 +78,7 @@
       </nobr>
     </td>
     <td class="value">
-        <input id="server" name="server" type="text" size="32" value="${SERVER:A}"/>
+        <input id="server" name="server" type="text" size="32" value="$SERVER:A"/>
     </td>
   </tr>
   <tr>
@@ -88,7 +88,7 @@
       </nobr>
     </td>
     <td class="value">
-        <input id="port" name="port" type="text" size="5" value="${PORT:A}" />
+        <input id="port" name="port" type="text" size="5" value="$PORT:A" />
     </td>
   </tr>
   <tr>
@@ -98,27 +98,27 @@
       </nobr>
     </td>
     <td class="value">
-        <input id="path" name="path" type="text" size="32" value="${PATH:A}" />
+        <input id="path" name="path" type="text" size="32" value="$PATH:A" />
+    </td>
+  </tr>
+  <tr>
+    <td class="description">
+      <nobr>
+        Repository ID:
+      </nobr>
+    </td>
+    <td class="value">
+      <input type="text" id="repositoryId" name="repositoryId" value="$REPOSITORYID:A"
/>
+      <nobr>
+        (optional)
+      </nobr>
     </td>
   </tr>
-	<tr>
-		<td class="description">
-			<nobr>
-				Repository ID:
-			</nobr>
-		</td>
-		<td class="value">
-			<input type="text" id="repositoryId" name="repositoryId" value="${REPOSITORYID:A}"
/>
-			<nobr>
-				(optional)
-			</nobr>
-		</td>
-	</tr>
 </table>
 
 <script type="text/javascript">
 <!--
-var binding = "${BINDING:BJ}";
+var binding = "$BINDING:BJ";
 var bindingSelect = editconnection.binding;
 if(binding==bindingSelect.options[1].value){
   bindingSelect.options[1].selected = true;
@@ -126,7 +126,7 @@ if(binding==bindingSelect.options[1].val
   bindingSelect.options[0].selected = true;
 }
 
-var protocol = "${PROTOCOL:BJ}";
+var protocol = "$PROTOCOL:BJ";
 var protocolSelect = editconnection.protocol;
 if(protocol==protocolSelect.options[1].value){
   protocolSelect.options[1].selected = true;

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/editSpecification_en_US.html
Wed Jan 18 20:53:17 2012
@@ -16,21 +16,21 @@
 -->
 
 <table class="displaytable">
-	<tr>
-		<td class="separator" colspan="3">
-			<hr />
-		</td>
-	</tr>
-	<tr>
-		<td class="description">
-			<nobr>
-				CMIS Query:
-			</nobr>
-		</td>
-		<td class="value">
-			<nobr>
-				<input type="text" size="120" name="cmisQuery" value="${CMISQUERY:A}" />
-			</nobr>
-		</td>
-	</tr>
+  <tr>
+    <td class="separator" colspan="3">
+      <hr />
+    </td>
+  </tr>
+  <tr>
+    <td class="description">
+      <nobr>
+        CMIS Query:
+      </nobr>
+    </td>
+    <td class="value">
+      <nobr>
+        <input type="text" size="120" name="cmisQuery" value="$CMISQUERY:A" />
+      </nobr>
+    </td>
+  </tr>
 </table>

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenConfiguration_en_US.html
Wed Jan 18 20:53:17 2012
@@ -14,11 +14,11 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<input type="hidden" name="username" value="${USERNAME:A}" />
-<input type="hidden" name="password" value="${PASSWORD:A}" />
-<input type="hidden" name="protocol" value="${PROTOCOL:A}" />
-<input type="hidden" name="server" value="${SERVER:A}" />
-<input type="hidden" name="port" value="${PORT:A}" />
-<input type="hidden" name="path" value="${PATH:A}" />
-<input type="hidden" name="binding" value="${BINDING:A}" />
-<input type="hidden" name="repositoryId" value="${REPOSITORYID:A}" />
\ No newline at end of file
+<input type="hidden" name="username" value="$USERNAME:A" />
+<input type="hidden" name="password" value="$PASSWORD:A" />
+<input type="hidden" name="protocol" value="$PROTOCOL:A" />
+<input type="hidden" name="server" value="$SERVER:A" />
+<input type="hidden" name="port" value="$PORT:A" />
+<input type="hidden" name="path" value="$PATH:A" />
+<input type="hidden" name="binding" value="$BINDING:A" />
+<input type="hidden" name="repositoryId" value="$REPOSITORYID:A" />
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/hiddenSpecification_en_US.html
Wed Jan 18 20:53:17 2012
@@ -14,4 +14,4 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<input type="hidden" name="cmisQuery" value="${CMISQUERY:A}" />
\ No newline at end of file
+<input type="hidden" name="cmisQuery" value="$CMISQUERY:A" />
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewConfiguration_en_US.html
Wed Jan 18 20:53:17 2012
@@ -16,46 +16,46 @@
 -->
 
 <table class="displaytable">
-	<tr>
-		<td class="description" colspan="1">
-			<nobr>
-				Parameters:
-			</nobr>
-		</td>
-		<td class="value" colspan="3">
-			<nobr>
-				username=${USERNAME:B}
-			</nobr>
-			<br />
+  <tr>
+    <td class="description" colspan="1">
+      <nobr>
+        Parameters:
+      </nobr>
+    </td>
+    <td class="value" colspan="3">
+      <nobr>
+        username=$USERNAME:B
+      </nobr>
+      <br />
       <nobr>
         password=********
       </nobr>
-			<br />
-			<nobr>
-				binding=${BINDING:B}
-			</nobr>
-			<br />
-			<nobr>
-        protocol=${PROTOCOL:B}
+      <br />
+      <nobr>
+        binding=$BINDING:B
+      </nobr>
+      <br />
+      <nobr>
+        protocol=$PROTOCOL:B
       </nobr>
       <br />
       <nobr>
-        server=${SERVER:B}
+        server=$SERVER:B
       </nobr>
       <br />
       <nobr>
-        port=${PORT:B}
+        port=$PORT:B
       </nobr>
       <br />
       <nobr>
-        path=${PATH:B}
+        path=$PATH:B
       </nobr>
       <br />
       <nobr>
-        repositoryId=${REPOSITORYID:B}
+        repositoryId=$REPOSITORYID:B
       </nobr>
       <br />
-		</td>
-	</tr>
+    </td>
+  </tr>
 </table>
 

Modified: incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html
(original)
+++ incubator/lcf/branches/CONNECTORS-388/connectors/cmis/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/cmis/viewSpecification_en_US.html
Wed Jan 18 20:53:17 2012
@@ -16,12 +16,12 @@
 -->
 
 <table class="displaytable">
-	<tr>
-		<td class="description">
-			CMIS Query:
-		</td>
-		<td class="value">
-			${CMISQUERY:B}
-		</td>
-	</tr>
+  <tr>
+    <td class="description">
+      CMIS Query:
+    </td>
+    <td class="value">
+      $CMISQUERY:B
+    </td>
+  </tr>
 </table>

Modified: incubator/lcf/branches/CONNECTORS-388/framework/build.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/framework/build.xml?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/framework/build.xml (original)
+++ incubator/lcf/branches/CONNECTORS-388/framework/build.xml Wed Jan 18 20:53:17 2012
@@ -57,6 +57,13 @@
             <include name="xalan*.jar"/>
             <include name="xercesImpl-mcf.jar"/>
             <include name="xml-apis*.jar"/>
+            <include name="velocity*.jar"/>
+            <include name="antlr*.jar"/>
+            <include name="avalon*.jar"/>
+            <include name="jdom*.jar"/>
+            <include name="maven-ant-tasks*.jar"/>
+            <include name="oro*.jar"/>
+            <include name="werken*.jar"/>
         </fileset>
         <fileset dir="../lib">
             <include name="postgresql*.jar"/>
@@ -357,6 +364,13 @@
                 <include name="xalan*.jar"/>
                 <include name="xercesImpl-mcf.jar"/>
                 <include name="xml-apis*.jar"/>
+                <include name="velocity*.jar"/>
+                <include name="antlr*.jar"/>
+                <include name="avalon*.jar"/>
+                <include name="jdom*.jar"/>
+                <include name="maven-ant-tasks*.jar"/>
+                <include name="oro*.jar"/>
+                <include name="werken*.jar"/>
             </fileset>
             <fileset dir="../lib">
                 <include name="postgresql*.jar"/>
@@ -533,6 +547,13 @@
                 <include name="xalan*.jar"/>
                 <include name="xercesImpl-mcf.jar"/>
                 <include name="xml-apis*.jar"/>
+                <include name="velocity*.jar"/>
+                <include name="antlr*.jar"/>
+                <include name="avalon*.jar"/>
+                <include name="jdom*.jar"/>
+                <include name="maven-ant-tasks*.jar"/>
+                <include name="oro*.jar"/>
+                <include name="werken*.jar"/>
             </fileset>
             <fileset dir="../lib">
                 <include name="postgresql*.jar"/>

Modified: incubator/lcf/branches/CONNECTORS-388/framework/ui-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/framework/ui-core/pom.xml?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/framework/ui-core/pom.xml (original)
+++ incubator/lcf/branches/CONNECTORS-388/framework/ui-core/pom.xml Wed Jan 18 20:53:17 2012
@@ -92,5 +92,10 @@
       <artifactId>commons-io</artifactId>
       <version>1.3.2</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.velocity</groupId>
+      <artifactId>velocity</artifactId>
+      <version>1.7</version>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file

Modified: incubator/lcf/branches/CONNECTORS-388/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-388/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
(original)
+++ incubator/lcf/branches/CONNECTORS-388/framework/ui-core/src/main/java/org/apache/manifoldcf/ui/i18n/Messages.java
Wed Jan 18 20:53:17 2012
@@ -18,21 +18,24 @@
 */
 package org.apache.manifoldcf.ui.i18n;
 
-import java.util.Locale;
-import java.util.Map;
-import java.util.Iterator;
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
 import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
 
-import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
-
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
 import org.apache.manifoldcf.ui.util.Encoder;
-
-import org.apache.commons.lang.StringUtils;
+import org.apache.velocity.VelocityContext;
+import org.apache.velocity.app.Velocity;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
 
 public class Messages extends org.apache.manifoldcf.core.i18n.Messages
 {
@@ -122,6 +125,92 @@ public class Messages extends org.apache
   }
   
   /** Write a resource to HTTP output, specifying what to substitute, and more importantly,
how.
+   * ${PARAM_NAME} will be substituted directly with the value.
+   * ${PARAM_NAME:A} will be substituted with HTML attribute-escaped value.
+   * ${PARAM_NAME:B} will be substituted with HTML body-escaped value.
+   * ${PARAM_NAME:AJ} will be substituted with HTML attribute + Javascript escaped value.
+   * ${PARAM_NAME:BJ} will be substituted with HTML body + Javascript escaped value.
+   */
+   public static void outputResourceWithVelocity(IHTTPOutput output, Class classInstance,
String pathName,
+     Locale locale, String resourceKey, Map<String,String> substitutionParameters,
boolean mapToUpperCase)
+     throws ManifoldCFException {
+     
+     
+     
+     try {
+       Properties properties = new Properties();
+       properties.setProperty(VelocityEngine.RESOURCE_LOADER, "classpath");
+       properties.setProperty("classpath."+VelocityEngine.RESOURCE_LOADER+".class", ClasspathResourceLoader.class.getName());
+       //properties.setProperty("class."+VelocityEngine.RESOURCE_LOADER+".path", resourceLoaderPath);
+       //properties.setProperty("file.resource.loader.path", "/opt/templates");
+       Velocity.init(properties);
+       VelocityContext  context = new VelocityContext();
+       if (substitutionParameters != null){
+         Iterator<String> i = substitutionParameters.keySet().iterator();
+         while(i.hasNext()){
+           String key = i.next();
+           String value = substitutionParameters.get(key);
+           if (mapToUpperCase)
+             key = key.toUpperCase();
+           if (value == null)
+             value = "";
+           
+           context.put(key,value);
+           context.put(key+":A",Encoder.attributeEscape(value));
+           context.put(key+":B",Encoder.bodyEscape(value));
+           context.put(key+":AJ",Encoder.attributeJavascriptEscape(value));
+           context.put(key+":BJ",Encoder.bodyJavascriptEscape(value));
+  
+           String resourcePath = localizeResourceName(pathName, resourceKey, locale);
+           
+           String resourceLoaderPath = pathName+"."+resourcePath;
+           
+           StringWriter stringWriter = new StringWriter();
+           try {
+               Velocity.mergeTemplate(resourceLoaderPath, "UTF-8", context, stringWriter);
+           }
+           catch (Exception e) {
+             throw new ManifoldCFException(e.getMessage(),e);
+           }
+  
+           String line = "";
+           BufferedReader reader = new BufferedReader(
+               new StringReader(stringWriter.toString()));
+                   
+           try {
+             while ((line = reader.readLine()) != null) {    
+               if (line.length() > 0) {
+                 output.println(line);
+               }              
+             }
+           } catch(IOException e) {
+             throw new ManifoldCFException(e.getMessage(),e);
+           }
+           
+           //flush and cleanup velocity
+           stringWriter.flush();
+           stringWriter.close();
+           
+           //close the buffered reader
+           reader.close();
+         }
+       }
+     } catch (IOException e) {
+       throw new ManifoldCFException(e.getMessage(),e);
+     }
+   }
+   
+   private static String localizeResourceName(String pathName, String resourceName, Locale
locale)
+   {
+     // Path names temporarily disabled, since they don't work.
+     // MHL
+     int dotIndex = resourceName.lastIndexOf(".");
+     if (dotIndex == -1)
+       return /*pathName + "." + */resourceName + "_" + locale.toString();
+     return /*pathName + "." + */resourceName.substring(0,dotIndex) + "_" + locale.toString()
+ resourceName.substring(dotIndex);
+   }
+  
+  /** Write a resource to HTTP output, specifying what to substitute, and more importantly,
how.
   * ${PARAM_NAME} will be substituted directly with the value.
   * ${PARAM_NAME:A} will be substituted with HTML attribute-escaped value.
   * ${PARAM_NAME:B} will be substituted with HTML body-escaped value.

Added: incubator/lcf/branches/CONNECTORS-388/lib/antlr-2.7.5.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/lib/antlr-2.7.5.jar?rev=1233061&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/branches/CONNECTORS-388/lib/antlr-2.7.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lcf/branches/CONNECTORS-388/lib/avalon-logkit-2.1.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/lib/avalon-logkit-2.1.jar?rev=1233061&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/branches/CONNECTORS-388/lib/avalon-logkit-2.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/lcf/branches/CONNECTORS-388/lib/commons-collections.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/lib/commons-collections.jar?rev=1233061&r1=1233060&r2=1233061&view=diff
==============================================================================
Binary files - no diff available.

Added: incubator/lcf/branches/CONNECTORS-388/lib/velocity-1.7.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/lib/velocity-1.7.jar?rev=1233061&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/branches/CONNECTORS-388/lib/velocity-1.7.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/lcf/branches/CONNECTORS-388/lib/werken-xpath-0.9.4.jar
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-388/lib/werken-xpath-0.9.4.jar?rev=1233061&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/lcf/branches/CONNECTORS-388/lib/werken-xpath-0.9.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message