cancel
Showing results for 
Search instead for 
Did you mean: 

java back webscripts

glambert33
Champ in-the-making
Champ in-the-making
Hi,
I'm trying to implement my own java class that will run specific cmis queries.  I'd like to have that java script object available as a javascript object within my webscript. I don't see any documentation on how to get this done. Can some help get me started by pointing me in the right direction.

-G
6 REPLIES 6

glambert33
Champ in-the-making
Champ in-the-making
I also need to add that I'm executing the webscript from with-in the wcmqsWEB-INF/webscripts context.  I apologize if this is the wrong place for this, just really looking for some help.

bremmington
Champ on-the-rise
Champ on-the-rise
Define a class that extends org.springframework.extensions.webscripts.processor.BaseProcessorExtension, define a bean with a parent of "baseScriptExtension", and you're done. That bean will be exposed as a javascript object in your webscripts.

Although no longer used, take a look at the class org.alfresco.wcm.client.service.CollectionService in the WQS API and its commented-out bean definition in wcmqs-api-context.xml for an example.

glambert33
Champ in-the-making
Champ in-the-making
Thanks, That got me on the way. I appreciate it.

glambert33
Champ in-the-making
Champ in-the-making
for clarity, what will be the javascript object? Will javascript object be the value from the bean id or the extensionName name attribute of the property tag?

glambert33
Champ in-the-making
Champ in-the-making
So it appears that the value attribute is what's used in webscript

bremmington
Champ on-the-rise
Champ on-the-rise
Yes, it's the value of the "extensionName" property that is used.