Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-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 6CFB4DAEE for ; Tue, 26 Feb 2013 15:24:30 +0000 (UTC) Received: (qmail 16775 invoked by uid 500); 26 Feb 2013 15:24:30 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 16689 invoked by uid 500); 26 Feb 2013 15:24:28 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 16670 invoked by uid 99); 26 Feb 2013 15:24:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2013 15:24:28 +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, 26 Feb 2013 15:24:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 3B95B2388993; Tue, 26 Feb 2013 15:24:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1450211 - in /manifoldcf/trunk/site/src/documentation/content/xdocs: en_US/script.xml ja_JP/script.xml Date: Tue, 26 Feb 2013 15:24:07 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130226152407.3B95B2388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Tue Feb 26 15:24:06 2013 New Revision: 1450211 URL: http://svn.apache.org/r1450211 Log: Add documentation for Query Argument objects. Part of CONNECTORS-652. Modified: manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/script.xml manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/script.xml Modified: manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/script.xml URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/script.xml?rev=1450211&r1=1450210&r2=1450211&view=diff ============================================================================== --- manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/script.xml (original) +++ manifoldcf/trunk/site/src/documentation/content/xdocs/en_US/script.xml Tue Feb 26 15:24:06 2013 @@ -155,6 +155,11 @@ expression: newexpression: --> 'url' expression --> 'connectionname' expression +--> 'configuration' +--> 'configurationnode' expression +--> 'array' +--> 'dictionary' +--> 'queryarg' expression ['=' expression] @@ -355,12 +360,29 @@ print "3".__int__+7; OperationMeaningExample binary ==Equals comparison, yielding a booleanurl1 == url2 binary !=Non-equals comparison, yielding a booleanurl1 != url2 - binary +Append and encode another path element, yielding a URLurl1 + "repositoryconnections" + binary +Append and encode another path or query argument element, yielding a URLurl1 + "repositoryconnections"

In addition, the standard attributes __script__ and __string__ are supported by URL variable types.

+ Query Arguments +

Query Argument variable types exist to take care of the details of URL encoding while assembling the query arguments of a REST URL for ManifoldCF's REST API. A Query Argument variable + type can be created using a 'new' operation of the form new queryarg expression [= expression], where the first expression is the + query argument name, and the second optional expression is the query argument value. For example, the script code 'new queryarg "report" = "simple"' + would create a Query Argument variable type representing the query argument "report=simple". To add query arguments to a URL, simply add them using the '+' operator, + for example "urlvar = urlvar + new queryarg 'report' = 'simple';" .

+

The operations supported for this variable type, and their meanings are listed in the table below:

+ + + + + +
Query Argument operations
OperationMeaningExample
binary ==Equals comparison, yielding a booleanarg1 == arg2
binary !=Non-equals comparison, yielding a booleanarg1 != arg2
+

In addition, the standard attributes __script__ and __string__ are supported + by Query Argument variable types.

+
+
Connection names

Connection name variable types exist to perform the extra URL encoding needed for ManifoldCF's REST API. Connection names must be specially encoded so that they do not contain slash characters ('/'). Connection name variable types take care of this encoding.

Modified: manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/script.xml URL: http://svn.apache.org/viewvc/manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/script.xml?rev=1450211&r1=1450210&r2=1450211&view=diff ============================================================================== --- manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/script.xml (original) +++ manifoldcf/trunk/site/src/documentation/content/xdocs/ja_JP/script.xml Tue Feb 26 15:24:06 2013 @@ -56,22 +56,24 @@ java -cp ... org.apache.manifoldcf.scrip
Running the script interpreter by hand

-

When you build ManifoldCF, the required dependent jars for the scripting language are copied to dist/script-engine/jar. +

When you build ManifoldCF, the required dependent jars for the scripting language are copied to dist/script-engine/lib. You can run the interpreter in interactive mode by typing:

-cd dist -script-engine\script\run-script.bat <args> +cd dist\script-engine +run-script.bat <args>

Or, on Linux:

-cd dist -script-engine/script/run-script.sh <args> +cd dist/script-engine +run-script.sh <args> +

You will need to set the environment variable ENGINE_HOME to point at the dist/script-engine directory beforehand, so that + the scripts can locate the appropriate jars.

Running the script interpreter using Ant

-

You can also start the script interpreter with all the correct required jars using Ant. Simple type the following:

+

You can also start the script interpreter with all the correct required jars using Ant. Simply type the following:

ant run-script-interpreter @@ -153,6 +155,11 @@ expression: newexpression: --> 'url' expression --> 'connectionname' expression +--> 'configuration' +--> 'configurationnode' expression +--> 'array' +--> 'dictionary' +--> 'queryarg' expression ['=' expression]
@@ -295,7 +302,7 @@ print "3".__int__+7;
Dictionaries -

Array variable types are created using the "new" operator, e.g. new dictionary.

+

Dictionary variable types are created using the "new" operator, e.g. new dictionary.

The operations supported for this variable type, and their meanings, are listed in the table below:

@@ -308,14 +315,14 @@ print "3".__int__+7;
Configurations

Configuration variables contain the equivalent of the JSON used to communicate with the ManifoldCF API. They can be created using an initializer - of the form { [expression [, expression ...]] }. For example, the script code '{ < "outputconnector" : "" : : , < "description" : "Solr" : : >, < "class_name" : "org.apache.manifoldcf.agents.output.solr.SolrConnector" : : > > }' + of the form { [expression [, expression ...]] }. For example, the script code '{ << "outputconnector" : "" : : , << "description" : "Solr" : : >>, << "class_name" : "org.apache.manifoldcf.agents.output.solr.SolrConnector" : : >> >> }' would create a configuration variable equivalent to one that might be returned from the ManifoldCF API if it was queried for the output connectors registered by the system.

The operations supported for this variable type, and their meanings are listed in the table below:

Array operations
- +
Configuration operations
OperationMeaningExample
subscript []Find the specified child configuration node variable, yielding the variablemyconfig [0]
binary +Append a configuration child node variable to the listmyconfig + < "something" : "somethingvalue" : : >
binary +Append a configuration child node variable to the listmyconfig + << "something" : "somethingvalue" : : >>

In addition, the standard attributes __script__, __dict__, and __size__ are supported by configuration variable types, as well as the insert and remove statements.

@@ -331,7 +338,7 @@ print "3".__int__+7;

Configuration node variable types can be created using an initializer of the form << expression : expression : [expression = expression [, expression = expression ...]] : [expression [, expression ... ]] '>>'. The first expression represents the type of the node. The second is the node's value. The series of '=' expressions represents attribute names and values. The last series represents - the children of the node. For example, the script code '< "description" : "Solr" : : >' represents a node of type 'description' with a value of 'Solr', with no attributes or children.

+ the children of the node. For example, the script code '<< "description" : "Solr" : : >>' represents a node of type 'description' with a value of 'Solr', with no attributes or children.

The operations supported for this variable type, and their meanings are listed in the table below:

@@ -353,12 +360,29 @@ print "3".__int__+7; - +
Configuration node operations
OperationMeaningExample
binary ==Equals comparison, yielding a booleanurl1 == url2
binary !=Non-equals comparison, yielding a booleanurl1 != url2
binary +Append and encode another path element, yielding a URLurl1 + "repositoryconnections"
binary +Append and encode another path or query argument element, yielding a URLurl1 + "repositoryconnections"

In addition, the standard attributes __script__ and __string__ are supported by URL variable types.

+ Query Arguments +

Query Argument variable types exist to take care of the details of URL encoding while assembling the query arguments of a REST URL for ManifoldCF's REST API. A Query Argument variable + type can be created using a 'new' operation of the form new queryarg expression [= expression], where the first expression is the + query argument name, and the second optional expression is the query argument value. For example, the script code 'new queryarg "report" = "simple"' + would create a Query Argument variable type representing the query argument "report=simple". To add query arguments to a URL, simply add them using the '+' operator, + for example "urlvar = urlvar + new queryarg 'report' = 'simple';" .

+

The operations supported for this variable type, and their meanings are listed in the table below:

+ + + + + +
Query Argument operations
OperationMeaningExample
binary ==Equals comparison, yielding a booleanarg1 == arg2
binary !=Non-equals comparison, yielding a booleanarg1 != arg2
+

In addition, the standard attributes __script__ and __string__ are supported + by Query Argument variable types.

+
+
Connection names

Connection name variable types exist to perform the extra URL encoding needed for ManifoldCF's REST API. Connection names must be specially encoded so that they do not contain slash characters ('/'). Connection name variable types take care of this encoding.