mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
Merge Web Scripts from BRANCHES/DEV/DAVE
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
da793026fb
commit
2cdf48eaf6
@ -173,6 +173,10 @@
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.scripts.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/example_javascripts.acp</prop>
|
||||
</props>
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/webScripts.xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
144
config/alfresco/bootstrap/webScripts.xml
Normal file
144
config/alfresco/bootstrap/webScripts.xml
Normal file
@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
|
||||
<cm:folder xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:webscripts">
|
||||
<view:aspects>
|
||||
<app:uifacets></app:uifacets>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<cm:description>URL addressable Web Services</cm:description>
|
||||
<app:icon>space-icon-default</app:icon>
|
||||
<cm:title>URL addressable Web Services</cm:title>
|
||||
<cm:name>Web Scripts</cm:name>
|
||||
</view:properties>
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:content view:childName="cm:readme.html">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description>What are Web Scripts and how do you develop them?</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/readme.html|mimetype=text/html|size=1344|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title></cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>readme.html</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:folder view:childName="cm:org">
|
||||
<view:aspects>
|
||||
<app:uifacets></app:uifacets>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<cm:description></cm:description>
|
||||
<app:icon>space-icon-default</app:icon>
|
||||
<cm:title></cm:title>
|
||||
<cm:name>org</cm:name>
|
||||
</view:properties>
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:folder view:childName="cm:alfresco">
|
||||
<view:aspects>
|
||||
<app:uifacets></app:uifacets>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<cm:description></cm:description>
|
||||
<app:icon>space-icon-default</app:icon>
|
||||
<cm:title></cm:title>
|
||||
<cm:name>alfresco</cm:name>
|
||||
</view:properties>
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:folder view:childName="cm:sample">
|
||||
<view:aspects>
|
||||
<app:uifacets></app:uifacets>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<cm:description></cm:description>
|
||||
<app:icon>space-icon-default</app:icon>
|
||||
<cm:title></cm:title>
|
||||
<cm:name>sample</cm:name>
|
||||
</view:properties>
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:content view:childName="cm:categorysearch_get.js">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
<cm:author></cm:author>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description></cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get.js|mimetype=application/x-javascript|size=121|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title>categorysearch_get.js</cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>categorysearch_get.js</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:categorysearch_get_atom.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description></cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get_atom.ftl|mimetype=text/plain|size=778|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title>categorysearch_get_atom.ftl</cm:title>
|
||||
<cm:author></cm:author>
|
||||
<sys:store-protocol>workspace</sys:store-protocol>
|
||||
<cm:name>categorysearch_get_atom.ftl</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:categorysearch_get_desc.xml">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description></cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get_desc.xml|mimetype=text/xml|size=375|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title>categorysearch_get_desc.xml</cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>categorysearch_get_desc.xml</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:categorysearch_get_html.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description></cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/categorysearch_get_html.ftl|mimetype=text/plain|size=364|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title>categorysearch_get_html.ftl</cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>categorysearch_get_html.ftl</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</cm:folder>
|
||||
</view:view>
|
@ -0,0 +1,2 @@
|
||||
var nodes = search.luceneSearch("PATH:\"/cm:generalclassifiable//cm:" + args.c + "//member\"");
|
||||
model.resultset = nodes;
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<generator version="${server.version}">Alfresco (${server.edition})</generator>
|
||||
<title>Category search: ${args.c}</title>
|
||||
<updated>${xmldate(date)}</updated>
|
||||
<icon>${absurl(url.context)}/images/logo/AlfrescoLogo16.ico</icon>
|
||||
<#list resultset as node>
|
||||
<entry>
|
||||
<title>${node.name}</title>
|
||||
<link rel="alternate" href="${absurl(url.context)}${node.url}"/>
|
||||
<icon>${absurl(url.context)}${node.icon16}</icon>
|
||||
<id>urn:uuid:${node.id}</id>
|
||||
<updated>${xmldate(node.properties.modified)}</updated>
|
||||
<summary>${node.properties.description!""}</summary>
|
||||
<author>
|
||||
<name>${node.properties.creator}</name>
|
||||
</author>
|
||||
</entry>
|
||||
</#list>
|
||||
</feed>
|
@ -0,0 +1,8 @@
|
||||
<webscript>
|
||||
<shortname>Category Search</shortname>
|
||||
<description>Find all blog entries tagged with specified categories</description>
|
||||
<url format="html" template="/blog/category?c={category}"/>
|
||||
<url format="atom" template="/blog/category?c={category}&format=atom"/>
|
||||
<authentication>guest</authentication>
|
||||
<transaction>required</transaction>
|
||||
</webscript>
|
@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<body>
|
||||
<img src="${url.context}/images/logo/AlfrescoLogo32.png" alt="Alfresco" />
|
||||
Category search: ${args.c}
|
||||
<br>
|
||||
<table>
|
||||
<#list resultset as node>
|
||||
<tr>
|
||||
<td><img src="${url.context}${node.icon16}"/>
|
||||
<td><a href="${url.context}${node.url}">${node.name}</a>
|
||||
</tr>
|
||||
</#list>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
1
config/alfresco/bootstrap/webscripts/readme.html
Normal file
1
config/alfresco/bootstrap/webscripts/readme.html
Normal file
@ -0,0 +1 @@
|
||||
<h1>Web Scripts </h1><p>Documentation on how to develop a Web Script may be found <a href="http://wiki.alfresco.com/wiki/Web_Scripts">here</a>. </p><p>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 <em><strong>not</strong></em> required.<br /> </p><p>For example, you could create the following API for your particular application... </p> <dl><dt><strong>Execute a search</strong> </dt></dl> <p>GET http://<host>:<port>/alfresco/service/blog/category?c=Web20 </p> <dl><dt><strong>Retrieve meta-data for an item in the repository</strong> </dt></dl> <p>GET http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release </p> <dl><dt><strong>Update meta-data for an item in the repository</strong> </dt></dl> <p>POST http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release?status=Draft </p> <dl><dt><strong>Delete an item in the repository</strong> </dt></dl> <p>DELETE http://<host>:<port>/alfresco/service/blog/2007/03/04/new-release </p>
|
@ -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.
|
@ -654,4 +654,22 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.webscripts" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.webscripts</value></property>
|
||||
<property name="description"><value>patch.webscripts.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>50</value></property>
|
||||
<property name="targetSchema"><value>51</value></property>
|
||||
<!-- bootstrap view -->
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/webScripts.xml</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@ -19,4 +19,4 @@ version.build=@build-number@
|
||||
|
||||
# Schema number
|
||||
|
||||
version.schema=50
|
||||
version.schema=51
|
||||
|
Loading…
x
Reference in New Issue
Block a user