24 Commits

Author SHA1 Message Date
Neil McErlean
bd50b3df70 RatingService Phase 1.
The RatingService will allow users to apply ratings to content nodes in the repository.
  There will be a number of built-in Rating Schemes and support to add more by the usual extension mechanism.
  Out of the box, we envision a 'likes' scheme (user X likes this document) and a 'star' rating
    (user X gave this document 3 out of 5 stars).

  Content model for ratings.
  Spring config includes two out-of-the-box rating schemes
  Various basic infrastructure classes for Ratings, RatingSchemes and the service itself.
  Basic CRUD for ratings in a Java foundation layer.
  Associated JUnit tests.

The next contribution will add support for per-node average and total ratings and associated tests.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21000 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-07-08 13:59:58 +00:00
Neil McErlean
3b6c819013 Rendition Definitions as native actions.
- PerformRenditionActionExecuter class and perform-rendition bean have been deprecated.
   These constituted a containing action which the RenditionService wrapped around every rendition definition.
   Their internals have been pushed down into AbstractRenderingEngine which should allow rendition definitions
   (which are actions) to be used as first-class action beans. What remains should be backwards compatible, but is
   now unnecessary.
 - Temporarily switched off some Mockito-based unit tests which need updating. Will chat to Nick tomorrow.
 - New action param: is-component-rendition : used to identify components renditions within a composite.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20945 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-07-05 15:35:44 +00:00
Neil McErlean
cafa116c74 Javadoc improvements and private variable renaming in the rendition service.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20622 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-06-14 10:41:13 +00:00
Neil McErlean
30084dde24 Merge from V3.3 to HEAD
20069 Fix for unreported issue where the Rendition Service's JavaScript API cannot be used to execute ad hoc rendition definitions.

Rendition Definitions can be created and executed programmatically. This works fine via the Java Foundation API, but is broken in the JavaScript API.
The rendition nodes are not correctly created for ad hoc rendition definitions created in JavaScript.
Note that the built-in rendition definitions work fine in JavaScript.

This fix:
    - ScriptRenditionDefinition now extends ScriptAction in order to reuse its parameter handling and execution code.
    - ScriptRenditionDefinition now mimics ScriptAction so you can call
            renditionDef.execute(testSourceNode); in JavaScript.
    - more test coverage in the test_renditionService.js to reproduce the issue.
    - adds debug logging in various places in the rendition service.
    - changes ScriptAction to be a non-final class so that it can be extended by ScriptRenditionDefinition.
    - fixes some fragile asserts in test code.
    - changes a few fields to protected visibility and provides an extension point so that the rendition service can execute its "actions" as renditions rather than simple actions.
    - trivial. tidied up some unused imports in ScriptNode.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20070 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-05-04 15:31:23 +00:00
Brian Remmington
5c87d5eb87 Fixed a bug that shows itself when placing a new rendition directly under Company Home, and also tweaked the name of the "companyHome" object on the path template model to be "companyhome" to be consistent with the naming in the script API.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20056 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-04-30 12:11:57 +00:00
N Smith
f09e9b85b1 ALF-1568 Expanded the JSON returned by the api/sites/{siteName}/invitations webscript and various other related webscripts. The JSOn now includes an "invitee" object with a structure
{  "avatar" : "avatarThumbnailURI",
   "firstName" : "John",
   "lastName" : "Smith",
   "userName" : "johnsmith"
}

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20040 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-04-29 11:14:15 +00:00
Brian Remmington
aa06314b72 ALF-2620: Fixed problem with the paths being used in rendition path template model. "cwd" is now a file/display path and "companyHome" is a TemplateNode.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20037 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-04-28 15:58:18 +00:00
Neil McErlean
7aba799ed8 SAIL-352 Added i18n keys and values for the Rendition Service's rendering engines (actions) and their parameters.
This included some overrides of getParamDisplayLabel() in the RenditionService classes to support i18n key-value pairs which are common across many rendering engines.

These actions and their parameters have been hidden by Erik in the default Alfresco config. The changes contained in this check-in mean that 3rd parties could show these actions and parameters and see useful labels.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20009 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-04-27 12:41:03 +00:00
Neil McErlean
4d60018f0c ALF-2220 fix. Rendition Definitions should only be persisted on startup if they have not already been persisted.
Also removed an unnecessary TODO.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19914 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-04-20 12:54:54 +00:00
Brian Remmington
4f9f63ac01 A few minor corrections to XSLT rendering engine code discovered while writing the related wiki page
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19685 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-31 08:19:30 +00:00
N Smith
f83eb0d509 Added more unit tests for RenditionNodeManager which is used by the RenditionServiceImpl to decide where to create a rendition node and how to handle the old rendition node if one exists.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19445 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-22 11:05:04 +00:00
Mark Rogers
03d130e99c ALF-2031 - DR and VT can't start
- undeleted and reinstated use of org.alfresco.util.Pair
   - undeleted org.alfresco.util.PropertyCheck which is used in the deployment code.
   - undeleted other org.alfresco.util.* classes which probably should never have been moved to spring surf.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-16 15:05:47 +00:00
Neil McErlean
8e9c4f3aa5 RenditionService JS API.
Support for creating a RenditionDefinition from within JavaScript
Support for executing such an ad hoc rendition definition.
ScriptRendtionService now accepts long-form or short-form QNames where applicable.
Replaced "rendering actions" with "rendition definitions" in some javadoc and some private or local variable names.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19269 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-12 21:28:38 +00:00
N Smith
1bc48d5bb0 Refactored PerformRenditionActionExecutor to pull out RenditionNodeManager class which is responsible for deciding where the new rendition should be placed and putting it there, as well as handling what happens to any existing rendition. This will make this complex logic much easier to test.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19231 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-11 16:30:02 +00:00
N Smith
5a2d92ed5d Added Javadoc to various RenditionService parameter constants.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19230 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-11 16:00:13 +00:00
Neil McErlean
a3a95cef81 Refactored RenditionService JS API to use ScriptNodes instead of ChildAssociations.
Consistent with the existing JavaScript APIs.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19207 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-10 20:16:41 +00:00
Neil McErlean
f26115a739 Added JS API to the RenditionService
new renditionServiceScript bean
    new test method in RenditionServiceIntegrationTest which uses test_renditionservice.js
    ScriptRenditionService is the entry point to the JavaScript API impl
    Can now render a ScriptNode with a Java-saved or built-in RenditionDefinition
    Can get renditions for a source ScriptNode
        get all renditions
        get renditions from rendition definition x, e.g. "cm:doclib"
        get renditions whose mimetype starts with prefix.

Added RenditionService to ServiceRegistry.
    Necessary for the JS API, also desirable for completeness



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19195 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-10 16:06:07 +00:00
N Smith
b2d3946da1 Changed ThumbnailServiceImpl to create renditions of type cm:thumbnail and set the thumbnail name property on them correctly.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19184 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-10 12:59:21 +00:00
Brian Remmington
ec4529a360 Added a missing class from the last check in. Sorry.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19172 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-10 08:39:00 +00:00
Brian Remmington
2c9854b53b Refactored XSLTRenderingEngine and TemplatingRenderingEngine (now called FreemarkerRenderingEngine) to extract common elements.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19168 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-09 21:19:25 +00:00
Brian Remmington
91ba631a3b SAIL-244: Added an XSLT Template Processor (hooked into the template service) along with an XSLT rendering engine that makes use of it.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19153 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-09 14:02:55 +00:00
Neil McErlean
52dc95264c RenditionService. Reintroduced the spring-based configuration of ThumbnailDefinitions.
Major overhaul to the ThumbnailDefinition - RenditionDefinition conversion code.
Removed the imported rendition definitions acp, replacing it with the original rendering_actions_space xml.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19129 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-08 17:18:40 +00:00
Neil McErlean
ef6595c3de Fixed bug in test code that was causing test failure
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19104 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-07 14:26:01 +00:00
Neil McErlean
bce28a5599 Merging DEV_TEMPORARY to HEAD (RenditionService)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19103 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-03-05 20:02:52 +00:00