Metadata Manipulation Via Web Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009 08:13 AM
I am working on producing a Java based GUI to Alfresco using web scripts to provide access to the repository. I am struggling to find any documentation or examples of the creation/manipulation of metadata using the Javascript API. If someone could point me in the right direction, it would be greatly appreciated.
Thanks
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009 09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 09:07 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2009 10:09 AM
As far as I'm aware the dictionary service is not exposed to JavaScript. Just extend the JS runtime with the Dictionary Service and run from there. Just read this: http://wiki.alfresco.com/wiki/3.0_JavaScript_API#Native_Java_API_Access and linked pages and follow the procedure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 08:17 AM
I have written a Java class that I believe will expose the DictionaryService object to the Javascript API, but I am unsure as to where I need to put it in the directory structure, and how to tell alfresco to use it. I know that I need to use something along the lines of:
<bean id="JavascriptCompatibleDictionaryService" parent="baseJavaScriptExtension" class="ext.packagename.JavaCompatibleDictionaryService"> <property name="extensionName"> <value>dictionaryservice</value> </property></bean>
But again, I am unsure where to put this. Any pointers would be greatly appreciated, and I'm terribly sorry if I am missing the obvious.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 09:01 AM
You need to put this XML excerpt in a *-context.xml file in (typically) tomcat/shared/classes/alfresco/extension
For instance you'd have : dictionary-service-extension-context.xml in there that would contain:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans> <bean id="JavascriptCompatibleDictionaryService" parent="baseJavaScriptExtension" class="ext.packagename.JavaCompatibleDictionaryService"> <property name="extensionName"> <value>dictionaryservice</value> </property> </bean></beans>
Now you should be able to access the dictionary service's API through the JavaScript object "dictionaryservice".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 10:20 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 11:19 AM
Drop your jar in this directory: tomcat/webapps/alfresco/WEB-INF/lib
(you could try in tomcat/shared/lib but you'd have to check the Tomcat configuration in catalina.properties; and it may not work due to class loading issues.)
Sylvain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2009 12:10 PM
