-
Log in to SkyVault Share:
- Open a web browser and enter the URL: http://localhost:8080/share
- If prompted, log in with the user name admin and password admin.
- Navigate to Data Dictionary > Web Scripts Extensions > org > example.
-
Create a web script description document for your Data Dictionary information
sample:
- In the Create menu, select XML.
- Enter the name for the web script in the Name field: info.get.desc.xml
-
Type the following in the content box:
<webscript kind="org.example.nodewebscript"> <shortname>Node Info</shortname> <description>Demonstration of Web script Kind</description> <url>/info</url> <authentication>user</authentication> <path>Company Home/Data Dictionary</path> </webscript>
- Click Create.
- Navigate back to the folder org/example using the breadcrumb trail.
-
Create a web script response template for your Data Dictionary information
sample:
- In the Create menu, select Plain Text.
- Enter the name for the web script in the Name field: info.get.html.ftl
-
Type the following in the content box:
${node.name} created on ${node.properties.created?date}
- Click Create.
- Navigate back to the org/example folder using the breadcrumbs trail.
-
Register the Data Dictionary Information web script with SkyVault Community Edition:
- Type the following in your web browser, and log in with the user name admin and password admin if requested:http://localhost:8080/alfresco/service/index
- Click Refresh Web Scripts. A message displays indicating there is one additional web script.
-
Test the web script:
- Open a web browser tab and enter: http://localhost:8080/alfresco/service/info
- If prompted, log in with the user name admin and password admin.
-
Look for a message similar to the following:
Data Dictionary created on Feb 15, 2013
This means your web script is working.
<webscript kind="org.example.nodewebscript"> . . . <path>Company Home/Data Dictionary</path> . . . </webscript>
As expected by the NodeWebScript, the description document also specifies a path to a node in the repository. In the example, you specify the Data Dictionary folder through the custom <path> element. Your example does not provide a controller script, as the NodeWebScript Java class already encapsulates the behavior of locating a node given a path and populating the web script model. In this case, the located node is placed into the web script model under the name node.
${node.name} created on ${node.properties.created?date}
This means the response template can simply refer to node to render the output.