33 Commits

Author SHA1 Message Date
Kevin Roast
4005f36bfb Fix to script methods definitions taking a ScriptableObject parameter
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3562 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-22 09:20:42 +00:00
Kevin Roast
8473e7fc4f . Added ability to execute FreeMarker templates from within Alfresco JavaScript
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3561 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-22 08:24:59 +00:00
David Caruana
c3875d0d36 Workflow:
1) Add access to process definition warnings in workflow service deploy method
2) Fix nasty little bug found by Gav where jBPM beanshell access to Alfresco Node failed as it expected slightly different object types to those expected by Alfresco Javascript access to Node.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3542 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-17 19:04:38 +00:00
David Caruana
dc51984cce 1) Minor mods to Rhinoscript Actions
- rename createAction to create
- add (read-only) name property to action
2) Addition of createPackage to Workflow Service API (no implementation yet)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3510 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-15 12:52:19 +00:00
David Caruana
354834c25f Rhinoscript Engine:
- Allow actions to be invoked via JavaScript

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3499 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-14 18:04:08 +00:00
Kevin Roast
8246e38dcd ScriptableHashMap fixed to support integer indexing as an associative javascript array - AR-712
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-14 15:11:41 +00:00
Kevin Roast
50ab6661c4 . Fix to Alfresco JavaScript to correctly convert back multi-value list properties that have not been modified
. Change to use of Wrapper interface when returning Java values from JavaScript
. Addition of final 1.4 icons from Linton for Dashboard and User Options screens

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3492 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-14 10:56:18 +00:00
David Caruana
40286bdad8 Rhinoscript Engine:
- Remove unused import

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3491 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-14 09:52:54 +00:00
David Caruana
5460feaaee Rhinoscript Engine:
- Remove ability to import any java package - this is not secure.
- Small code update (instanceof instead of class comparison) after Kev review

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3490 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-14 09:51:12 +00:00
David Caruana
cddf5ac2ab First cut of hooking Alfresco JavaScript into jBPM process definition.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3486 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-11 18:01:56 +00:00
Kevin Roast
ffb20843c4 . Added 'script' element config support to externally configured UI action definitions.
. ActionLink component now renders any params found from config definition as URL arguments for an 'href' style action (to support above change)
. Added new root scope object 'logger' to the JavaScript API to aid with debugging of scripts

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3480 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-10 17:08:17 +00:00
Kevin Roast
d24a815b79 . JavaScript API improvements
. Template API improvements
. Fixed a couple more UTF-8 code file warnings when compiling the source

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3473 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-09 12:51:42 +00:00
Kevin Roast
499367c4e9 JavaScript API enhancements - Document and Image transformation services
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3465 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-08-08 12:05:41 +00:00
Kevin Roast
0c35c285bd . JavaScript API enhancements checkpoint:
- checkout() - perform a checkout of a node, returning the working-copy as the result
 - checkin() - perform a checkin of a working-copy node, returning the original as the result
 - cancelCheckout() - cancel the checkout of a work-copy node
. Fix from Roy to VersionableAspect to correctly handle making a node versionable, setting content and checking in/out all within a single transaction

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3434 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-07-28 15:27:28 +00:00
Kevin Roast
8d645825ba . JavaScript API enhancements checkpoint:
- setMimetype(mimetype) - update or set the mimetype of a content property
 - specializeType(type) - specialise the type of a node

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3429 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-07-27 17:23:26 +00:00
Kevin Roast
0003524f68 Added native support for Java->JavaScript Date() object conversion for Alfresco node properties
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3415 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-07-26 14:53:05 +00:00
Kevin Roast
a3603a071c . Fix JavaScript engine to correctly handle JavaScript native Date() objects as Alfresco property values
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3388 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-07-24 15:06:00 +00:00
Derek Hulley
6564a5011e Merged V1.3 to HEAD (3068:3083, 3084:3086)
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3068 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3083 .
   svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3084 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3086 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3342 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-07-18 15:42:28 +00:00
Kevin Roast
1ec0296c22 . Fix to issue in login page redirect code where URL arguments (e.g. for templates and scripts) were removed and not passed through.
- this only affected the template/command servlets that were using parameters and had not already logged in

. Support for 'path' argument on DownloadContentServlet
  for example /alfresco/download/direct?path=/Company%20Home/Kev's%20Home%20Space/myimage.jpg
  - paths are specified in a similar way to webdav path - they are 'cm:name' based URL encoded strings
  - this means we no longer need to have the NodeRef to a document to download it

. Support for 'templatePath' and 'contextPath' URL arguments in TemplateContentServlet
  for example: /alfresco/template?templatePath=/Company%20Home/Data%20Dictionary/Presentation%20Templates/doc_info.ftl&contextPath=/Company%20Home/file.txt
  - the 'templatePath' argument specifies the cm:name based path to the template to execute
  - the 'contextPath' argument specifies the cm:name based path to the context for the template

. Support for 'scriptPath' and 'contextPath' URL arguments in Script CommandProcessor
  for example: /alfresco/command/script/execute?scriptPath=/Company%20Home/Data%20Dictionary/Scripts/append%20copyright.js&contextPath=/Company%20Home/file.txt
  - the 'scriptPath' argument specifies the cm:name based path to the script to execute
  - the 'contextPath' argument specifies the cm:name based path to the context for the script

. Adding debugging output to get timings for executing templates and scripts

. Enhancements and additions to JavaScript API:
  setPermission()
  removePermission()
  get/setInheritsPermissions()

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3297 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-07-11 10:13:30 +00:00
David Caruana
b9c43d59a6 Allow import of any java class/package within rhino java script.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3222 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-06-23 13:56:19 +00:00
Kevin Roast
530eb70aaf fix for AR-654 - saving multi value properties on JavaScript node object
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3078 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-06-12 14:26:18 +00:00
Derek Hulley
ff4d11c719 Merge into HEAD from BRANCHES/V1.3
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@2997 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@2998 .
   svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3003 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3004 .
   svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3009 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3010 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3016 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-06-02 11:52:15 +00:00
Kevin Roast
2f873a1e14 . Improvements to portlet session handling in Login/Logout situations
- Storing of "inPortal" flag in a Threadlocal
 - No longer invalidate portlet session on logout - clear session by hand instead
   - Makes it easier to integrate with other JSR-168 vendors such as Liferay
. Added the current template NodeRef to the default templating model
   - Accessable as an object in the root of the templating model called "template"
. Added the current script NodeRef to the default scripting model
   - Accessable as a root scope object called "script"

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2934 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-22 13:25:58 +00:00
Kevin Roast
c1f6eb64cb URL argument support for the Template and Script servlets
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2905 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-17 10:02:07 +00:00
Kevin Roast
ba9512439a . First pass of the Alfresco JavaScript API wiki docs:
http://wiki.alfresco.com/wiki/JavaScript_API
 - JavaDoc and minor API updates that made sense as I was writing the documentation :)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2788 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-08 14:55:05 +00:00
Kevin Roast
7ae60915a5 . Minor fix to search services in JavaScript API
. Some javadoc improvements

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2785 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-08 09:42:34 +00:00
Kevin Roast
c29f0fd4f1 . Rhino JavaScript integration:
- APIs for testing of Permissions and checking that an Aspect exists on a node

. Added new command processor to config for Command Servlet
   - new command processor to allow execution of Alfresco JavaScript files via URLs
   - Wiki docs: http://wiki.alfresco.com/wiki/URL_Addressability#Script_Command_Processor

. Fixed issue where a deleted/missing NodeRef on the end of a Link object would cause errors in the web-client
   - Still needs cleanup/change to assoc mechanism as per AWC-647

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2774 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-05 12:09:15 +00:00
Kevin Roast
fe5257a3a2 . Rhino JavaScript integration:
- APIs to allow adding of aspects to nodes from within a script

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2759 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-04 14:54:56 +00:00
Kevin Roast
5b81614707 . Rhino JavaScript integration checkpoint:
- APIs to allow creation of Nodes of any valid type (e.g. not just files and folders)
  - APIs for Copy, Move and Delete of nodes.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2754 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-04 10:51:03 +00:00
Kevin Roast
cf4e177ead . Rhino JavaScript integration checkpoint:
- Added APIs to allow updating and addition of node properties
  - Added APIs for content manipulation
  - Added APIs to allow creation of files and folders

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-03 21:34:42 +00:00
Kevin Roast
c9e5bd6c22 . Rhino JavaScript integration checkpoint:
- Added a new action to the repository for executing JavaScript files
  - Added script action UI to rule framework, means we can execute a JavaScript file as part of a rule
  - Lucene search and Saved Search functionality added to default data-model for scripts
  - Added Scripts folder to Data Dictionary (created during bootstrap)
  - Created patch to add the Scripts folder to existing schemas
  - Added ScriptService to ServiceRegistry bean

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2740 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-05-03 12:01:21 +00:00
Kevin Roast
2b251c922b . Checkpoint for the Rhino JavaScript engine integration:
- Additions to the Alfresco JavaScript data-model
. JUnit test for each entry point into Rhino and the ScriptService
  - tests for various API calls on the Scriptable Node object
. More javadoc clean-up in templating and script services

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2726 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-04-28 10:56:48 +00:00
Kevin Roast
71f59c540e Checkpoint for the Rhino Script engine integration
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2719 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-04-27 09:39:08 +00:00