diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml index 9ce4569ac6..85e5678033 100644 --- a/config/alfresco/bootstrap-context.xml +++ b/config/alfresco/bootstrap-context.xml @@ -173,6 +173,10 @@ /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.scripts.childname} alfresco/bootstrap/example_javascripts.acp + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/webScripts.xml + diff --git a/config/alfresco/bootstrap/webScripts.xml b/config/alfresco/bootstrap/webScripts.xml new file mode 100644 index 0000000000..4d634048f0 --- /dev/null +++ b/config/alfresco/bootstrap/webScripts.xml @@ -0,0 +1,144 @@ + + + + + + + + URL addressable Web Services + space-icon-default + URL addressable Web Services + Web Scripts + + + + + + + + + + + true + What are Web Scripts and how do you develop them? + contentUrl=classpath:alfresco/bootstrap/webscripts/readme.html|mimetype=text/html|size=1344|encoding=UTF-8|locale=en_US_ + + + readme.html + + + + + + + + + + space-icon-default + + org + + + + + + + + + + space-icon-default + + alfresco + + + + + + + + + + space-icon-default + + sample + + + + + + + + + + + true + + contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get.js|mimetype=application/x-javascript|size=121|encoding=UTF-8|locale=en_US_ + categorysearch_get.js + + categorysearch_get.js + + + + + + + + + + + true + + contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get_atom.ftl|mimetype=text/plain|size=778|encoding=UTF-8|locale=en_US_ + categorysearch_get_atom.ftl + + workspace + categorysearch_get_atom.ftl + + + + + + + + + + + true + + contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get_desc.xml|mimetype=text/xml|size=375|encoding=UTF-8|locale=en_US_ + categorysearch_get_desc.xml + + categorysearch_get_desc.xml + + + + + + + + + + + true + + contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get_html.ftl|mimetype=text/plain|size=364|encoding=UTF-8|locale=en_US_ + categorysearch_get_html.ftl + + categorysearch_get_html.ftl + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/alfresco/bootstrap/webscripts/categorysearch_get.js b/config/alfresco/bootstrap/webscripts/categorysearch_get.js new file mode 100644 index 0000000000..3d87a3dfb3 --- /dev/null +++ b/config/alfresco/bootstrap/webscripts/categorysearch_get.js @@ -0,0 +1,2 @@ +var nodes = search.luceneSearch("PATH:\"/cm:generalclassifiable//cm:" + args.c + "//member\""); +model.resultset = nodes; \ No newline at end of file diff --git a/config/alfresco/bootstrap/webscripts/categorysearch_get_atom.ftl b/config/alfresco/bootstrap/webscripts/categorysearch_get_atom.ftl new file mode 100644 index 0000000000..ac349f1f99 --- /dev/null +++ b/config/alfresco/bootstrap/webscripts/categorysearch_get_atom.ftl @@ -0,0 +1,20 @@ + + + Alfresco (${server.edition}) + Category search: ${args.c} + ${xmldate(date)} + ${absurl(url.context)}/images/logo/AlfrescoLogo16.ico +<#list resultset as node> + + ${node.name} + + ${absurl(url.context)}${node.icon16} + urn:uuid:${node.id} + ${xmldate(node.properties.modified)} + ${node.properties.description!""} + + ${node.properties.creator} + + + + \ No newline at end of file diff --git a/config/alfresco/bootstrap/webscripts/categorysearch_get_desc.xml b/config/alfresco/bootstrap/webscripts/categorysearch_get_desc.xml new file mode 100644 index 0000000000..9160469d29 --- /dev/null +++ b/config/alfresco/bootstrap/webscripts/categorysearch_get_desc.xml @@ -0,0 +1,8 @@ + + Category Search + Find all blog entries tagged with specified categories + + + guest + required + \ No newline at end of file diff --git a/config/alfresco/bootstrap/webscripts/categorysearch_get_html.ftl b/config/alfresco/bootstrap/webscripts/categorysearch_get_html.ftl new file mode 100644 index 0000000000..e4f0e858e2 --- /dev/null +++ b/config/alfresco/bootstrap/webscripts/categorysearch_get_html.ftl @@ -0,0 +1,15 @@ + + + Alfresco + Category search: ${args.c} +
+ +<#list resultset as node> + + + +
+ ${node.name} +
+ + \ No newline at end of file diff --git a/config/alfresco/bootstrap/webscripts/readme.html b/config/alfresco/bootstrap/webscripts/readme.html new file mode 100644 index 0000000000..360ce3e90c --- /dev/null +++ b/config/alfresco/bootstrap/webscripts/readme.html @@ -0,0 +1 @@ +

Web Scripts  

Documentation on how to develop a Web Script may be found here.

Web Scripts allow you to bind new Alfresco-based functionality to a HTTP method and custom URL. A library of URLs may be built up to provide a complete API accessible via HTTP.  They are ideal for building data access & update APIs and simple UI components such as Portlets.  Development of Web Scripts may be performed within Alfresco.  Knowledge of Java is not required.

For example, you could create the following API for your particular application...

Execute a search

GET http://<host>:<port>/alfresco/service/blog/category?c=Web20

Retrieve meta-data for an item in the repository

GET http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release

Update meta-data for an item in the repository

POST http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release?status=Draft

Delete an item in the repository

DELETE http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release

\ No newline at end of file diff --git a/config/alfresco/messages/patch-service.properties b/config/alfresco/messages/patch-service.properties index b75b752955..3f92ab65f4 100644 --- a/config/alfresco/messages/patch-service.properties +++ b/config/alfresco/messages/patch-service.properties @@ -135,3 +135,5 @@ patch.userAndPersonUserNamesAsIdentifiers.result=Reindexed user:user and cm:pers patch.contentFormFolderType.description=Update WCM Content Form folder type. patch.contentFormFolderType.result=Updated {0} WCM Content Form objects to 'wcm:formfolder' type. + +patch.webscripts.description=Adds Web Scripts to Data Dictionary. \ No newline at end of file diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml index 6a543354f3..ebb467ad29 100644 --- a/config/alfresco/patch/patch-services-context.xml +++ b/config/alfresco/patch/patch-services-context.xml @@ -654,4 +654,22 @@ + + patch.webscripts + patch.webscripts.description + 0 + 50 + 51 + + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/webScripts.xml + + + + diff --git a/config/alfresco/version.properties b/config/alfresco/version.properties index 72293947f3..c36cb0ad3c 100644 --- a/config/alfresco/version.properties +++ b/config/alfresco/version.properties @@ -19,4 +19,4 @@ version.build=@build-number@ # Schema number -version.schema=50 +version.schema=51