mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +00:00
48194: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47179: (RECORD ONLY) Rename Spring Surf libs back to 1.2.0-SNAPSHOT (reverting commit 47176) 47182: (RECORD ONLY) Fix misnamed Surf lib 48195: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: (no changes - alreasdy on HEAD and superceded later) 47210: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: - pre-merge of repo parts 36760: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36758: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36735: THOR-1430: QuickShare link breaks after uploading a new version of a shared file 36768: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36766: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36712: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS 36692: Fix ALF-12966 - Comments doesn't work on iOS Safari. Anywhere TinyMCE is present does not work correctly e.g. comments, blogs, wiki, HTML content creation. 48197: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47214: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: - pre-merge of repo parts 36791: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36790: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36776: Merged HEAD to THOR1_SPRINTS 36771: Fixed ALF-14239 "Share rules config misread by rules rule conditions ("When")" 36862: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36860: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36857: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS: 36187: Merged DEV to V3.4-BUG-FIX 36121: ALF-234: There is no field restriction at the New Rule form in Share 'maxlength="1024"' parameter has been added to title and description fields in 'rule-edit.get.html.ftl' 36858: Resolve THOR-1431: Create Rule: Fields Name and Description can contain more than 1024 and can contain wildcards 36939: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36656: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36655: THOR-1427: failures while uploading documents 36927: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36925: Resolve THOR-1433: Updated rule works just after upload (no update needed) 36933: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36932: Resolve THOR-1442: Check in rule prevents working copy editing 36934: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36882: THOR-1424: WebDAV via HTML/browser view: "Up a level" link does not work if at the network level 36936: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36935: Resolve THOR-1445: Preview generation for pdf and office files with size larger than ~1.2Mb fails 36938: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36701: Merged from V4.0-BUG-FIX to THOR1_SPRINTS 36698 Fixed bug where WebPreviewer sometimes isn't aligned with the rest of the document details page 36789: Resolve THOR-1438: Incorrect list of mimetypes in the rules 37003: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 37002: Resolve THOR-1436: Remove Beta Logo / Label 48199: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47274: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 37681: Fix build issue - merge error 47275: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 38401: Fix activities feed mail notifications. 47276: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 38726: Resolve CLOUD-160: "Data too long for column 'report' at row 1" when deploying Cloud1-144 to Test patches run against tenants no longer concatenate the patch report from each tenant 38754: Fix test 48200: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47303: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 39830: Resolve CLOUD-423: Concurrent registration / account activations are not handled gracefully 48203: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47358: Fix merge/test error (PatchTest.testSimplePatchSuccess) 48244: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (RECORD ONLY) 47172: Merged DEV/CLOUD2 to DEV/CONV_V413 36067: Fix merge issue 36068: Fix document actions page when no repository view 36084: Fix date rendering merge issues 36086: Fix client resources merge issue 48245: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47225: Merged DEV/CLOUD2 to DEV/CONV_V413 36117: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 35994: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 34517: Prevent 304 revalidations for unchanged thumbnails in document library, web preview and search 34607: Ensure folders created containing "#" don't send document library into infinite loop. 34615: Performance improvement: prevent unecessary 304 revalidation for user avatar thumbnails in header WebScript 34638: Performance improvement: prevent unnecessary 304 revalidation for avatars in activity feeds 34639: Performance improvement: prevent unnecessary 304 revalidation for avatars on following/follwers pages 34658: Performance improvement: prevent unnecessary 304 revalidation for avatars on site colleagues dashlet 34661: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS 34636: Fix for ALF-13365 SOLR: Recently modified docs dashlet sorts incorrectly - respect short property names on sort requests @cm:created and not require the full @{uri...}created 34662: Refactored revalidation code to remove previously added WebScripts that are now surplus to requirements 34668: Fix build break 34680: Fixed bean config problem (caused by r34662) 34684: Performance improvement: prevent unnecessary 304 revalidation requests for thumbnails in detailed view of My-Documents and Recently Modified Documents dashlets 34701: Further refactoring of 304 revalidation code to ensure backwards compatibility 34723: Fix build break 36003: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 34895: Resolve THOR-1251: Text for Site URL field on Create Site Form Wrong 34897: Resolve THOR-1250: Text on Accept Invite Page Wrong 35036: Changed Upload REST API to no longer immediately request thumbnail for an uploaded document. Performance improvement as requested. (re ALF-1015) 35142: Merged BRANCHES/V4.0 to BRANCHES/DEV/THOR1_SPRINTS: 35013: ALF-13561: Not found error after uploading new version (THOR-1304) 35320: Fix to issue where 'Avatar' alt text was shown rather than user avatar in the Site Members (colleagues) dashlet. 35546: Improve upload.post.js to use the "filename" argument if it is passed to set the name of the file on upload. 36019: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36020: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36021: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36022: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36023: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36024: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36025: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 34819: THOR-1255 - Define a GhostScript powered transformer for generating PNGs from PDF files, then override the regular PDF to Image transformer definitions from content-services-context.xml with ones that call GhostScript instead of the com.sun in-JVM one 36026: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36027: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36028: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36029: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36030: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 34921: THOR-1176: GoSquared analytics script 34922: THOR-1176: Removed accidentally committed file 34923: Merged BRANCHES/V4.0 to BRANCHES/DEV/THOR1_SPRINTS 34914: Merged DEV to V4.0 34889: ALF-12678: Errors in log on startup (ts.alfresco.com 4.0) BasicHttpAuthenticatorFactory.BasicHttpAuthenticator.authenticate(RequiredAuthentication, boolean) handles AuthenticationExceptions from authenticateAsGuest() calls. The result is a 401 Unauthorized response. 34920: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/V4.0 34892: Fix for ALF-12930 34917: Fix for ALF-12930 - pushed down to 3.4.X Also related tweak for ALF-10823 to EditionInterceptor now that the repository returns 401 for guest auth unsupported. 36032: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36033: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36034: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 35071: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS: 31745: ALF-11268 adding logging.properties and suppressing activiti-logging (which is not log4j but plain JUL) 32336: ALF-11607: "DB2/LINUXX8664" now recognized as DB2 database-type in activiti 32944: ALF-12066 issue with the db2 create-script for activiti (note: pre-reqs for cleaner merge of r34747) 36035: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 35072: THOR-1245: initial fix for doclib test case 36036: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36037: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36038: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 35211: THOR-1182 "MOBREG-07: A page exists confirming the users registration and invites them to enter the password they registered with" 35294: THOR-1309 - F405: Account Types aligned to sales and marketing requirements 35311: Merged BRANCHES/DEV/THOR1_MOBREG to BRANCHES/DEV/THOR1_SPRINTS: 34958: Fix for THOR-1185 and change password hashing to use SHA-2 35026: THOR-1185: "MOBREG-16: New sample ACP for users home site is loaded" - hook into documentLibrary node creation to do the sample acp import 35302: THOR-1185: "MOBREG-16: New sample ACP for users home site is loaded" - use SHA for password hashing - ensure that sample content is added only to home sites 35309: THOR-1185 "MOBREG-16: New sample ACP for users home site is loaded" - minor update to sample content acp 35310: THOR-1185: "MOBREG-16: New sample ACP for users home site is loaded" - removed un-needed properties from repository.properties 35326: Merged BRANCHES/DEV/THOR1_MOBREG to BRANCHES/DEV/THOR1_SPRINTS: 35324: Fix build 35327: Fix build 35337: THOR-1309 - F405: Account Types aligned to sales and marketing requirements 35533: THOR-1309: F405: Account Types aligned to sales and marketing requirements: 35672: THOR-1313 - F410: List accounts filtered by account type 35673: Minor: Update account type ids (as used by tests) to be consistent with the latest config (as per THOR-1309) 35695: THOR-1313 - F410: List accounts filtered by account type 35704: Fix Get Account Types REST API (to also include network admin quota) - related to THOR-1309 / THOR-335 35770: Minor: add additional logging only (THOR-1323) 48247: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (RECORD ONLY) 47263: Merged DEV/CLOUD2 to DEV/CONV_V413 36119: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 35989: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 34153: Minor: THOR-5: MT-aware immutable singletons (spp/vti) 34161: Prevent session timeout redirect problem resulting from clicking user link in activities feed 34183: Part one of THOR-1129. 34185: Part two of THOR-1129. The Thor-specific parts. 34199: Fix for THOR-106 a failing test case that was switched off. 34202: THOR-106 addendum. Editing build.xml to put the test class back in to the build. 34211: BM: sync ThorTest (additional coverage) 34308: Merged HEAD to THOR1_SPRINTS 34250: Fixed THOR-1137 "Make Spring Surf enable-auto-deploy-modules by default" 34540: Share UI - copyright should be 2012 (related to THOR-1015) 35286: Resolve THOR-1242: Update Beta Logo 36617: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36564: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 35780: THOR-1312 - F409: List accounts optionally sorted by (numeric) account type id (ascending or descending) 35807: THOR-1335 - support bulk email address domain validation 35903: THOR-1312 / THOR-1313 -List accounts optionally filtered or sorted 35904: THOR-1310 / THOR-1311 - List accounts optionally sorted by total user account or total file size (or account type, as previously) 35945: Merged BRANCHES/DEV/mward/thor_transforms to BRANCHES/DEV/THOR1_SPRINTS: 35819: Added transformation server changes. 35820: Fixed compilation error, though a size of -1 for getActiveTransformers(...) is not likely to be valid. 35823: Transformations: changed default transformation server URL to be blank. 35897: Remote transformations server: fixed webscript bean id so that it responds to requests correctly. 35898: Remote transformations server: fixed JSON generation/parsing. 35910: Remote transforms server: fixed broken RemoteAlfrescoTransformerTest 35920: Remote transformation server: fixed broken test. 35937: Remote transformation server: integrated HTTPS support via HttpClientFactory. 35939: Remote transformations: added a boolean client-enabling property. 35941: Remote transformations: changed ProxyContentTransformer to delegate isExplicit() calls to worker. 36011: Merged BRANCHES/DEV/THOR1_QUICK_SHARE to BRANCHES/DEV/THOR1_SPRINTS: 34685: Creating Quick Share branch 34826: First cut of THOR-1270 "F387: As the link receiver, I can view the Document Preview in the browser without having to login" 34868: More on THOR-1270 "F387: As the link receiver, I can view the Document Preview in the browser without having to login" 34901: QuickShare REST API - WIP ... note: API will change :-) 34933: QuickShare REST API - WIP 34934: QuickShare REST API - WIP 34941: QuickShare REST API - WIP ... note: API will change :-) 34989: QuickShare REST API - WIP 34995: QuickShare REST API - WIP 34996: QuickShare REST API - WIP 35011: QuickShare/PublicView REST API 35025: F387: As the link receiver, I can view the Document Preview in the browser without having to login 35035: QuickShare/PublicView REST API 35052: QuickShare/PublicView REST API 35069: More on THOR-1270 "F387 As the link receiver, I can view the Document Preview in the browser without having to login" 35094: Removed cpnfig property that was commited by mistake 35111: First cut of THOR-1268 "F378: As a user I can choose to share a document" 35252: THOR-1271 "F388: From the view page, I can easily sign up or login for Alfresco. Sign Up is embedded in the page and Login will redirect you to the Alfresco Login page" partial commit 35254: First cut of THOR-1268 "F378: As a user I can choose to share a document" part 2 35255: THOR-1270 "F387: As the link receiver, I can view the Document Preview in the browser without having to login" 35264: QuickShare/PublicView REST API 35317: THOR-1322: New metadata doesn't return "webpreview" in thumbnails (part 1) 35319: QuickShare REST API - fix tenant ref when share'ing 35330: QuickShare REST API - fix THOR-1322: New metadata doesn't return "webpreview" in thumbnails (part 2) 35368: QuickShare REST API - THOR-1336: (F418) Get context (nodeRef, siteId, tenantDomain) for a shared_id 35376: QuickShare REST API - fix THOR-1273 (unshare document) 35424: THOR-1271 "F388: From the view page, I can easily sign up or login for Alfresco. Sign Up is embedded in the page and Login will redirect you to the Alfresco Login page" partial commit 35425: THOR-1271 "F388: From the view page, I can easily sign up or login for Alfresco. Sign Up is embedded in the page and Login will redirect you to the Alfresco Login page" partial commit 35566: Fixed THOR-1268 "F378: As a user I can choose to share a document" 35617: THOR-1350: Update Slingshot API (doclib2) - make the "qshare:sharedBy" return full details (instead of just userName) 35624: THOR-1339: QuickShare REST API 35682: Fixed THOR-1268, THOR-1339 & THOR-1269 35935: QuickShare REST API - add "system.quickshare.enabled" prop (if set to false then disables QuickShare service/API) 35996: Fixed THOR-1369 & THOR-1270 35997: Fixed THOR-1369 & THOR-1270 part 2 36000: Fixed THOR-1369 & THOR-1270 part 3 36082: THOR-1270 "F387: As the link receiver, I can view the Document Preview in the browser without having to login" - Re-added "Document Details" link public share page 36128: Merged THOR1_SITE_INVITE_THOR-809 to THOR1_SPRINTS THOR-809 "Site Invites Usability - Finish as per original design" - First cut of: #4. Need to be able to cut and paste a long list of emails into the box and have them turned into emails. List can be space, new line or comma separated. THOR-809 "Site Invites Usability - Finish as per original design" - Second cut of #4. Need to be able to cut and paste a long list of emails into the box and have them turned into emails. List can be space, new line or comma separated. * Tooltip is now a common one for all emails rather than individual since that caused issues when being scrolled inside div element. This approach is also less intrusive THOR-809 "Site Invites Usability - Finish as per original design" - Third cut of #4. Need to be able to cut and paste a long list of emails into the box and have them turned into emails. List can be space, new line or comma separated. * Scroll bar is only visible when needed * Now works in IE7 36153: THOR-694: File size upload limit is not adhered to by Alfresco repository 36186: Merged BRANCHES/V4.0 to BRANCHES/DEV/THOR1_SPRINTS: 32842: ALF-11947: Contributor/consumer can't like/unlike or comment document/folder if versionable aspect applied 32850: ALF-11947: Contributor/consumer can't like/unlike or comment document/folder if versionable aspect applied (THOR-1208, THOR-1210) 36188: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS: 34193: ALF-12205 - Contributor can't comment document/folder if versinable aspect is applied (THOR-1209, THOR-1302, THOR-1387) 36237: THOR-28: Account Service - Get Account Method API 36252: THOR-28: Account Service - Get Account Method API 36624: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36565: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36289: THOR-1314: Changed e-mail action in upgrade button to link 36290: MT fix for SiteService 36291: THOR-538 / THOR-1168 - auto remove external user from a secondary network when they no longer belong to any sites ... 36292: THOR-900: Modified URL rewrite filters to enforce encoding of "@" symbols sin URL so that the invalid session timeout error doesn't occur 36631: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36570: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36308: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS: 36109: ALF-7874 MimeType definitions for Adobe AfterEffects files 36110: ALF-7874 Upgrade Tika for improved detection of Adobe Premier and AfterEffects 36112: ALF-7874 MimeType definition addition for Adobe Premier files 36313: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS: 33730: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.0-BUG-FIX: 33726: ALF-7264 Upgrade Commons Validator to 1.4.0 Final, fixing VALIDATOR-292. Then, update the EmailValidator flags to allow local addresses during validation, so that Alfresco can send emails to @localhost addresses without error 33779: Upgrade Tika for ALF-12714 33782: ALF-12714 Add 3GPP/3GPP2 video, and MP4 Audio mimetypes 33783: Update Tika for more MP4/QuickTime support, and enable MP4 audio metadata extraction + "quick" testing 34884: Merged HEAD to BRANCHES/DEV/V4.0-BUG-FIX: 34883: Tika and POI upgrade for ALF-13106 36340: AttributeService improvement: update puc value + cache (based on keys rather than id) 36341: Tenant usage quotas improvement 36412: THOR-1403: added connection timeout property to HttpClientFactory. 36413: THOR-1403: added 3s connection timeout to transformer client configuration. 36425: Tenant usage quotas improvement 36428: Merged THOR1_SITE_INVITE_THOR-809 to THOR1_SPRINTS THOR-809 "Site Invites Usability - Finish as per original design" - Added semicolon as email separator - Fixed seecltion bug for SF, text now selected on first click and deselected on 2nd click (tested IE, SF & Chrome) 36431: Resolve THOR-1406: Emails with apostrophes aren't accepted 36455: Resolve THOR-1146: qamy.alfresco.com: incorrect URL for the RSS items 36456: Resolve THOR-1061 Incorrect text for the 'Task History' link 36457: Resolve THOR-1345: Missing apostrophe on mobile / cloud sign-up web page 36459: Merged BRANCHES/DEV/mward/thor_transforms to BRANCHES/DEV/THOR1_SPRINTS: 36458: THOR-1411: New Alfresco remote transformation subsystem is DEBUG logging by default 36460: Resolve THOR-1294: Terms and Conditions Link in Sign up screen does not work 36464: Resolve THOR-1238: Missing message string: error.header.wrong-reset-user 36472: Merged DEV/THOR1_QUICK_SHARE to DEV/THOR1_SPRINTS Improvements for THOR-1270 "F387: As the link receiver, I can view the Document Preview in the browser without having to login" - Added new component evaluator for bringing in different components based on page id - The title of the quickshare page now contains the document's name (to improve the social "Share with:" experience) - Added new icon for page not found screen 36477: AttributeService improvement: fix test/build (PropertyValueDAOTest.testPropertyUniqueContextValue) 36482: Resolve THOR-1416: Remove Polymorph Client 36484: Merged BRANCHES/DEV/V4.0-BUG-FIX to BRANCHES/DEV/THOR1_SPRINTS: 36259: ALF-13933 Alfresco needs to be able to support LibreOffice for transformations << Developed on Windows 7. Might need more work on Linux to get LibreOffice to shut down, but should be okay with OpenOffice 3.2 which was used in the previous release. >> - Updated jodconverter to latest version jodconverter-core-3.0-SNAPSHOT-patched.jar 28/4/2012 which is newer than 3.0 beta-4 - Applied patch for http://code.google.com/p/jodconverter/issues/detail?id=103 to handle setting the env for LibreOffice 3.5 - Modified code to use partial GNU style options (not used for -env!) when using LibreOffice - Added OpenOfficeCommandLine to dynamically supply OpenOffice or LibreOffice command line args for OOoDirect - Tested to work with OpenOffice 3.4 and 3.2 on Windows 7 36264: ALF-13933 Alfresco needs to be able to support LibreOffice for transformations - remove old jodconverter-core-3.0-beta-3.diff 36273: ALF-13933 Alfresco needs to be able to support LibreOffice for transformations - Return a dummy OpenOffice command even when there is no OpenOffice/LibreOffice installed or on the path. 36485: Resolve THOR-1418: Switch off S3 encryption by default 36508: THOR-1200 (CORE CHANGE): Modification to forms-runtime to prevent field undefined errors 36509: THOR-1200 (MODULE CHANGE): Re-introduce folder rules 36517: THOR-1353: Ensure IE8 users can create tasks 36521: Resolve THOR-1348: Account Settings screen should display Account Type 36530: Fix solrcore.properties 36540: THOR-1200: Force folder rules to run asynchronously 36634: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36633: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36601: Merge from THOR1_QUICK_SHARE to THOR1_SPRINTS 36599: Improvements for THOR-1270 "F387: As the link receiver, I can view the Document Preview in the browser without having to login" - Made the "Preparing previewer... text get rendered using javascript so Google+ won't include it in its description when sharing quickshare links 36673: Fix issue where thumbnail failed to render when lastModified list provided but not for thumbnail type requested 36760: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 36758: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 36735: THOR-1430: QuickShare link breaks after uploading a new version of a shared file 48248: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47266: Merged DEV/CLOUD2 to DEV/CONV_V413 37343: Fixed renamed directive issue in resources.get.html.ftl and updated spring-surf-api lib to ensure checksum appended MessagesWebScript URLs are matched 37402: THOR-1479: Alfresco.DocumentList.generateThumbnailUrl Ignores renditionName Parameter - Changed call to Alfresco.util.generateThumbnailUrl to use renditionName parameter instead of hard-coded "doclib" - Added check for null renditionName parameter, if true use default of "doclib" 37413: Fix issue from "V4.0-BUG-FIX to CLOUD1 merge" r37178 part 4 - Missing </script> tag in colleagues dashlet 37414: Added login box shadow for IE8 37415: Minor Share fixes from Sprint - THOR-383 "When multiple invitations are sent to a single user, the pending invitations UI is not laid out right." - THOR-431 ""Site Dashboard" not highlighted in banner when that page is displayed" 37454: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 37453: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 37451: Resolve THOR-1477: Video not previewing correctly 48249: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (RECORD ONLY) 47273: Merged DEV/CLOUD2 to DEV/CONV_V413 37652: THOR-1489: Alfresco.util.generateThumbnailUrl Ignores thumbnailName During Last Modified Check - Changed hard-coded "doclib" to thumbnailName 48250: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (RECORD ONLY) 47280: Merged DEV/CLOUD2 to DEV/CONV_V413 39206: Fixed CLOUD-198 "WASA - XSS issue with quickshare" 48254: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (RECORD ONLY) 47282: Merged DEV/CLOUD2 to DEV/CONV_V413 37516: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/CLOUD1: 37509: Merged BRANCHES/DEV/THOR1_SPRINTS to BRANCHES/DEV/THOR1: 37167: Merged HEAD to BRANCHES/DEV/THOR1_SPRINTS: 37157: THOR-1459: WebDAV: site names cannot start with 'webdav' 37302: THOR-1403: ensure indexing happens asynchronously on upload. 37303: THOR-1403: removed thumbnail creation during file upload. 37459: THOR-1429: Webdav returns 500 when you don't have access to moderated site 37469: THOR-1475: Fixed avatar thumbnails for users joining/leaving/role change on sites. 37506: Resolve THOR-1481: Cannot preview PDFs over 3.5MB in size 48256: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47283: Merged DEV/CLOUD2 to DEV/CONV_V413 39236: Fixed and baked in Share Hazelcast Cloud specific configuration into thor-share module. Now only need to override hz:hazelcast bean with AWS key specifics for test/production. 39358: Resolve CLOUD-186 500 error displayed when trying to add 'Content I'm editing' dashlet 39388: Resolve CLOUD-185: My / Site Activities displayed incorrectly 48259: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47302: Merged DEV/CLOUD2 to DEV/CONV_V413 39877: CLOUD-438: Merged V3.4-BUG-FIX to CLOUD1 36446: Fix for ALF-13404 - Performance: 'Content I'm Editing' dashlet is slow to render when there is lots of data/sites - Effectively removed all PATH based queries using the pattern /companyhome/sites/*/container//* as they are a non-optimized case - Replaced the "all sites" doclist query using the above pattern with /companyhome/sites//* plus post query resultset processing based on documentLibrary container matching regex - Optimized favorite document query to remove need for a PATH - Optimized Content I'm Editing discussion PATH query to use /*/* instead of /*//* - Fixed issue where Content I'm Editing discussion results would not always show the root topics that a user has edited - Added some addition doclist.get.js query scriptlogger debugging output 36449: ALF-13404 - Fix for issue where favoriates for all sites would be shown in each site document library in the My Favorites filter. 37190: Merged PATCHES/V3.4.6 to V3.4-BUG-FIX 37189: ALF-13404: Performance: 'Content I'm Editing' dashlet is slow to render when there is lots of data/sites - Additional query improvement by Pavel 37835: Fix for ALF-14429 - Recently Modified dashlet takes up to 30 seconds to load after upgrade to Alfresco 3.4.6.23 Merged PATCHES/V3.4.6 to CLOUD1 39491: ALF-13404: Another attempt. Still not performing. Giving up on the cm:* idea altogether. Merged V3.4-BUG-FIX to CLOUD1 39672: Merged PATCHES/V3.4.6 to BRANCHES/DEV/V3.4-BUG-FIX 39534: ALF-13404: Now we understand it! Content I'm Editing dashlet is non-site specific so should use cm:* in its queries. However, site filters and dashlets should NOT. Merged V4.0-BUG-FIX to CLOUD1 36635: ALF-13404 for documentlibrary-v2 APIs 37121: ALF-12796: Ensure that only visible nodes are shown via Category search in Repository view when libraryRoot is changed from company home. Merged PATCHES/V3.4.6 to CLOUD1 37189: ALF-13404: Performance: 'Content I'm Editing' dashlet is slow to render when there is lots of data/sites - Additional query improvement by Pavel Merged V4.0-BUG-FIX to CLOUD1 37443: Hand merge of second round of PATH query improvements for ALF-13404 to doclib2 API scripts Merged V4.1-BUG-FIX to CLOUD1 38209: Tweaks to code merged over recently from 3.4 relating to doclib filters query simplification. 38298: Fix for ALF-13737 - Error when 'favoriting' Company Home 39678: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.1-BUG-FIX 39672: Merged PATCHES/V3.4.6 to BRANCHES/DEV/V3.4-BUG-FIX 39534: ALF-13404: Now we understand it! Content I'm Editing dashlet is non-site specific so should use cm:* in its queries. However, site filters and dashlets should NOT. Hand merged above changes to documentlibrary-v2 filter scripts. 48260: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47305: Merged DEV/CLOUD2 to DEV/CONV_V413 40104: Fix for CLOUD-476 - userStatusRelativeTime is still referenced in org/alfresco/components/dashlets/my-profile.get.js and causes exception on user profile page when user status has been set. 40402: Fix to CSS error in cloudsync merge - incorrectly overridden font-size in H3 dashlet contents (fix from Mr "I read CSS in my sleep" Hatfield). 48262: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (RECORD ONLY) 47374: Merged DEV/CLOUD2 to DEV/CONV_V413 40553: Remove on-premise style MT store Id extraction code from syncmode config lookup. 48263: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47375: Merged DEV/CLOUD2 to DEV/CONV_V413 42005: Merged BRANCHES/DEV/FEATURES/CLOUD1_DAM to BRANCHES/DEV/CLOUD1: 37644: Resolve CLOUD-34: Incorporate Gallery View 39105: Moved to AMP produced from modules/dam/BRANCHES/V1.0 with overrideSource=cloud build property 39268: ALF-13984: High Resolution Mime-Aware Place Holder Icons - Implemented in DAM 1.0.2.0 39651: Deployed DAM module version 1.0.3 to CLOUD1_DAM which fixes: - CLOUD-380: Document library displayed incorrectly in Gallery view in IE7 - DAM-36: CLONE - Document library displayed incorrectly in Gallery view in IE7 - DAM-37: Gallery View: No Border Around Selected Items in IE7 - DAM-38: Gallery View: Two Items Must be Selected in IE7 for Multi-select Actions - DAM-39: Gallery View: Slider Behavior is Erratic in IE7 - DAM-40: Gallery View: Upload Instructions Throws Error in IE7 40083: CLOUD-378: Drag and drop within document library doesn't work in Gallery view - Deployed DAM 1.0.4.0 40507: Changed name of DAM module to Media Management 40534: Version 1.0.5.1 of MM module which includes: - DAM-61: Multi-Select Checkboxes Are No Longer Present in 1.0.5 40723: Deployed version 1.0.5.3 of the Media Management module which includes fixes for: - CLOUD-544 / DAM-66: 'Share' Link Displayed Incorrectly on Info Panel - CLOUD-543 / DAM-65: Gallery View Content Display Should Support Dynamic Changing of Browser Width 41174: Deployed Media Management module 1.0.5.4 which includes: - DAM-67: Gallery View Changes the Size of Dragging Thumbnails in Other Views - DAM-68: Gallery VIew Should Hide Its Container on destroyView - DAM-69: Gallery View Resizing Should Fire Only When Resizing has Stopped - DAM-71: Gallery View Thumbnail Generation Should Accept Thumbnail Definition Parameter 41536: Merged HEAD to BRANCHES/DEV/FEATURES/CLOUD1_DAM: 40870: m.share fixes 41537: Merged HEAD to BRANCHES/DEV/FEATURES/CLOUD1_DAM: 40919: m.share fixes 41538: Merged HEAD to BRANCHES/DEV/FEATURES/CLOUD1_DAM: 41432: Fixed CLOUD-587 "Drag and Drop Changes Conflict with Hover Events on Touch Devices" 41614: Changed version of gallery view only MM module to 0.1 42004: Upgraded to MM 0.1.5.5 which contains fix for DAM-74 48266: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (UI ONLY) 47403: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 42199: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/CLOUD1: 41113: Creating new [bug fix] branch from BRANCHES/DEV/CLOUD1 41211: QuickShare: CLOUD-593: prevent copying of QuickShare props on node copy [+ minor refactor] 41612: QuickShare: Merged form THOR1_QUICK_SHARE to CLOUD1-BUG-FIX 36363: QuickShare: Improvment for THOR-1268 "F378: As a user I can choose to share a document" 41639: QuickShare: Fixed bug where the display of quickshare was based on the showComments property 48267: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47411: Merged DEV/CLOUD2 to DEV/CONV_V413 42121: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/CLOUD1: 39663: CLOUD-153 - Invite box doesn't parse email addresses properly 48269: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47422: Merged DEV/CLOUD2 to DEV/CONV_V413 42047: Merged DEV/CLOUD_SIGN_UP into DEV/CLOUD1 (cloud priority 47430: Merged DEV/CLOUD2 to DEV/CONV_V413 42049: Merged DEV/CLOUD1-BUG-FIX into DEV/CLOUD1: 41674: ALF-15967: Using START_USER_ID_ instead of "initiator" property to query process instances started by user X to prevent extra joins + removed unused constants 41650: Fixed CLOUD-667: Merged fix for ALF-14438 into CLOUD1-BUG-FIX + using START_USER_ID_ instead of custom "initiator" property to query initiator to boost performance even more 42050: Merged DEV/CLOUD1-BUG-FIX into DEV/CLOUD1: 41674: ALF-15967: Using START_USER_ID_ instead of "initiator" property to query process instances started by user X to prevent extra joins + removed unused constants 41650: Fixed CLOUD-667: Merged fix for ALF-14438 into CLOUD1-BUG-FIX + using START_USER_ID_ instead of custom "initiator" property to query initiator to boost performance even more 48270: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (UI ONLY) 47438: Merged DEV/CLOUD2 to DEV/CONV_V413 42160: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/CLOUD1: 38864: CLOUD-41 - Resize logo banner on upload 38878: CLLOUD-42 - Image previews should be larger 48271: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47345: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 40871: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 40342: Merged BRANCHES/DEV/THOR1_REST_API1 to BRANCHES/DEV/THOR1_REST_API2: 35747: Merged BRANCHES/DEV/THOR1_REST_API to BRANCHES/DEV/THOR1_REST_API1: 34235: Upgraded Jackson to 1.9.4 34258: Removed invalid bean definitions (classes don't exist) for abstract="true" beans. 34463: Exported=true 34464: Removed unused parent workflow 34465: Added a createComment method (Just cut and pasted Neils testcase code). 34466: Initial check-in of Rest Api code. Still quite a bit to do. 34619: Added sources 34620: Going to start another Sprint so I need to check in everything up to date. WIP 34691: Renamed Action interfaces for better consistency, Fixed up POST methods with better Metadata about resources and fixed failing tests 34727: Reworked the Resource execution, added PUT webscript, improved the tests. 34853: Implemented HTTP Methods: GET, PUT, POST, DELETE with better test cases 34856: Initial cut of rest api implementations. Work in progress. 34935: Added EmbeddedEntityResource and uniqueid annotations. Recursively calls embedded entities, improved tests. 34956: Attempted simplification by removing the CollectionResource concept -> Just an EntityResource with 5 potential methods. 34986: 2nd cut of rest api implementations: still wip. 34987: Added a readById method for Resource GET using the relationship id 35007: Rest API (THOR-1150, THOR-1151, THOR-1152, THOR-1153, THOR-1220, ): - explicitly set default timezone for date serialization/deserialization to UTC - more rest api implementation tests - rest api implementation re-factoring resulting from changes to the framework 35024: Automatically sets the id of passedIn object for a HTTP PUT for relationship resources. 35051: Further impl for public api: THOR-1150 -> THOR-1153 and THOR-1220 35059: Separated the GET executor so the embedded objects are called correctly. 35102: Added Paging, fixed up the Tests. 35117: wip, rest api implementations 35312: Made final 35313: Better exception handling with messages 35314: Improved paging/params and messages, started on embedded relations 35322: Added support for relations projections, to filter by properties use "properties" param, to add in relations use the "relations" param 35329: Handles null relationship keys 35377: Checks for simple property types which don't allow embedding 35496: WIP: rest implementations, test framework and tests 35529: Initial commit of scope and versioning support. 35539: Fixed the versioning for relationship resources 35560: Quick cleanup 35562: Embedded relationships is now working much better 35586: Safer serialization of Maps/Collections 35603: Added better version and filtering tests. 35611: Added Entity and Relationship not found exceptions 35612: Added Entity and Relationship not found exceptions 35674: Rest api implementations: - node refs are represented solely by their uuid (workspace://SpacesStore is assumed) - updates to model classes (hashcodes, equals, etc) - more paging support - tests 35858: Merged BRANCHES/DEV/THOR1_REST_API to BRANCHES/DEV/THOR1_REST_API1: 35773: Added api versioning with @WebApiDeleted annotation. Better inheritance handling and improved tests. 35774: Deleted, it wasn't supposed to be there. 35988: WIP: - sample requests - more tests - general fixes, including security fixes - tag entity 35990: Merged BRANCHES/DEV/THOR1_REST_API to BRANCHES/DEV/THOR1_REST_API1: 35938: Reworked filtering in a big way. Hopefully now it works. 35982: Clean up and bug fix the request 35983: Clean up and bug fix the request 36002: Merged BRANCHES/DEV/THOR1_REST_API to BRANCHES/DEV/THOR1_REST_API1: 35992: Clean up after discussions with David/Steve. New Parameter called "parameters"! 36056: Clean up, not used 36057: Changed the way responses are rendered, more consistent "entry" entries. 36087: Changed the json structure for tests as well 36134: Added paging parameter, cleaned up imports, more tests 36146: WIP: - fixed up create tag return type - fixed up Person model entity so that it doesn't extend Node 36151: Fix for Serialization of recursive related Collection of results 36168: Better empty collection handling, initial sorting tests. 36189: Fixes embedded resources by correct id. 36210: WIP: - updates to rest api request files - changed Comment so that it doesn't extend Node. removed title - more tests 36211: WIP: - service paging and other fixes and updates 36298: Moved jetty files to fix the build (it's odd that cloud -r works and yet continuous.xml does not) 36299: Update classpath as a result of jetty jars move 36301: Fix to stop null values in hashmaps from being returned in results. 36302: Added copyright notices 36303: WIP: - split site service into a base class (dealing with site permissions and membership) and a subclass (everything else) to aid the following - moved site membership functionality into canned queries for person sites and site members relations - changed totalItems to an Integer so that it can be null if total items is not known - added siteId filtering for activities - copyright notices - creating a comment through the comment service raises a share-like activity 36304: WIP: - changed totalItems to an Integer so that it can be null if total items is not known - copyright notices 36309: Servlet API 2.5 needs to be included at the top for the embedded jetty to work - need to revisit this. 36310: Temporary fix for dealing with nodeRefs embedded in activity summaries: regex match and convert to NodeRef. 36312: Fix tests 36325: Add jetty jars to ant test classpath 36327: Site memberships fix, override search subsystem to force lucene, re-instate full site service implementation (Spring circular dependencies are ok) 36335: Add missing file 36367: Fixes to tests 36368: CommentService fix - permissions. 36438: WIP: - Person filtering (for cloud) - Disabled some tests that are preventing the test from running (will revisit) - Person-avatar relation 36522: WIP: - fix sort ordering for site members - fix site id filter for activity feed list (add tenant id) 36523: WIP: - more tests - improved robustness of tests - added status mappings for EntityNotFound and RelationResourceEntityNotFound - for avatar, return base 64 encoded avatar data and avatar node id - use more specific EntityNotFound and RelationResourceEntityNotFound exceptions. 36646: Changes resulting from review - make sure empty strings and null values are not output - person entity tidy-up - person visibility rules applied to person retrieval - more tests - return noderef of avatar node 36668: Fix build, add missing file 36694: Fix failing test 36764: WIP: - site containers canned query - node ratings: return null average (rather than -1) if there are no ratings - site membership canned query sorting - use an enum for sort fields 36767: Add missing files 36769: WIP: - node ratings: remove user rating summary, added rating date and fixed up tests 36770: WIP: - some changes to property names for activity feed entries 36823: WIP: - re-instate -1 for average rating when there are no ratings 36824: Changes resulting from review: - merge activities into one relation - quota model object to model network quotas - Change HomeAccount -> HomeNetwork - Changes to comment property names - If average rating is -1 (from the rating service) convert to null - remove readById from node entity resource - Favourite sites url renaming 36825: Removed debug logging for rest api 36826: Commented out tag related tests until I figure out how to get the lucene search working 36833: Added discoverablity for the documentation. New @WebApiDescription, @WebApiParam annotations 36871: Added tests for @WebApiDecrition, @WebApiParam 37026: WIP: - added discoverability annotations - changes resulting from review: o node ratings output restructure o network quotas restructure (need to revisit this again) - activity summary post processing framework - added non-caching to rest api webscript (need to revisit) - don't output empty strings (need to revisit) - more tests 37058: WIP: - change tag service support 37141: WIP: - tag sorting - fix JSON issue in PreferencesService 37142: WIP: - refactoring: split functional areas into separate REST API implementation classes - added copyright notices - network quotas represented as a list - ensure empty (zero length) JSON strings coming into the REST api are treated as null 37300: WIP: - support for update comment - activity summary processing - web script set no caching and response content type 37301: WIP: - support for update comment 37354: Build fix: try rebuilding indexes 37369: Fix build: try again 37498: More logging to determine build failure using lucene for search 37608: Build fix? 37609: Fix build 37637: Fix build: try again 37672: Build fix (try again) 37860: Get networks: consolidate functionality so that it's easily callable from core Thor code and public api code 37861: Get networks: consolidate functionality so that it's easily callable from core Thor code and public api code 37862: Fix for THOR-1493: "OpenCMIS Change Object Id to be Node GUID" 37864: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" 37866: Unit test fix 37950: Build fix for ApiTest (another try - override repository-properties bean to force lucene) 38051: Build/test fix (another try) 38072: Removed file no longer required 38114: Better representation of the Resource metadata. Try calling: /alfresco/service/public/alfresco/versions/1 38230: Fix PublicApiTest on the build machine 38309: Public api test fixes 38319: Public api webscript transaction configuration. Make get webscript r/o transaction. 38320: Public rest api: make sure http response headers are written before the response content. 38340: More build test fixes 38349: Fix for THOR-1493: "OpenCMIS Change Object Id to be Node GUID" - fix up CMIS query fallout 38530: Fix tests 38531: Fix for THOR-1493: "OpenCMIS Change Object Id to be Node GUID" - fix up cmis queries 38552: Further test fixes 38574: Added some comments 38730: Added OPTIONS webscript to get metadata on the current url 38879: Refactored a little to make the code easier to extend / customise 38880: Fixed incorrect config, I should try not to delete things. 38986: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/THOR1_REST_API1: 38954: Fix for ALF-14475: "CMIS : Wrong cmisra:numItems in folder sites and below with /cmisatom binding url" 39010: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/THOR1_REST_API1: 39006: Fix for ALF-14475 part 2: "CMIS : Wrong cmisra:numItems in folder sites and below with /cmisatom binding url" 39090: Fixed broken webscript OPTIONS call 39159: Fix broken INFO url mapping 39326: Clean up, Added ResourceMetaDataWriter interface for different meta info presentation formats 39331: The tests need their own context 39609: Update to latest Chemistry libraries 39657: Fix for CLOUD-417, part 1: "Delete a Comment" 39741: Fix for CLOUD-409: "Change Endpoint for CMIS URLs in Staging" 39742: Fix for CLOUD-409: "Change Endpoint for CMIS URLs in Staging" 39750: Fix for CLOUD-417, part 2: "Delete a Comment" - added delete comment method to comment service 39754: Fix for CLOUD-417, part 3: "Delete a Comment" - fixed up activity generation for update and delete comment 39776: OpenCMIS TCK fix: getDescendants is using node service, which unlike the FileFolderService does not automatically remove hidden files. 39780: Shifted public api opencmis webscript definitions to Thor 39781: Shifted public api opencmis webscript definitions to Thor 39782: Fix for CLOUD-409: "Change Endpoint for CMIS URLs in Staging" 39783: Minor fixes, comments 39785: Public api tests - move jetty libraries to 3rd party - remove JettyComponent as a Spring bean and change how it's constructed 39786: Fix for THOR-1493: "OpenCMIS Change Object Id to be Node GUID" - for unversioned documents, the revision number should not be appended 39794: Added missing files for public api tests 39795: Update to latest Chemistry libraries 39834: Fix for THOR-1493: "OpenCMIS Change Object Id to be Node GUID" - for unversioned documents (or documents with version "1.0"), the revision number should not be appended 39835: Fix for CLOUD-362: "Discover Networks" API should be at "/tenants" 39836: Fix for THOR-1493: "OpenCMIS Change Object Id to be Node GUID" 39844: Public api tests - move jetty libraries to 3rd party - remove JettyComponent as a Spring bean and change how it's constructed 39854: Fix for CLOUD-362: "Discover Networks" API should be at "/tenants" 39856: Re-instate tests. 39857: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" - removed cmisatom url binding (opencmis is now at .../public/cmis/versions/1/atom) 39926: Fix for CLOUD-442: "Public API : Tagging + Paging" 39927: Fix for CLOUD-442: "Public API : Tagging + Paging" - updates to public api tests 40185: Make sure LockService is injected into CommentService 40186: Make sure LockService is injected into CommentService 40187: Changes resulting from sprint demo: - changes to network and network membership representation - embed modifiedBy person object in comment 40211: Changes resulting from sprint demo: - changes to network and network membership representation 40212: Fix intermittently failing test 40223: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" - changes resulting from end of spring demo (get repositories located at .../cmis/versions/1.0/atom) - removed browser binding for now 40224: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" (Thor-specific changes) - changes resulting from end of spring demo (get repositories located at .../cmis/versions/1.0/atom) - removed browser binding for now 40225: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" - changes resulting from end of spring demo (get repositories located at .../cmis/versions/1.0/atom) - removed browser binding for now 40254: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" - changes resulting from end of spring demo (get repositories located at .../cmis/versions/1.0/atom) 40255: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" - changes resulting from end of spring demo (get repositories located at .../cmis/versions/1.0/atom) 40256: Fix for THOR-1494: "OpenCMIS Change Base Url to be Consistent With Public Rest Api" - changes resulting from end of spring demo (get repositories located at .../cmis/versions/1.0/atom) 40270: Turned stacktrace into a String 40339: CLOUD-488: "The activities feed in the public API is not returning all required summary data for comments" 40548: Merged PATCHES/V4.0.2 to BRANCHES/DEV/THOR1_REST_API2: 40526: Fixed ALF-15540: CMIS: Synchronized block in service interceptor 40644: Public api: 40645: Public Api: 40646: Public Api: 40649: Public api: 40650: Public api: 40657: Merged BRANCHES/DEV/THOR1_REST_API1 to BRANCHES/DEV/THOR1_REST_API2: 40515: CLOUD-390: Content models to be filtered out of Cloud CMIS implementation 40550: Public api: - updates to datetime property names 40552: Public api: - sort sites by site title (by default) 40596: Removed "system" from exclusions for CLOUD-495 40610: CLOUD-495: F414: Add multiple tags to a folder or document 40674: Public api: 40675: THOR-1324: "F414: Add multiple tags to a folder or document" 40676: Public api: 40678: Public api: 40715: Public api: 40730: Merged /alfresco/BRANCHES/DEV/THOR1_REST_API1:r40724 Better meta-data handling for PUT requests 40731: Merged /alfresco/BRANCHES/DEV/AMILLER/CLOUD-496:r40659: CLOUD-500: Add trusted auth with key validation. 40732: Fixed failing test 40739: Merged BRANCHES/DEV/V3.4-BUG-FIX:r40193: ALF-15307 / ALF-15190: FTS indexing can stick forever on purged nodes - May cut 50 minutes off the build time when merged 40742: Public api 40801: Public api: 40802: Public api 40803: Public api 40804: Public api 40807: Public api 40811: Public api 40815: Public api: 40826: Public api 47357: Fix merge/compile error (solr /cmis query) 47370: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41149: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41146: Fix trusted authentication against OpenCMIS 47372: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41192: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41191: Fix for OpenCMIS trusted authentication to allow local opencmis access as before 48272: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: (no changes) 47368: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41128: (RECORD ONLY) Merged BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC to BRANCHES/DEV/CLOUD1: 41003: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41026: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41039: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41086: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41115: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41126: Merged BRANCHES/V4.1 to BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC: 40364: Testcase for ALF-15178, which is not reproduced. 40419: Fix for the MLText parts of ALF-15502. 40782: Fix ALF-15420: Move: child files/subfolders aren't synced after moving from parent folder and updating in Alfresco on-premise/Cloud 41127: Merged BRANCHES/V4.1 to BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC: 41121: Merged BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC to BRANCHES/V4.1: 41003: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41026: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41039: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41086: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 41123: Merged BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC to BRANCHES/V4.1: 41115: CloudSync: ALF-15734 - force unsync (of last SSMN) on target causes repeating pull errors to appear in both logs 48274: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47356: (RECORD ONLY) Add temp logging - to investigate unit test failures on build only 48277: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47376: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41302: CLOUD-622: "Mobile App connection to testmy build 227 issue" 41377: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 40859: public api: 40862: CLOUD-555: "Updating comment fails because node not found" 40961: CLOUD-566: "Site object shouldn't contain the "sitePreset" property" 40979: Added tests for non-numeric params and non-european characters 41030: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/THOR1_REST_API2: 41027: ALF-15193: "Folder Is Not a Folder CmisInvalidArgumentException thrown when using cmis:objectId" 41097: Added quickshare and cloudsync to cmis filter list 41098: Renamed serializer/deserializer lists for RestJsonModule 41099: Cleaned up consistent Rest responses - CLOUD-574 41100: Meta info webscript is disabled because its not been reviewed / in the correct format 41104: Meta info webscript is really disabled because its not been reviewed / in the correct format 41105: Added key for trusted layer7 relationship 41137: Public api: 41168: Public apI; 41169: CLOUD-565: "API / URL returns a "tenant required" error" 41170: public api: 41171: public api: 41172: public api: 41183: CLOUD-598: "API: "GET network" response has unnecessary JSON nesting" 41186: Fix solrcore properties 41282: CLOUD-616: "CMIS API: Repository names should be more descriptive" 41283: CLOUD-601: "API /networkId/public/cmis/versions/ returns a 400" 41325: Public api: 41367: CLOUD-636: "REST API: Nodes: Tags: Not allowed DELETE method proceeds with status 204" 41369: Public api: 41474: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41422: Sample OAuth call for the Resource Owner Password flow 41427: Sample OAuth call for the Client Credentials flow 41433: Public api: (1) parameterize site members/people sorting in service api 41434: Public api: minor comment service fix 41438: CLOUD-629: "REST API: It is possible to add a comment to comment" 41439: Public api: fix for default tenant id in CMIS requests 41449: CLOUD-629: "REST API: It is possible to add a comment to comment" 41456: CLOUD-644: "Performing a Checkout in OpenCMIS Results in an Exception in the Share Doc Library" 41457: Fix build 41461: Public api: more tests 41560: CLOUD-657: "cmis root service document returning incorrect urls" 41670: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41521: CLOUD-660: "GET favourite sites results in exception when skipCount is greater than number of items" 41606: Fix for CLOUD-668 - POSTing to a relationship by id now returns an InvalidArgumentException 41607: CLOUD-668 : changed ordering so errors fire in correct order. 41628: Public api: more tests 41710: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41672: CLOUD-672: "404 Error when browsing child files/folder " 41673: Public api: more tests 41675: CLOUD-674: "Root network calls need to return application/json content type" 47378: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41670: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41521: CLOUD-660: "GET favourite sites results in exception when skipCount is greater than number of items" 41606: Fix for CLOUD-668 - POSTing to a relationship by id now returns an InvalidArgumentException 41607: CLOUD-668 : changed ordering so errors fire in correct order. 41628: Public api: more tests 41710: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41672: CLOUD-672: "404 Error when browsing child files/folder " 41673: Public api: more tests 41675: CLOUD-674: "Root network calls need to return application/json content type" 48289: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD 47447: Merged DEV/CLOUD2 to DEV/CONV_V413 43323: Merged BRANCHES/DEV/FEATURES/CLOUD1_GRANULARPERMISSIONS1 to BRANCHES/DEV/CLOUD1: 42257: CLOUD-649: Updates UI action for Granular Permissions 42295: CLOUD-33: Updates labels 42303: CLOUD-651: Limit user search to site members only. 42352: CLOUD-780: Adds a rolesWhitelist to only display those roles that are allowed. Currently set to: ["Consumer", "Contributor", "Collaborator"]. This is only used in the site view. The Repository view behaviour has not changed. 42427: Removes multi-select manage-permissions dialogue. 42520: CLOUD-802: Change the way the user is returned to the previous page to work around suspected Chrome bug. 42604: CLOUD-840: Automatically add SiteManger permisions when inheritAll is switched off. Pervent remaoval of siteManager authority. 42606: Fixed CLOUD-840 "Granular Permissions: Site Manager should retain access when inherit permissions is turned off" 42807: CLOUD-863: Reordered code to avoid AccessDeniedException 43259: CLOUD-901: Revert showComments check so it handles undefined permission 43266: CLOUD-900: Old Manage permissions form is opened via Permissions panel 43307: CLOUD-900: Follow-up fix 48291: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (UI ONLY) 47453: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 44059: Merged BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2 to BRANCHES/DEV/CLOUD1: 43797: Merged BRANCHES/DEV/FEATURES/CLOUD1_SOLR to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42526: Merged BRANCHES/DEV/V4.0-BUG-FIX, BRANCHES/V4.1, BRANCHES/DEV/4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_SOLR for CLOUD-798 V4.0-BUG_FIX 36393: Final part of ALF-13723 SOLR does not include the same query unit tests as lucene 36434: Test fix for ALF-13723 SOLR does not include the same query unit tests as lucene 36608: First part of ALF-14209 SOLR - does not support query for all stores 36676: Fix for ALF-14216 Solr Exception when you try to sort folders or files by size. 36954: ALF-14209 SOLR - does not support query for all stores 37075: Fix for ALF-14267 SOLR index check - First transaction time used instead of first ACL time - indexCheck, checkInitialState 37135: Fix for ALF-13993 It fails to find documents whose tag is longer than 255 characters 37253: Fix for ALF-13634 Re-created category won't show up again on a node in Document Library. 37384: Fix for ALF-14219 SolrQueryHTTPClient unable to handle long queries (4096 bytes) 37628: Build Fix 37749: Fix for ALF-14582 SOLR tracking allows incompatible model changed to the current index to be made 37863: Fix for ALF-14631 Extraneous Backslash in Solr Configuration File 37896: Fix for ALF-14582 SOLR tracking allows incompatible model changed to the current index to be made 38008: Fix for ALF-14042 Customisable Alfresco contextPath in Alfresco AbstractHttpClient (used e.g. by Solr CoreTracker) 38010: Fix for ALF-14686 https://localhost:8443/solr/admin/cores?action=CHECK - checks the index - it should check the cache V4.1 38179: Fix for ALF-14620 SOLR searches run by system user in archive store return fewer results than for admin user V4.1-BUG-FIX 40401: Part for for ALF-15406 Index Tracker seems not to gracefully stop upon shutdown keeping all other threads in waiting 41201: Fix for ALF-15767 Group query using cm:authorityName 41202: Additional unit tests related to ALF-15731 TYPE:"..." queries no longer work for Lucene on 4.X 41203: Part 1 for ALF-15811 SOLR query increases DocBitSet inefficiently 41210: Part 2: ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 41303: Fix for ALF-15799 Under high concurrency load balanced Solr throws an Antlr related NPE 41322: Fix for ALF-15858 SOLR ACL tracking can stall or miss acls during tracking 41323: Chemistry client java to create test data for ALF-15858, ALF-15782, CLOUD-596, ALF-15753 etc 41487: Fix for ALF-15910 SOLR - Add index warming and filter pointless entries from the filter cache Fix for ALF-15851 Too many live instances of SolrIndexSearcher at one time resulting in OOM - Alfresco 4.1.1 - build 151 41730: Fix for ALF-15995 NodeRef is missing in log on "Problem converting to Freemarker" error 41747: Fix for ALF-15811 SOLR query increases DocBitSet inefficiently Part of ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 41748: Fix for ALF-15950 Solr: throws NPE: org.alfresco.solr.SolrLuceneAnalyser.loadAnalyzer 41752: Fix for ALF-13634 Re-created category won't show up again on a node in Document Library. 41940: Fix for ALF-16086 SOLR tracking does not include transformation status etc (error in header name) 42136: Last SOLR side update for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 42143: In-memory bridge table for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 42183: Build fix - unit test runs in 64M - for all the washing machines out there .... 42547: Fix the model used for embedded tests. 42659: Add missing test model 42663: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_SOLR 42612: Further fix for ALF-16164 Cloud monitoring of SOLR is CPU intensive due to its repeated use of the SOLR stats page 42657: Fix for ALF-16359 Fix SOLR logging in production and other environments 42660: (RECORD ONLY) Merged DEV/CLOUD1 to DEV/FEATURES/CLOUD_SOLR working copy sync r42514 through r42659 43799: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42377: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 42363: ALF-16213: renaming versioned file results in file being deleted. 42411: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 42408: Merged BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC to BRANCHES/DEV/V4.1-BUG-FIX: 42389: CLOUD-796: handle unknown custom content/folder type 42396: CLOUD-796: handle unknown custom content/folder type 42397: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC: 41858: ALF-14444 - CloudSync: Ensure unknown properties when synced to Cloud are ignored properly 42406: CLOUD-796: handle unknown custom content/folder type 42409: CloudSync: CLOUD-796 / ALF-16226 - hide sync props in forms (eg. edit props) for sync'ed custom content type 42428: ALF-16217: Remove unnecessary restriction on content type 42432: CLOUD-795: Optimise activities feed: rollup multiple (WebDAV) document adds/deletes into a single activity 43802: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42559: Merged BRANCHES/DEV/CLOUD1_SPRINT1/ to BRANCHES/DEV/CLOUD1-BUG-FIX: 42548: CLOUD-712: Ensure that all CSS files are loaded in IE (latest Spring Surf libs r1170) 42565: CLOUD-837: TenantContentUsageImpl does not handle failed lock 43811: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42570: CLOUD-810: ""emailFeedDisabled" in person JSON needs to be called "emailNotificationsEnabled"" 43813: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42572: CLOUD-794: "Activities should be posted for CMIS (to enable both Public API + Mobile clients)" 42576: CLOUD-842: Activities Feed: post lookup - job lock + max items per cycle 42579: CLOUD-846: Minor optimisation for Site lookup (for a nodeRef) 43814: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42609: CLOUD-712: Updated Surf libs (r1171) to change the number of @import statements supported by each <style> element in IE from 32 to 31 43815: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42694: Fix build (merge issues) + fixes for CLOUD-839: "Activities Are Not Posted For Ratings", CLOUD-860: "Content Created With CMIS Cannot be Rated" and CLOUD-397: "The JSON response of the networks request is incorrect" 43816: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42737: CLOUD-463: Now checks if the current user has read permission for the shared node, before displaying "Document Details" button. 42847: CLOUD-794: "Activities should be posted for CMIS (to enable both Public API + Mobile clients)" 42868: Fix failing build tests + further/revised public api tests 42875: CLOUD-869: "Remove cmiscustom types from the CMIS dictionary" 42884: ALF-1059 / CLOUD-469: Post activities for folder(s) add + delete 42899: Fix build 43817: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42950: CLOUD-726: Ensure that i18n messages fall back to properties defined by less specific locale files (updated Surf libs: 1174) 43818: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43138: Fixed CLOUD-491 "'New Folder' form is not displayed on IE7, IE8" 43234: CLOUD-313: Implment Transport pooling in email sender. 43349: Fix CLOUD-918: Failed to delete folder via Folder Details page 43351: Fix CLOUD-905 - activity for Share folder delete are not displayed (OK via WebDAV) 43440: CLOUD-928: Cope with missing shredId attributes, due to the copying of QuickShare properties, prior to CLOUD-593 43451: Merged HEAD to BRANCHES/DEV/CLOUD1-BUG-FIX: 43449: ALF-16669: removing a site member may break the activity feed (CLOUD-931) 43819: Fix merge error 43820: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43465: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43821: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43477: Merged HEAD to BRANCHES/DEV/CLOUD1-BUG-FIX: 39205: Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD 39084: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.1-BUG-FIX 39081: Fix for ALF-6139 and ALF-13959 - Incomplete site creation issues - latest Surf libs and related changes to allow atomic creation of multiple Surf objects in a single REST call. Originally authored by Dave Ward for 3.2 - now migrated to SpringSurf. Implemented ADMRemoteStore changes for above change to apply to 4.0. 43488: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43822: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43537: ALF-16706: CLONE - POI becoming irresponsive and causing jvm to freeze with XLS that includes fraction formats 43520: ALF-16694 POI becoming irresponsive and causing jvm to freeze for a while with certain XLS (fraction formats) - Patched POI to: - limit the length of fractions to four digits (more than that takes too long to process) e.g. "# #/#####" is too long and will be reduced to "# #/####" which still takes about a second! - handle the -ve fraction format part (i.e. n in p;n;z), so its length is not interpret as part of the fraction format of the +ve fraction part. - handle custom formats a bit better (strip them) rather than interpret the text length as part of the fraction format - handle -ve fractions (just did not work) - limitations: - custom text gets stripped (still better than before) - formats that have p (+ve) and n (-ve) parts must include a fraction format in each part. Otherwise +ve and -ve values are not formatted as a fraction (still better than before) 43564: CLOUD-939: <Record Only> 43558: ALF-16694 POI becoming irresponsive and causing jvm to freeze with XLS that includes fraction formats - Original jar did not get removed in previous commit << NO NEED TO MERGE TO CLOUD1-BUG-FIX as there was a tree conflict and the original jar was removed. >> 43823: Fix merge error 43824: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43579: Public api test, fix intermittent test failures (hopefully) 43721: CLOUD-935: Update thor override of remoteadm.post.desc.xml 43726: PUBLICAPI-11: "Extract metadata needs to be called after uploading new content via CMIS" 43828: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43728: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/CLOUD1-BUG-FIX: 38211: CLOUD-115 - Remove Network Admins on downgrade to free/public 43829: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43731: Resolve CLOUD-965: A known config which has been tested can be modified when deploying to production 43733: PUBLICAPI-11: "Extract metadata needs to be called after uploading new content via CMIS" 43762: Fix the build 43830: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43788: CLOUD-942: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 39622: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39605: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - transformer.PdfBox.TextToPdf no longer does txt to pdf transform as OOo/JOD handles non western chars better and are not that much slower even for western encodings - It still does csv and xml to pdf - transformer.complex.Text.Pdf2swf now has a wild card first transformer for text to pdf (rather than transformer.PdfBox.TextToPdf) The 2nd transform is still transformer.Pdf2swf. As a result transformer.PdfBox.TextToPdf or the OOo/JOD transformers may be used. - transformer.complex.Archive.Pdf2swf now has a wild card first transformer for the same reason. - transformer.complex.Text.Image now has a wild card first transformer for the same reason. - Allow transformer config element supportedTransformations to wild card source or target mimetype 39692: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39679: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Fix build failures (not sure about RecordsManagementAuditServiceImplTest) - Reset some of the text to pdf / swf limits now OOo or JOD is used rather than PDFBox 40112: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 40111: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Patched jooconverter to handle non western characters in text files, by using the same properties that JOD uses. 40073: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Refactored JodContentTransformer and OpenOfficeContentTransformerWorker. Moved common code into OOoContentTransformerHelper, including fixes that existed on only one or the other. - For text files, change file encoding from SHIT JIS (and others) to UFT-8, as OpenOffice/LibreOffice do not support this as an input. They do support it in other file types but not text. JOD now works, but OOo still has problems. 43789: CLOUD-942: Add mergeinfo, missed by initial commit from Cornerstone. 43831: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43488: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43832: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43762: Fix the build 43833: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42692: (RECORD ONLY) Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1-BUG-FIX: 40859: public api: 40862: CLOUD-555: "Updating comment fails because node not found" 40961: CLOUD-566: "Site object shouldn't contain the "sitePreset" property" 40979: Added tests for non-numeric params and non-european characters 41030: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/THOR1_REST_API2: 41027: ALF-15193: "Folder Is Not a Folder CmisInvalidArgumentException thrown when using cmis:objectId" 41097: Added quickshare and cloudsync to cmis filter list 41098: Renamed serializer/deserializer lists for RestJsonModule 41099: Cleaned up consistent Rest responses - CLOUD-574 41100: Meta info webscript is disabled because its not been reviewed / in the correct format 41104: Meta info webscript is really disabled because its not been reviewed / in the correct format 41105: Added key for trusted layer7 relationship 41137: Public api: 41146: Fix trusted authentication against OpenCMIS 41168: Public apI; 41169: CLOUD-565: "API / URL returns a "tenant required" error" 41170: public api: 41171: public api: 41172: public api: 41183: CLOUD-598: "API: "GET network" response has unnecessary JSON nesting" 41186: Fix solrcore properties 41191: Fix for OpenCMIS trusted authentication to allow local opencmis access as before 41282: CLOUD-616: "CMIS API: Repository names should be more descriptive" 41283: CLOUD-601: "API /networkId/public/cmis/versions/ returns a 400" 41325: Public api: 41367: CLOUD-636: "REST API: Nodes: Tags: Not allowed DELETE method proceeds with status 204" 41369: Public api: 41422: Sample OAuth call for the Resource Owner Password flow 41427: Sample OAuth call for the Client Credentials flow 41433: Public api: (1) parameterize site members/people sorting in service api 41434: Public api: minor comment service fix 41438: CLOUD-629: "REST API: It is possible to add a comment to comment" 41439: Public api: fix for default tenant id in CMIS requests 41449: CLOUD-629: "REST API: It is possible to add a comment to comment" 41456: CLOUD-644: "Performing a Checkout in OpenCMIS Results in an Exception in the Share Doc Library" 41457: Fix build 41461: Public api: more tests 41521: CLOUD-660: "GET favourite sites results in exception when skipCount is greater than number of items" 41606: Fix for CLOUD-668 - POSTing to a relationship by id now returns an InvalidArgumentException 41607: CLOUD-668 : changed ordering so errors fire in correct order. 41628: Public api: more tests 41672: CLOUD-672: "404 Error when browsing child files/folder " 41673: Public api: more tests 41675: CLOUD-674: "Root network calls need to return application/json content type" 41790: CLOUD-629: "REST API: It is possible to add a comment to comment" 41791: CLOUD-629: "REST API: It is possible to add a comment to comment" 41793: CLOUD-629: "REST API: It is possible to add a comment to comment" 41823: Public api: more tests 41825: Fix for CLOUD-684 - wraps the list, not sure if I like the paging 41853: CLOUD-700: "The mobile SDK needs a way to map an accessToken to a user identifier" 41867: CLOUD-711: "It should be possible to remove a favourite site" 41957: Public api: - error handling improvements - more tests 41970: Public api: - fix build (add missing files) 41972: Public api: - more tests (including OpenCMIS TCK) 42046: Added some debug timings. Enabled using log4j.logger.org.alfresco.rest.framework.webscripts=debug 42058: Public api: changed logging package name 42124: Public api: - more tests - minor fixes 42125: CLOUD-734: "CMIS: Query Issues Discovered During Testing" 42126: Public api: fix up OpenCMIS tests 42171: Consistency fix for CLOUD-695. 42180: Fix build 42181: CLOUD-695 "Requests to un-implemented urls do not consistently return http status 405 (Method not allowed)": fix up public api tests 42214: Public api tests (cmis) 42251: Changed the serializer for embedded entities, (related to CLOUD-746) 42253: Fix build 42735: (RECORD ONLY) Fix build (fix merge error) 43834: Merged BRANCHES/DEV/FEATURES/CLOUD1_GOOGLEDOCS to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43702: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43703: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43744: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43846: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43840: [CLOUD-955] Add request header config to remove Origin Header in share proxy calls. 43855: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 41731: Fix for ALF-16002 - Dashlet - My Documents - I've recently modified - executes unlimited query. In SOLR unlimited (all sites query) is really unlimited, for Lucene it is not. Improved jscript Search debugging to correctly output limit value on query. 43881: Revert CLOUD-942: Reverse merge r43830 43885: CLOUD-942: Reapply changes backed out in r43881 and Comment out faling unit tests. 43921: Resolve CLOUD-990: REGRESS: No items error is displayed on DocumentLibrary Page (for some files) 43924: Disable intermittent OpenCMIS tests 43925: Disable intermittent test 43952: CLOUD-993: Insure login button is shown when user isn't logged in. 43992: Resolve CLOUD-1001: REGRESS: New Application Theme and Logo are not applied after re-login 48293: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD (UI ONLY) 47530: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 45853: Merged BRANCHES/DEV/FEATURES/CLOUD1-EMAIL-REFRESH to BRANCHES/DEV/CLOUD1: 44041: Merged BRANCHES/DEV/CLOUD1_SPRINT1 to BRANCHES/DEV/FEATURES/CLOUD1-EMAIL-REFRESH: 40496: Merged from BRANCHES/DEV/AMILLER/CLOUD1_SPRINT_1 to BRANCHED/DEV/CLOUD1_SPRINT1 CLOUD-189: Created e-mail template macros and css lib files CLOUD-189: E-mail template image assets CLOUD-189: Updated macros and CSS lib plus finished site invitation template CLOUD-189: Reset password e-mails CLOUD-189: More e-mail templates CLOUD-189: Workflow template CLOUD-144: Refactor AbstractUserNotifier to allow custom models to be passed to template. CLOUD-144: Custom activity feed model builder, for cloud. CLOUD-144: Activities e-mail template 40958: CLOUD-580: Added alt text for images 40960: CLOUD-585: Added missing quotes to invitation e-mail 40967: CLOUD-144: Add joins aggregation to activites feed model and fix missed merge. 40970: CLOUD-144: Added joins to activities e-mail 40982: CLOUD-582: Fix subject 41028: CLOUD-582: Fix unit test assertion on email subject 41231: CLOUD-612: Add generation time to model. 41276: CLOUD-612: Added date to activity e-mail template 41279: CLOUD-614: Added missing footer text to activities e-mail 41502: CLOUD-611: Remove corner images 41728: CLOUD-681: Add others category to activities e-mail 42138: CLOUD-613: Remove exclusions from site activities, sort grouping by site name and improve logic for determining network. 42196: CLOUD-613: Group activities by site 42914: Translated e-mail templates 44174: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1-EMAIL-REFRESH: 43983: GERMAN: Translation updates based on EN r43703 43984: SPANISH: Translation updates based on EN r43703 43985: FRENCH: Translation updates based on EN r43703, includes file missing from previous commit. 43986: ITALIAN: Translation updates based on EN r43703. 43987: JAPANESE: Translation updates based on EN r43703. 43990: BDE-108: add workaround of http://jira.codehaus.org/browse/MNG-4979 in Maven Surefire configuration to be able to use JaCoCo easily 44024: JAPANESE: Translation updates based on EN r43703. Corrects files missing from previous commit. 44031: JAPANESE: Translation updates based on EN r43703. Corrects file missed from previous commit. 44032: GERMAN: Translation updates based on EN r43703. Corrects missing line break. 44059: Merged BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2 to BRANCHES/DEV/CLOUD1: 43797: Merged BRANCHES/DEV/FEATURES/CLOUD1_SOLR to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42526: Merged BRANCHES/DEV/V4.0-BUG-FIX, BRANCHES/V4.1, BRANCHES/DEV/4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_SOLR for CLOUD-798 V4.0-BUG_FIX 36393: Final part of ALF-13723 SOLR does not include the same query unit tests as lucene 36434: Test fix for ALF-13723 SOLR does not include the same query unit tests as lucene 36608: First part of ALF-14209 SOLR - does not support query for all stores 36676: Fix for ALF-14216 Solr Exception when you try to sort folders or files by size. 36954: ALF-14209 SOLR - does not support query for all stores 37075: Fix for ALF-14267 SOLR index check - First transaction time used instead of first ACL time - indexCheck, checkInitialState 37135: Fix for ALF-13993 It fails to find documents whose tag is longer than 255 characters 37253: Fix for ALF-13634 Re-created category won't show up again on a node in Document Library. 37384: Fix for ALF-14219 SolrQueryHTTPClient unable to handle long queries (4096 bytes) 37628: Build Fix 37749: Fix for ALF-14582 SOLR tracking allows incompatible model changed to the current index to be made 37863: Fix for ALF-14631 Extraneous Backslash in Solr Configuration File 37896: Fix for ALF-14582 SOLR tracking allows incompatible model changed to the current index to be made 38008: Fix for ALF-14042 Customisable Alfresco contextPath in Alfresco AbstractHttpClient (used e.g. by Solr CoreTracker) 38010: Fix for ALF-14686 https://localhost:8443/solr/admin/cores?action=CHECK - checks the index - it should check the cache V4.1 38179: Fix for ALF-14620 SOLR searches run by system user in archive store return fewer results than for admin user V4.1-BUG-FIX 40401: Part for for ALF-15406 Index Tracker seems not to gracefully stop upon shutdown keeping all other threads in waiting 41201: Fix for ALF-15767 Group query using cm:authorityName 41202: Additional unit tests related to ALF-15731 TYPE:"..." queries no longer work for Lucene on 4.X 41203: Part 1 for ALF-15811 SOLR query increases DocBitSet inefficiently 41210: Part 2: ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 41303: Fix for ALF-15799 Under high concurrency load balanced Solr throws an Antlr related NPE 41322: Fix for ALF-15858 SOLR ACL tracking can stall or miss acls during tracking 41323: Chemistry client java to create test data for ALF-15858, ALF-15782, CLOUD-596, ALF-15753 etc 41487: Fix for ALF-15910 SOLR - Add index warming and filter pointless entries from the filter cache Fix for ALF-15851 Too many live instances of SolrIndexSearcher at one time resulting in OOM - Alfresco 4.1.1 - build 151 41730: Fix for ALF-15995 NodeRef is missing in log on "Problem converting to Freemarker" error 41747: Fix for ALF-15811 SOLR query increases DocBitSet inefficiently Part of ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 41748: Fix for ALF-15950 Solr: throws NPE: org.alfresco.solr.SolrLuceneAnalyser.loadAnalyzer 41752: Fix for ALF-13634 Re-created category won't show up again on a node in Document Library. 41940: Fix for ALF-16086 SOLR tracking does not include transformation status etc (error in header name) 42136: Last SOLR side update for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 42143: In-memory bridge table for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 42183: Build fix - unit test runs in 64M - for all the washing machines out there .... 42547: Fix the model used for embedded tests. 42659: Add missing test model 42663: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_SOLR 42612: Further fix for ALF-16164 Cloud monitoring of SOLR is CPU intensive due to its repeated use of the SOLR stats page 42657: Fix for ALF-16359 Fix SOLR logging in production and other environments 42660: (RECORD ONLY) Merged DEV/CLOUD1 to DEV/FEATURES/CLOUD_SOLR working copy sync r42514 through r42659 43799: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42377: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 42363: ALF-16213: renaming versioned file results in file being deleted. 42411: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 42408: Merged BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC to BRANCHES/DEV/V4.1-BUG-FIX: 42389: CLOUD-796: handle unknown custom content/folder type 42396: CLOUD-796: handle unknown custom content/folder type 42397: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC: 41858: ALF-14444 - CloudSync: Ensure unknown properties when synced to Cloud are ignored properly 42406: CLOUD-796: handle unknown custom content/folder type 42409: CloudSync: CLOUD-796 / ALF-16226 - hide sync props in forms (eg. edit props) for sync'ed custom content type 42428: ALF-16217: Remove unnecessary restriction on content type 42432: CLOUD-795: Optimise activities feed: rollup multiple (WebDAV) document adds/deletes into a single activity 43802: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42559: Merged BRANCHES/DEV/CLOUD1_SPRINT1/ to BRANCHES/DEV/CLOUD1-BUG-FIX: 42548: CLOUD-712: Ensure that all CSS files are loaded in IE (latest Spring Surf libs r1170) 42565: CLOUD-837: TenantContentUsageImpl does not handle failed lock 43811: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42570: CLOUD-810: ""emailFeedDisabled" in person JSON needs to be called "emailNotificationsEnabled"" 43813: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42572: CLOUD-794: "Activities should be posted for CMIS (to enable both Public API + Mobile clients)" 42576: CLOUD-842: Activities Feed: post lookup - job lock + max items per cycle 42579: CLOUD-846: Minor optimisation for Site lookup (for a nodeRef) 43814: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42609: CLOUD-712: Updated Surf libs (r1171) to change the number of @import statements supported by each <style> element in IE from 32 to 31 43815: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42694: Fix build (merge issues) + fixes for CLOUD-839: "Activities Are Not Posted For Ratings", CLOUD-860: "Content Created With CMIS Cannot be Rated" and CLOUD-397: "The JSON response of the networks request is incorrect" 43816: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42737: CLOUD-463: Now checks if the current user has read permission for the shared node, before displaying "Document Details" button. 42847: CLOUD-794: "Activities should be posted for CMIS (to enable both Public API + Mobile clients)" 42868: Fix failing build tests + further/revised public api tests 42875: CLOUD-869: "Remove cmiscustom types from the CMIS dictionary" 42884: ALF-1059 / CLOUD-469: Post activities for folder(s) add + delete 42899: Fix build 43817: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42950: CLOUD-726: Ensure that i18n messages fall back to properties defined by less specific locale files (updated Surf libs: 1174) 43818: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43138: Fixed CLOUD-491 "'New Folder' form is not displayed on IE7, IE8" 43234: CLOUD-313: Implment Transport pooling in email sender. 43349: Fix CLOUD-918: Failed to delete folder via Folder Details page 43351: Fix CLOUD-905 - activity for Share folder delete are not displayed (OK via WebDAV) 43440: CLOUD-928: Cope with missing shredId attributes, due to the copying of QuickShare properties, prior to CLOUD-593 43451: Merged HEAD to BRANCHES/DEV/CLOUD1-BUG-FIX: 43449: ALF-16669: removing a site member may break the activity feed (CLOUD-931) 43819: Fix merge error 43820: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43465: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43821: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43477: Merged HEAD to BRANCHES/DEV/CLOUD1-BUG-FIX: 39205: Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD 39084: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.1-BUG-FIX 39081: Fix for ALF-6139 and ALF-13959 - Incomplete site creation issues - latest Surf libs and related changes to allow atomic creation of multiple Surf objects in a single REST call. Originally authored by Dave Ward for 3.2 - now migrated to SpringSurf. Implemented ADMRemoteStore changes for above change to apply to 4.0. 43488: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43822: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43537: ALF-16706: CLONE - POI becoming irresponsive and causing jvm to freeze with XLS that includes fraction formats 43520: ALF-16694 POI becoming irresponsive and causing jvm to freeze for a while with certain XLS (fraction formats) - Patched POI to: - limit the length of fractions to four digits (more than that takes too long to process) e.g. "# #/#####" is too long and will be reduced to "# #/####" which still takes about a second! - handle the -ve fraction format part (i.e. n in p;n;z), so its length is not interpret as part of the fraction format of the +ve fraction part. - handle custom formats a bit better (strip them) rather than interpret the text length as part of the fraction format - handle -ve fractions (just did not work) - limitations: - custom text gets stripped (still better than before) - formats that have p (+ve) and n (-ve) parts must include a fraction format in each part. Otherwise +ve and -ve values are not formatted as a fraction (still better than before) 43564: CLOUD-939: <Record Only> 43558: ALF-16694 POI becoming irresponsive and causing jvm to freeze with XLS that includes fraction formats - Original jar did not get removed in previous commit << NO NEED TO MERGE TO CLOUD1-BUG-FIX as there was a tree conflict and the original jar was removed. >> 43823: Fix merge error 43824: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43579: Public api test, fix intermittent test failures (hopefully) 43721: CLOUD-935: Update thor override of remoteadm.post.desc.xml 43726: PUBLICAPI-11: "Extract metadata needs to be called after uploading new content via CMIS" 43828: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43728: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/CLOUD1-BUG-FIX: 38211: CLOUD-115 - Remove Network Admins on downgrade to free/public 43829: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43731: Resolve CLOUD-965: A known config which has been tested can be modified when deploying to production 43733: PUBLICAPI-11: "Extract metadata needs to be called after uploading new content via CMIS" 43762: Fix the build 43830: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43788: CLOUD-942: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 39622: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39605: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - transformer.PdfBox.TextToPdf no longer does txt to pdf transform as OOo/JOD handles non western chars better and are not that much slower even for western encodings - It still does csv and xml to pdf - transformer.complex.Text.Pdf2swf now has a wild card first transformer for text to pdf (rather than transformer.PdfBox.TextToPdf) The 2nd transform is still transformer.Pdf2swf. As a result transformer.PdfBox.TextToPdf or the OOo/JOD transformers may be used. - transformer.complex.Archive.Pdf2swf now has a wild card first transformer for the same reason. - transformer.complex.Text.Image now has a wild card first transformer for the same reason. - Allow transformer config element supportedTransformations to wild card source or target mimetype 39692: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39679: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Fix build failures (not sure about RecordsManagementAuditServiceImplTest) - Reset some of the text to pdf / swf limits now OOo or JOD is used rather than PDFBox 40112: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 40111: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Patched jooconverter to handle non western characters in text files, by using the same properties that JOD uses. 40073: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Refactored JodContentTransformer and OpenOfficeContentTransformerWorker. Moved common code into OOoContentTransformerHelper, including fixes that existed on only one or the other. - For text files, change file encoding from SHIT JIS (and others) to UFT-8, as OpenOffice/LibreOffice do not support this as an input. They do support it in other file types but not text. JOD now works, but OOo still has problems. 43789: CLOUD-942: Add mergeinfo, missed by initial commit from Cornerstone. 43831: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43488: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43832: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43762: Fix the build 43833: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42692: (RECORD ONLY) Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1-BUG-FIX: 40859: public api: 40862: CLOUD-555: "Updating comment fails because node not found" 40961: CLOUD-566: "Site object shouldn't contain the "sitePreset" property" 40979: Added tests for non-numeric params and non-european characters 41030: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/THOR1_REST_API2: 41027: ALF-15193: "Folder Is Not a Folder CmisInvalidArgumentException thrown when using cmis:objectId" 41097: Added quickshare and cloudsync to cmis filter list 41098: Renamed serializer/deserializer lists for RestJsonModule 41099: Cleaned up consistent Rest responses - CLOUD-574 41100: Meta info webscript is disabled because its not been reviewed / in the correct format 41104: Meta info webscript is really disabled because its not been reviewed / in the correct format 41105: Added key for trusted layer7 relationship 41137: Public api: 41146: Fix trusted authentication against OpenCMIS 41168: Public apI; 41169: CLOUD-565: "API / URL returns a "tenant required" error" 41170: public api: 41171: public api: 41172: public api: 41183: CLOUD-598: "API: "GET network" response has unnecessary JSON nesting" 41186: Fix solrcore properties 41191: Fix for OpenCMIS trusted authentication to allow local opencmis access as before 41282: CLOUD-616: "CMIS API: Repository names should be more descriptive" 41283: CLOUD-601: "API /networkId/public/cmis/versions/ returns a 400" 41325: Public api: 41367: CLOUD-636: "REST API: Nodes: Tags: Not allowed DELETE method proceeds with status 204" 41369: Public api: 41422: Sample OAuth call for the Resource Owner Password flow 41427: Sample OAuth call for the Client Credentials flow 41433: Public api: (1) parameterize site members/people sorting in service api 41434: Public api: minor comment service fix 41438: CLOUD-629: "REST API: It is possible to add a comment to comment" 41439: Public api: fix for default tenant id in CMIS requests 41449: CLOUD-629: "REST API: It is possible to add a comment to comment" 41456: CLOUD-644: "Performing a Checkout in OpenCMIS Results in an Exception in the Share Doc Library" 41457: Fix build 41461: Public api: more tests 41521: CLOUD-660: "GET favourite sites results in exception when skipCount is greater than number of items" 41606: Fix for CLOUD-668 - POSTing to a relationship by id now returns an InvalidArgumentException 41607: CLOUD-668 : changed ordering so errors fire in correct order. 41628: Public api: more tests 41672: CLOUD-672: "404 Error when browsing child files/folder " 41673: Public api: more tests 41675: CLOUD-674: "Root network calls need to return application/json content type" 41790: CLOUD-629: "REST API: It is possible to add a comment to comment" 41791: CLOUD-629: "REST API: It is possible to add a comment to comment" 41793: CLOUD-629: "REST API: It is possible to add a comment to comment" 41823: Public api: more tests 41825: Fix for CLOUD-684 - wraps the list, not sure if I like the paging 41853: CLOUD-700: "The mobile SDK needs a way to map an accessToken to a user identifier" 41867: CLOUD-711: "It should be possible to remove a favourite site" 41957: Public api: - error handling improvements - more tests 41970: Public api: - fix build (add missing files) 41972: Public api: - more tests (including OpenCMIS TCK) 42046: Added some debug timings. Enabled using log4j.logger.org.alfresco.rest.framework.webscripts=debug 42058: Public api: changed logging package name 42124: Public api: - more tests - minor fixes 42125: CLOUD-734: "CMIS: Query Issues Discovered During Testing" 42126: Public api: fix up OpenCMIS tests 42171: Consistency fix for CLOUD-695. 42180: Fix build 42181: CLOUD-695 "Requests to un-implemented urls do not consistently return http status 405 (Method not allowed)": fix up public api tests 42214: Public api tests (cmis) 42251: Changed the serializer for embedded entities, (related to CLOUD-746) 42253: Fix build 42735: (RECORD ONLY) Fix build (fix merge error) 43834: Merged BRANCHES/DEV/FEATURES/CLOUD1_GOOGLEDOCS to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43702: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43703: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43744: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43846: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43840: [CLOUD-955] Add request header config to remove Origin Header in share proxy calls. 43855: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 41731: Fix for ALF-16002 - Dashlet - My Documents - I've recently modified - executes unlimited query. In SOLR unlimited (all sites query) is really unlimited, for Lucene it is not. Improved jscript Search debugging to correctly output limit value on query. 43881: Revert CLOUD-942: Reverse merge r43830 43885: CLOUD-942: Reapply changes backed out in r43881 and Comment out faling unit tests. 43921: Resolve CLOUD-990: REGRESS: No items error is displayed on DocumentLibrary Page (for some files) 43924: Disable intermittent OpenCMIS tests 43925: Disable intermittent test 43952: CLOUD-993: Insure login button is shown when user isn't logged in. 43992: Resolve CLOUD-1001: REGRESS: New Application Theme and Logo are not applied after re-login 44185: Merged BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE to BRANCHES/DEV/FEATURES/CLOUD1-EMAIL-REFRESH: 43021: CLOUD-803, CLOUD-487: Send localised e-mails 43024: CLOUD-486 - Choose UI language. 43085: CLOUD-803, CLOUD-487: Revert changes to pre-existing process(String, Object, Writer) method. 43086: CLOUD-803, CLOUD-487: Fix broken unit tests 43106: CLOUD-486 - Choose UI language. 43159: CLOUD-486 - Choose UI language. 43160: CLOUD-803, CLOUD-487: Fix broken unit tests 43182: CLOUD-803, CLOUD-487: Fix broken unit tests. 43230: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 42950: CLOUD-726: Ensure that i18n messages fall back to properties defined by less specific locale files (updated Surf libs: 1174) 43246: Bug fix for CLOUD-899. Added if to catch null values. 43267: CLOUD-486 - Choose UI language. 43329: CLOUD-911 - Localization change is not working in the preference page from CLOUD-486 - Fixed by setting cookie path to / 43626: CLOUD-909 - Keep Email address when language changes 43631: CLOUD-909 - Keep Email address when language changes - Updated Spring Surf version 43704: Enables all currently cloud supported languages in Cloud specific config file 43723: CLOUD-486 - Fix right border of select options and add extra languages 43880: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 43879: FRENCH: Translation updates based on EN r43703 43965: CLOUD-486 - Add French, German, Spanish, Italian and Japanese for new fields and pages. 43988: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 43983: GERMAN: Translation updates based on EN r43703 43984: SPANISH: Translation updates based on EN r43703 43985: FRENCH: Translation updates based on EN r43703, includes file missing from previous commit. 43986: ITALIAN: Translation updates based on EN r43703. 43987: JAPANESE: Translation updates based on EN r43703. 44021: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 42871: GERMAN: Cloud Translation, based on r 42416 42879: SPANISH: Cloud Translation, based on r 42416 42890: ITALIAN: Cloud Translation, based on r 42416 44026: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 44024: JAPANESE: Translation updates based on EN r43703. Corrects files missing from previous commit. 44033: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 44031: JAPANESE: Translation updates based on EN r43703. Corrects file missed from previous commit. 44032: GERMAN: Translation updates based on EN r43703. Corrects missing line break. 44077: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 43721: CLOUD-935: Update thor override of remoteadm.post.desc.xml 44093: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_UI_LANGUAGE: 42867: CLOUD-71: add explicit schema number for workflow timers redeploy patch 42871: (RECORD ONLY) GERMAN: Cloud Translation, based on r 42416 42879: (RECORD ONLY) SPANISH: Cloud Translation, based on r 42416 42890: (RECORD ONLY) ITALIAN: Cloud Translation, based on r 42416 43120: Merged BRANCHES/DEV/CLOUD1_CORS to BRANCHES/DEV/CLOUD1: 43100: Update the salesforce amp to include the CORS Filter 43101: Update web.xml to enable to the CORS Filter with filter-mapping 43117: Add updated amp with removed CORS Filter. CORS Filter is now available in 3rd-party libs 43118: [CLOUD-724] Add CORS Filter jar to 3rd-party libs 43119: [CLOUD-724] Add missing jar java-property-utils-1.6.jar to 3rd-party libs 43243: BDE-73: Fork for each test, otherwise some fail because of previous test leftovers 43323: Merged BRANCHES/DEV/FEATURES/CLOUD1_GRANULARPERMISSIONS1 to BRANCHES/DEV/CLOUD1: 42257: CLOUD-649: Updates UI action for Granular Permissions 42295: CLOUD-33: Updates labels 42303: CLOUD-651: Limit user search to site members only. 42352: CLOUD-780: Adds a rolesWhitelist to only display those roles that are allowed. Currently set to: ["Consumer", "Contributor", "Collaborator"]. This is only used in the site view. The Repository view behaviour has not changed. 42427: Removes multi-select manage-permissions dialogue. 42520: CLOUD-802: Change the way the user is returned to the previous page to work around suspected Chrome bug. 42604: CLOUD-840: Automatically add SiteManger permisions when inheritAll is switched off. Pervent remaoval of siteManager authority. 42606: Fixed CLOUD-840 "Granular Permissions: Site Manager should retain access when inherit permissions is turned off" 42807: CLOUD-863: Reordered code to avoid AccessDeniedException 43259: CLOUD-901: Revert showComments check so it handles undefined permission 43266: CLOUD-900: Old Manage permissions form is opened via Permissions panel 43307: CLOUD-900: Follow-up fix 43353: Fix for remote transform server with new cloud environment 43457: Merged BRANCHES/DEV/FEATURES/CLOUD1_GOOGLEDOCS to BRANCHES/DEV/CLOUD1: 39869: Merged BRANCHES/V4.1 to BRANCHES/DEV/FEATURES/CLOUD1_GOOGLEDOCS: Merged /integrations/GoogleDocs/BRANCHES/THOR1_SPRINTS_GOOGLEDOCS to BRANCHES/V4.1 36307 Fixed THOR-1402 "Need a callback option for Create Content menu" - Will be revisited to add better comments 36350 Fixed THOR-1402 "Need a callback option for Create Content menu" part 2 - Changed callback obj to match action object better: { nodeRef, node, jsNode } - Better code documentation - Removed dev/test code - Improved error config handling 36358 THOR-1402 "Need a callback option for Create Content menu" part 3 - Changed "link" parameter to "href" (instead of "page") to match actions. 39256 Consistency fix of doclib & repo toolbar templates after work on THOR-1402 39260 Bugfix for "destination" parameter not being resolved correctly THOR-1402 39875: Configurtion changes to enable Google Docs V2 within the web tier. 39881: It's extension ... not extention 39938: Update CLOUD1_GOOGLEDOCS ant build to include installing googledocs amp files 39944: CLOUD-437: Ensure that custom doclib action resources are requested after documentlist.js 40468: Alfresco GoogleDocs AMPS. Fixes for [GOOGLEDOCS-73], [GOOGLEDOCS-70], [GOOGLEDOCS-75], [GOOGLEDOCS-76] 40624: Update Google Docs AMPs 40635: Merge Google Docs Cloud AMPS to Feature Branchs 40824: Update Google Docs AMPS, fixing [GOOGLEDOCS-79] 40897: Google Docs AMP update 41165: Merge Updated AMPs for [GOOGLEDOCS-83] 41179: Update AMPs for [GOOGLEDOCS-87] 41262: Update AMPs for GOOGLEDOCS-89 41493: Update AMPs for [GOOGLEDOCS-93] 41635: AMP update for [GOOLGEDOCS-98] [GOOGLEDOCS-99] [GOOGLEDOCS-100] 41805: Update AMPs for [GOOGLEDOCS-101] 41840: Add AMPs with i18n strings 43316: (RECORD ONLY) Rebase CLOUD1_GOOGLEDOCS with CLOUD1 43317: (RECORD ONLY) Re-merge build.properties and projects.xml to include googledocs amps in build 43320: Add googledocs repo declaration 43538: Fix pesky solrcore.properties ... remove hardcoded amiller ;-) 43605: Merged BRANCHES/DEV/FEATURES/CLOUD1_TRIAL_NETWORK to BRANCHES/DEV/CLOUD1: 43033: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1_TRIAL_NETWORK: 39313: CLOUD-194: Add new trial network account type. 39332: CLOUD-194: Add translation for new network account type. 43218: CLOUD-194: Change Trail Network subscription level to Enterprise 43658: Merged HEAD to BRANCHES/DEV/CLOUD1: 43655: BDE-73: exclude more failing tests which are never run 43653: BDE-73: tune surefire config to make it pass with Sonar 3.3 43752: Merged HEAD to CLOUD1 BDE-73: Repair coverage report, broken since Sonar upgrade 43879: (RECORD ONLY) FRENCH: Translation updates based on EN r43703 43983: (RECORD ONLY) GERMAN: Translation updates based on EN r43703 43984: (RECORD ONLY) SPANISH: Translation updates based on EN r43703 43985: (RECORD ONLY) FRENCH: Translation updates based on EN r43703, includes file missing from previous commit. 43986: (RECORD ONLY) ITALIAN: Translation updates based on EN r43703. 43987: (RECORD ONLY) JAPANESE: Translation updates based on EN r43703. 43990: BDE-108: add workaround of http://jira.codehaus.org/browse/MNG-4979 in Maven Surefire configuration to be able to use JaCoCo easily 44059: Merged BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2 to BRANCHES/DEV/CLOUD1: 43797: Merged BRANCHES/DEV/FEATURES/CLOUD1_SOLR to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42526: Merged BRANCHES/DEV/V4.0-BUG-FIX, BRANCHES/V4.1, BRANCHES/DEV/4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_SOLR for CLOUD-798 V4.0-BUG_FIX 36393: Final part of ALF-13723 SOLR does not include the same query unit tests as lucene 36434: Test fix for ALF-13723 SOLR does not include the same query unit tests as lucene 36608: First part of ALF-14209 SOLR - does not support query for all stores 36676: Fix for ALF-14216 Solr Exception when you try to sort folders or files by size. 36954: ALF-14209 SOLR - does not support query for all stores 37075: Fix for ALF-14267 SOLR index check - First transaction time used instead of first ACL time - indexCheck, checkInitialState 37135: Fix for ALF-13993 It fails to find documents whose tag is longer than 255 characters 37253: Fix for ALF-13634 Re-created category won't show up again on a node in Document Library. 37384: Fix for ALF-14219 SolrQueryHTTPClient unable to handle long queries (4096 bytes) 37628: Build Fix 37749: Fix for ALF-14582 SOLR tracking allows incompatible model changed to the current index to be made 37863: Fix for ALF-14631 Extraneous Backslash in Solr Configuration File 37896: Fix for ALF-14582 SOLR tracking allows incompatible model changed to the current index to be made 38008: Fix for ALF-14042 Customisable Alfresco contextPath in Alfresco AbstractHttpClient (used e.g. by Solr CoreTracker) 38010: Fix for ALF-14686 https://localhost:8443/solr/admin/cores?action=CHECK - checks the index - it should check the cache V4.1 38179: Fix for ALF-14620 SOLR searches run by system user in archive store return fewer results than for admin user V4.1-BUG-FIX 40401: Part for for ALF-15406 Index Tracker seems not to gracefully stop upon shutdown keeping all other threads in waiting 41201: Fix for ALF-15767 Group query using cm:authorityName 41202: Additional unit tests related to ALF-15731 TYPE:"..." queries no longer work for Lucene on 4.X 41203: Part 1 for ALF-15811 SOLR query increases DocBitSet inefficiently 41210: Part 2: ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 41303: Fix for ALF-15799 Under high concurrency load balanced Solr throws an Antlr related NPE 41322: Fix for ALF-15858 SOLR ACL tracking can stall or miss acls during tracking 41323: Chemistry client java to create test data for ALF-15858, ALF-15782, CLOUD-596, ALF-15753 etc 41487: Fix for ALF-15910 SOLR - Add index warming and filter pointless entries from the filter cache Fix for ALF-15851 Too many live instances of SolrIndexSearcher at one time resulting in OOM - Alfresco 4.1.1 - build 151 41730: Fix for ALF-15995 NodeRef is missing in log on "Problem converting to Freemarker" error 41747: Fix for ALF-15811 SOLR query increases DocBitSet inefficiently Part of ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 41748: Fix for ALF-15950 Solr: throws NPE: org.alfresco.solr.SolrLuceneAnalyser.loadAnalyzer 41752: Fix for ALF-13634 Re-created category won't show up again on a node in Document Library. 41940: Fix for ALF-16086 SOLR tracking does not include transformation status etc (error in header name) 42136: Last SOLR side update for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 42143: In-memory bridge table for ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups 42183: Build fix - unit test runs in 64M - for all the washing machines out there .... 42547: Fix the model used for embedded tests. 42659: Add missing test model 42663: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_SOLR 42612: Further fix for ALF-16164 Cloud monitoring of SOLR is CPU intensive due to its repeated use of the SOLR stats page 42657: Fix for ALF-16359 Fix SOLR logging in production and other environments 42660: (RECORD ONLY) Merged DEV/CLOUD1 to DEV/FEATURES/CLOUD_SOLR working copy sync r42514 through r42659 43799: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42377: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 42363: ALF-16213: renaming versioned file results in file being deleted. 42411: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 42408: Merged BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC to BRANCHES/DEV/V4.1-BUG-FIX: 42389: CLOUD-796: handle unknown custom content/folder type 42396: CLOUD-796: handle unknown custom content/folder type 42397: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1_CLOUDSYNC: 41858: ALF-14444 - CloudSync: Ensure unknown properties when synced to Cloud are ignored properly 42406: CLOUD-796: handle unknown custom content/folder type 42409: CloudSync: CLOUD-796 / ALF-16226 - hide sync props in forms (eg. edit props) for sync'ed custom content type 42428: ALF-16217: Remove unnecessary restriction on content type 42432: CLOUD-795: Optimise activities feed: rollup multiple (WebDAV) document adds/deletes into a single activity 43802: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42559: Merged BRANCHES/DEV/CLOUD1_SPRINT1/ to BRANCHES/DEV/CLOUD1-BUG-FIX: 42548: CLOUD-712: Ensure that all CSS files are loaded in IE (latest Spring Surf libs r1170) 42565: CLOUD-837: TenantContentUsageImpl does not handle failed lock 43811: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42570: CLOUD-810: ""emailFeedDisabled" in person JSON needs to be called "emailNotificationsEnabled"" 43813: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42572: CLOUD-794: "Activities should be posted for CMIS (to enable both Public API + Mobile clients)" 42576: CLOUD-842: Activities Feed: post lookup - job lock + max items per cycle 42579: CLOUD-846: Minor optimisation for Site lookup (for a nodeRef) 43814: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42609: CLOUD-712: Updated Surf libs (r1171) to change the number of @import statements supported by each <style> element in IE from 32 to 31 43815: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42694: Fix build (merge issues) + fixes for CLOUD-839: "Activities Are Not Posted For Ratings", CLOUD-860: "Content Created With CMIS Cannot be Rated" and CLOUD-397: "The JSON response of the networks request is incorrect" 43816: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42737: CLOUD-463: Now checks if the current user has read permission for the shared node, before displaying "Document Details" button. 42847: CLOUD-794: "Activities should be posted for CMIS (to enable both Public API + Mobile clients)" 42868: Fix failing build tests + further/revised public api tests 42875: CLOUD-869: "Remove cmiscustom types from the CMIS dictionary" 42884: ALF-1059 / CLOUD-469: Post activities for folder(s) add + delete 42899: Fix build 43817: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42950: CLOUD-726: Ensure that i18n messages fall back to properties defined by less specific locale files (updated Surf libs: 1174) 43818: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43138: Fixed CLOUD-491 "'New Folder' form is not displayed on IE7, IE8" 43234: CLOUD-313: Implment Transport pooling in email sender. 43349: Fix CLOUD-918: Failed to delete folder via Folder Details page 43351: Fix CLOUD-905 - activity for Share folder delete are not displayed (OK via WebDAV) 43440: CLOUD-928: Cope with missing shredId attributes, due to the copying of QuickShare properties, prior to CLOUD-593 43451: Merged HEAD to BRANCHES/DEV/CLOUD1-BUG-FIX: 43449: ALF-16669: removing a site member may break the activity feed (CLOUD-931) 43819: Fix merge error 43820: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43465: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43821: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43477: Merged HEAD to BRANCHES/DEV/CLOUD1-BUG-FIX: 39205: Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD 39084: Merged BRANCHES/DEV/V3.4-BUG-FIX to BRANCHES/DEV/V4.1-BUG-FIX 39081: Fix for ALF-6139 and ALF-13959 - Incomplete site creation issues - latest Surf libs and related changes to allow atomic creation of multiple Surf objects in a single REST call. Originally authored by Dave Ward for 3.2 - now migrated to SpringSurf. Implemented ADMRemoteStore changes for above change to apply to 4.0. 43488: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43822: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43537: ALF-16706: CLONE - POI becoming irresponsive and causing jvm to freeze with XLS that includes fraction formats 43520: ALF-16694 POI becoming irresponsive and causing jvm to freeze for a while with certain XLS (fraction formats) - Patched POI to: - limit the length of fractions to four digits (more than that takes too long to process) e.g. "# #/#####" is too long and will be reduced to "# #/####" which still takes about a second! - handle the -ve fraction format part (i.e. n in p;n;z), so its length is not interpret as part of the fraction format of the +ve fraction part. - handle custom formats a bit better (strip them) rather than interpret the text length as part of the fraction format - handle -ve fractions (just did not work) - limitations: - custom text gets stripped (still better than before) - formats that have p (+ve) and n (-ve) parts must include a fraction format in each part. Otherwise +ve and -ve values are not formatted as a fraction (still better than before) 43564: CLOUD-939: <Record Only> 43558: ALF-16694 POI becoming irresponsive and causing jvm to freeze with XLS that includes fraction formats - Original jar did not get removed in previous commit << NO NEED TO MERGE TO CLOUD1-BUG-FIX as there was a tree conflict and the original jar was removed. >> 43823: Fix merge error 43824: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43579: Public api test, fix intermittent test failures (hopefully) 43721: CLOUD-935: Update thor override of remoteadm.post.desc.xml 43726: PUBLICAPI-11: "Extract metadata needs to be called after uploading new content via CMIS" 43828: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43728: Merged BRANCHES/DEV/AMILLER/CLOUD1 to BRANCHES/DEV/CLOUD1-BUG-FIX: 38211: CLOUD-115 - Remove Network Admins on downgrade to free/public 43829: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43731: Resolve CLOUD-965: A known config which has been tested can be modified when deploying to production 43733: PUBLICAPI-11: "Extract metadata needs to be called after uploading new content via CMIS" 43762: Fix the build 43830: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43788: CLOUD-942: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/CLOUD1-BUG-FIX: 39622: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39605: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - transformer.PdfBox.TextToPdf no longer does txt to pdf transform as OOo/JOD handles non western chars better and are not that much slower even for western encodings - It still does csv and xml to pdf - transformer.complex.Text.Pdf2swf now has a wild card first transformer for text to pdf (rather than transformer.PdfBox.TextToPdf) The 2nd transform is still transformer.Pdf2swf. As a result transformer.PdfBox.TextToPdf or the OOo/JOD transformers may be used. - transformer.complex.Archive.Pdf2swf now has a wild card first transformer for the same reason. - transformer.complex.Text.Image now has a wild card first transformer for the same reason. - Allow transformer config element supportedTransformations to wild card source or target mimetype 39692: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 39679: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Fix build failures (not sure about RecordsManagementAuditServiceImplTest) - Reset some of the text to pdf / swf limits now OOo or JOD is used rather than PDFBox 40112: ALF-9254: Merged V3.4-BUG-FIX (3.4.11) to V4.1-BUG-FIX (4.1.1) 40111: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Patched jooconverter to handle non western characters in text files, by using the same properties that JOD uses. 40073: ALF-15227 3.4 CLONE - Alfresco incapable of previewing text files including non Western European characters without custom configuration - Refactored JodContentTransformer and OpenOfficeContentTransformerWorker. Moved common code into OOoContentTransformerHelper, including fixes that existed on only one or the other. - For text files, change file encoding from SHIT JIS (and others) to UFT-8, as OpenOffice/LibreOffice do not support this as an input. They do support it in other file types but not text. JOD now works, but OOo still has problems. 43789: CLOUD-942: Add mergeinfo, missed by initial commit from Cornerstone. 43831: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43488: Fixed CLOUD-933 "Invite to site (alfresco.com network) takes 30 secs + (or even 2.5 mins +)" 43832: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43762: Fix the build 43833: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 42692: (RECORD ONLY) Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1-BUG-FIX: 40859: public api: 40862: CLOUD-555: "Updating comment fails because node not found" 40961: CLOUD-566: "Site object shouldn't contain the "sitePreset" property" 40979: Added tests for non-numeric params and non-european characters 41030: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/THOR1_REST_API2: 41027: ALF-15193: "Folder Is Not a Folder CmisInvalidArgumentException thrown when using cmis:objectId" 41097: Added quickshare and cloudsync to cmis filter list 41098: Renamed serializer/deserializer lists for RestJsonModule 41099: Cleaned up consistent Rest responses - CLOUD-574 41100: Meta info webscript is disabled because its not been reviewed / in the correct format 41104: Meta info webscript is really disabled because its not been reviewed / in the correct format 41105: Added key for trusted layer7 relationship 41137: Public api: 41146: Fix trusted authentication against OpenCMIS 41168: Public apI; 41169: CLOUD-565: "API / URL returns a "tenant required" error" 41170: public api: 41171: public api: 41172: public api: 41183: CLOUD-598: "API: "GET network" response has unnecessary JSON nesting" 41186: Fix solrcore properties 41191: Fix for OpenCMIS trusted authentication to allow local opencmis access as before 41282: CLOUD-616: "CMIS API: Repository names should be more descriptive" 41283: CLOUD-601: "API /networkId/public/cmis/versions/ returns a 400" 41325: Public api: 41367: CLOUD-636: "REST API: Nodes: Tags: Not allowed DELETE method proceeds with status 204" 41369: Public api: 41422: Sample OAuth call for the Resource Owner Password flow 41427: Sample OAuth call for the Client Credentials flow 41433: Public api: (1) parameterize site members/people sorting in service api 41434: Public api: minor comment service fix 41438: CLOUD-629: "REST API: It is possible to add a comment to comment" 41439: Public api: fix for default tenant id in CMIS requests 41449: CLOUD-629: "REST API: It is possible to add a comment to comment" 41456: CLOUD-644: "Performing a Checkout in OpenCMIS Results in an Exception in the Share Doc Library" 41457: Fix build 41461: Public api: more tests 41521: CLOUD-660: "GET favourite sites results in exception when skipCount is greater than number of items" 41606: Fix for CLOUD-668 - POSTing to a relationship by id now returns an InvalidArgumentException 41607: CLOUD-668 : changed ordering so errors fire in correct order. 41628: Public api: more tests 41672: CLOUD-672: "404 Error when browsing child files/folder " 41673: Public api: more tests 41675: CLOUD-674: "Root network calls need to return application/json content type" 41790: CLOUD-629: "REST API: It is possible to add a comment to comment" 41791: CLOUD-629: "REST API: It is possible to add a comment to comment" 41793: CLOUD-629: "REST API: It is possible to add a comment to comment" 41823: Public api: more tests 41825: Fix for CLOUD-684 - wraps the list, not sure if I like the paging 41853: CLOUD-700: "The mobile SDK needs a way to map an accessToken to a user identifier" 41867: CLOUD-711: "It should be possible to remove a favourite site" 41957: Public api: - error handling improvements - more tests 41970: Public api: - fix build (add missing files) 41972: Public api: - more tests (including OpenCMIS TCK) 42046: Added some debug timings. Enabled using log4j.logger.org.alfresco.rest.framework.webscripts=debug 42058: Public api: changed logging package name 42124: Public api: - more tests - minor fixes 42125: CLOUD-734: "CMIS: Query Issues Discovered During Testing" 42126: Public api: fix up OpenCMIS tests 42171: Consistency fix for CLOUD-695. 42180: Fix build 42181: CLOUD-695 "Requests to un-implemented urls do not consistently return http status 405 (Method not allowed)": fix up public api tests 42214: Public api tests (cmis) 42251: Changed the serializer for embedded entities, (related to CLOUD-746) 42253: Fix build 42735: (RECORD ONLY) Fix build (fix merge error) 43834: Merged BRANCHES/DEV/FEATURES/CLOUD1_GOOGLEDOCS to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43702: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43703: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43744: Fix CLOUD-950: Cannot create GoogleDoc in Synced Folder 43846: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 43840: [CLOUD-955] Add request header config to remove Origin Header in share proxy calls. 43855: Merged BRANCHES/DEV/V4.1-BUG-FIX to BRANCHES/DEV/FEATURES/CLOUD1-BUG-FIX2: 41731: Fix for ALF-16002 - Dashlet - My Documents - I've recently modified - executes unlimited query. In SOLR unlimited (all sites query) is really unlimited, for Lucene it is not. Improved jscript Search debugging to correctly output limit value on query. 43881: Revert CLOUD-942: Reverse merge r43830 43885: CLOUD-942: Reapply changes backed out in r43881 and Comment out faling unit tests. 43921: Resolve CLOUD-990: REGRESS: No items error is displayed on DocumentLibrary Page (for some files) 43924: Disable intermittent OpenCMIS tests 43925: Disable intermittent test 43952: CLOUD-993: Insure login button is shown when user isn't logged in. 43992: Resolve CLOUD-1001: REGRESS: New Application Theme and Logo are not applied after re-login 44196: CLOUD-678 - Incorrect link for 'To change your notifications settings, go here.' message 44201: CLOUD-486 - Choose UI language 44202: CLOUD-487: Fix emails after merge of template refresh and localised mail features 44414: JAPANESE: Cloud email template translation 44622: Fixes: CLOUD-1037 - removes unnecessary elements from inside the a tag. 44623: Cloud-189 - Corrects text and layout for already created email templates. 44624: Fixes: CLOUD-1044: Updates Email template 44625: Fixes: CLOUD-1042: Updates Email template 44626: Fixes: CLOUD-1043: Updates Email template 44627: Fixes: CLOUD-1041: Updates Email template 44764: CLOUD-1080: Fixes encoding error. 44767: CLOUD-1086: Text update to email template 44888: Email template updates - fixes CLOUD-1099 and CLOUD-1102. 44892: Fixes error with Activities email - the template fails to process if the only activities are based on follow events. It now processes and gets sent, but with some confusion, see CLOUD-1123 44914: Fixes CLOUD-1097 - Alt text not displaying due to unspecified image dimensions and colour. Also minor code clean up. 45145: CLOUD-1123 - Filter out "Following" activities from activity feed email. 45251: Email template text updates following review. 45289: Fix issue where email was not sent for 'Invite People' 45306: Externalises strings for cloud emails 45316: Adds some defensive code to prevent unused variables being a problem for templates. 45328: Email translation updates 45334: Resolve CLOUD-1162: Ability to change sign-up, reminder and reset password timer durations via properties 45369: Fixes Following Email template 45376: Resolve CLOUD-1172: Following email does not show domain correctly 45401: Corrects layout bug in email template 45407: Removes unnecessary full stop. 45408: Adds missing email template translations 45430: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1 to BRANCHES/DEV/FEATURES/CLOUD1-EMAIL-REFRESH: 45329: FRENCH: Cloud translation updates based on EN r45266 45330: GERMAN: Cloud translation updates based on EN r45266 45332: SPANISH: Cloud translation updates based on EN r45266 45333: JAPANESE: Cloud translation updates based on EN r45266 45427: SPANISH: Cloud 1 translation updates based on EN r45266 45453: Fix for CLOUD-1164 - Failed login is not handled correctly (on email refresh branch) 45474: Fixes: CLOUD-1189: Incorrect variable used in translated property files. 45484: Fixes: CLOUD-1190 incorrect quote marks in JA file 45487: CLOUD-1186: Fixes issue with reminder emails not being localised. 45501: Potential fix for: CLOUD-678 45503: Resolve CLOUD-1188: Emails are not rendered as HTML, even though they are HTML 45539: Resolve CLOUD-1195: Invite people email not rendering as HTML, even though it is HTML 45559: CLOUD-1197: Fixes issue with reset password template not recognising all the variables in all cases. 45579: Resolve CLOUD-1186: Email not localized, CLOUD-1202: Invite people / Invite site email sometimes comes in English and is not localized 45609: Resolve test failures introduced fixing CLOUD-1186 45613: Resolve CLOUD-1210: Locale is not replicated across tenants if a user has been invited to one or more secondary tenants 45616: Resolve CLOUD-1205: activities email template the feed are not localized 45642: Fixes: CLOUD-1211 and CLOUD-1212 - externalises two hard coded strings. Translations to follow. 45645: CLOUD-1205: activities email template the feed are not localized 45646: CLOUD-1203: Invite to Site and site reminder the role should be localized 45654: ALL LANG: Translation updates to email templates, following fixes made for CLOUD-1212, CLOUD-1211. 45678: Removes hidden chars at start of the file. 45680: Fixes more hidden chars that the start of UTF8 files. 45683: Fixes: CLOUD-1216: Typo in Italian properties file. 45693: Resolve CLOUD-1204: Task type in the workflow emails are not localized 45702: Minor translation updates following linguistic review. 45717: GERMAN: Translation updates based on linguistic review 45719: (RECORD ONLY) Merged BRANCHES/DEV/CLOUD1/ to BRANCHES/DEV/FEATURES/CLOUD1-EMAIL-REFRESH: 45718: ITALIAN: Translation updates based on EN r45266 (missed from previous bundle import) 45797: Resolve CLOUD-1226: The task details are not showing in localized details in task list 45798: Fix single quote encoding in language property file (related to CLOUD-1230, but does not resolve it across the board). 48304: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 48301: CONV: Revert temp logging (added in r47356) 48303: CONV: Fix CLOUD-1449 - cannot login to Share as MT (admin) user 48306: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47379: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: (note: web.xml reverted - initially will be covered by cloud overlay until public api is "merged") 41754: Merged BRANCHES/DEV/FEATURES/CLOUD1_LAYER7 to BRANCHES/DEV/CLOUD1: 41677: No-op skeletons of Public API gateway filter and URL rewrite filter 41683: Url rewrite rules for new and old-style public api 41705: First working version of gateway filter 41732: Trim authenticator keys from config 41734: Productising code - tests and bug fixing with layer7, code tidyup, configuration, error handling 41753: SSL support for accepting self-signed certificates 48307: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47382: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41842: CLOUD-619: "CMIS query for objectId throws exception" 47400: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 41843: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41790: CLOUD-629: "REST API: It is possible to add a comment to comment" 41791: CLOUD-629: "REST API: It is possible to add a comment to comment" 41793: CLOUD-629: "REST API: It is possible to add a comment to comment" 41823: Public api: more tests 41825: Fix for CLOUD-684 - wraps the list, not sure if I like the paging 48310: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47406: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 42206: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/CLOUD1: 41213: CLOUD-452: reconfigure Activities DAOs to use common Alfresco datasource 41214: CLOUD-452: reconfigure Activities DAOs to use common Alfresco datasource (DO NOT MERGE to Enterprise/HEAD) 41270: CLOUD-452 / ALF-15823: reconfigure Activities DAOs to use common Alfresco datasource 47408: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 42209: Merged BRANCHES/DEV/CLOUD1-BUG-FIX to BRANCHES/DEV/CLOUD1: 41292: CLOUD-520: Convert TicketCleanupJob to a StatfulJob 41410: CLOUD-119: Change status code to 409 (Conflict), from 400 (Bad Request), when parent folder does not exist 48311: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47416: Merged BRANCHES/DEV/CLOUD2 to BRANCHES/DEV/CONV_V413: 42285: Merged BRANCHES/DEV/THOR1_REST_API2 to BRANCHES/DEV/CLOUD1: 41867: CLOUD-711: "It should be possible to remove a favourite site" 41957: Public api: - error handling improvements - more tests 41970: Public api: - fix build (add missing files) 41972: Public api: - more tests (including OpenCMIS TCK) 42046: Added some debug timings. Enabled using log4j.logger.org.alfresco.rest.framework.webscripts=debug 42058: Public api: changed logging package name 42124: Public api: - more tests - minor fixes 42125: CLOUD-734: "CMIS: Query Issues Discovered During Testing" 42126: Public api: fix up OpenCMIS tests 42171: Consistency fix for CLOUD-695. 42180: Fix build 42181: CLOUD-695 "Requests to un-implemented urls do not consistently return http status 405 (Method not allowed)": fix up public api tests 42214: Public api tests (cmis) 42251: Changed the serializer for embedded entities, (related to CLOUD-746) 42253: Fix build 42320: Fix build (fix dodgy merge) 48313: Merged BRANCHES/DEV/CONV_V413 to BRANCHES/DEV/CONV_HEAD: 47492: Fix build/tests - CMISTest.testCancelCheckout & OpenCmisLocalTest.testALF10085 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@48347 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2929 lines
118 KiB
Java
2929 lines
118 KiB
Java
/*
|
|
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
|
*
|
|
* This file is part of Alfresco
|
|
*
|
|
* Alfresco is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Alfresco is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
package org.alfresco.repo.site;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Comparator;
|
|
import java.util.HashMap;
|
|
import java.util.HashSet;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.SortedSet;
|
|
import java.util.StringTokenizer;
|
|
import java.util.TreeSet;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Pattern;
|
|
|
|
import org.alfresco.error.AlfrescoRuntimeException;
|
|
import org.alfresco.model.ContentModel;
|
|
import org.alfresco.query.CannedQuery;
|
|
import org.alfresco.query.CannedQueryFactory;
|
|
import org.alfresco.query.CannedQueryPageDetails;
|
|
import org.alfresco.query.CannedQueryParameters;
|
|
import org.alfresco.query.CannedQueryResults;
|
|
import org.alfresco.query.CannedQuerySortDetails;
|
|
import org.alfresco.query.CannedQuerySortDetails.SortOrder;
|
|
import org.alfresco.query.PagingRequest;
|
|
import org.alfresco.query.PagingResults;
|
|
import org.alfresco.repo.activities.ActivityType;
|
|
import org.alfresco.repo.admin.SysAdminParams;
|
|
import org.alfresco.repo.cache.SimpleCache;
|
|
import org.alfresco.repo.node.NodeServicePolicies;
|
|
import org.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy;
|
|
import org.alfresco.repo.node.getchildren.FilterProp;
|
|
import org.alfresco.repo.node.getchildren.FilterPropString;
|
|
import org.alfresco.repo.node.getchildren.FilterPropString.FilterTypeString;
|
|
import org.alfresco.repo.node.getchildren.GetChildrenCannedQuery;
|
|
import org.alfresco.repo.node.getchildren.GetChildrenCannedQueryFactory;
|
|
import org.alfresco.repo.policy.BehaviourFilter;
|
|
import org.alfresco.repo.policy.JavaBehaviour;
|
|
import org.alfresco.repo.policy.PolicyComponent;
|
|
import org.alfresco.repo.search.impl.lucene.AbstractLuceneQueryParser;
|
|
import org.alfresco.repo.security.authentication.AuthenticationContext;
|
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
|
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
|
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
|
import org.alfresco.repo.tenant.TenantService;
|
|
import org.alfresco.repo.tenant.TenantUtil;
|
|
import org.alfresco.repo.tenant.TenantUtil.TenantRunAsWork;
|
|
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
|
import org.alfresco.service.cmr.activities.ActivityService;
|
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
|
import org.alfresco.service.cmr.model.FileFolderService;
|
|
import org.alfresco.service.cmr.model.FileInfo;
|
|
import org.alfresco.service.cmr.model.FileNotFoundException;
|
|
import org.alfresco.service.cmr.preference.PreferenceService;
|
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
|
import org.alfresco.service.cmr.repository.NodeRef;
|
|
import org.alfresco.service.cmr.repository.NodeService;
|
|
import org.alfresco.service.cmr.repository.StoreRef;
|
|
import org.alfresco.service.cmr.search.LimitBy;
|
|
import org.alfresco.service.cmr.search.ResultSet;
|
|
import org.alfresco.service.cmr.search.SearchParameters;
|
|
import org.alfresco.service.cmr.search.SearchService;
|
|
import org.alfresco.service.cmr.security.AccessPermission;
|
|
import org.alfresco.service.cmr.security.AccessStatus;
|
|
import org.alfresco.service.cmr.security.AuthorityService;
|
|
import org.alfresco.service.cmr.security.AuthorityService.AuthorityFilter;
|
|
import org.alfresco.service.cmr.security.AuthorityType;
|
|
import org.alfresco.service.cmr.security.NoSuchPersonException;
|
|
import org.alfresco.service.cmr.security.PermissionService;
|
|
import org.alfresco.service.cmr.security.PersonService;
|
|
import org.alfresco.service.cmr.security.PublicServiceAccessService;
|
|
import org.alfresco.service.cmr.site.SiteInfo;
|
|
import org.alfresco.service.cmr.site.SiteMemberInfo;
|
|
import org.alfresco.service.cmr.site.SiteService;
|
|
import org.alfresco.service.cmr.site.SiteVisibility;
|
|
import org.alfresco.service.cmr.tagging.TaggingService;
|
|
import org.alfresco.service.namespace.NamespaceService;
|
|
import org.alfresco.service.namespace.QName;
|
|
import org.alfresco.service.transaction.TransactionService;
|
|
import org.alfresco.util.Pair;
|
|
import org.alfresco.util.PropertyCheck;
|
|
import org.alfresco.util.PropertyMap;
|
|
import org.alfresco.util.registry.NamedObjectRegistry;
|
|
import org.apache.commons.logging.Log;
|
|
import org.apache.commons.logging.LogFactory;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
import org.springframework.context.ApplicationEvent;
|
|
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
|
import org.springframework.extensions.surf.util.ParameterCheck;
|
|
|
|
/**
|
|
* Site Service Implementation. Also bootstraps the site AVM and DM stores.
|
|
*
|
|
* @author Roy Wetherall
|
|
*/
|
|
public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServiceInternal, SiteModel, NodeServicePolicies.OnRestoreNodePolicy
|
|
{
|
|
/** Logger */
|
|
private static Log logger = LogFactory.getLog(SiteServiceImpl.class);
|
|
|
|
/** The DM store where site's are kept */
|
|
public static final StoreRef SITE_STORE = new StoreRef("workspace://SpacesStore");
|
|
|
|
/** Activity tool */
|
|
private static final String ACTIVITY_TOOL = "siteService";
|
|
|
|
private static final String SITE_PREFIX = "site_";
|
|
private static final String GROUP_SITE_PREFIX = PermissionService.GROUP_PREFIX + SITE_PREFIX;
|
|
private static final int GROUP_PREFIX_LENGTH = PermissionService.GROUP_PREFIX.length();
|
|
private static final int GROUP_SITE_PREFIX_LENGTH = GROUP_SITE_PREFIX.length();
|
|
|
|
// note: caches are tenant-aware (if using EhCacheAdapter shared cache)
|
|
|
|
private SimpleCache<String, Object> singletonCache; // eg. for siteHomeNodeRef
|
|
private final String KEY_SITEHOME_NODEREF = "key.sitehome.noderef";
|
|
|
|
private SimpleCache<String, NodeRef> siteNodeRefCache; // for site shortname to nodeRef lookup
|
|
|
|
private String sitesXPath;
|
|
|
|
/** Messages */
|
|
private static final String MSG_UNABLE_TO_CREATE = "site_service.unable_to_create";
|
|
private static final String MSG_SITE_SHORT_NAME_TOO_LONG = "site_service.short_name_too_long";
|
|
private static final String MSG_VISIBILITY_GROUP_MISSING = "site_service.visibility_group_missing";
|
|
private static final String MSG_CAN_NOT_UPDATE = "site_service.can_not_update";
|
|
private static final String MSG_CAN_NOT_DELETE = "site_service.can_not_delete";
|
|
private static final String MSG_CAN_NOT_REMOVE_MSHIP = "site_service.can_not_remove_membership";
|
|
private static final String MSG_DO_NOT_CHANGE_MGR = "site_service.do_not_change_manager";
|
|
private static final String MSG_CAN_NOT_CHANGE_MSHIP="site_service.can_not_change_membership";
|
|
private static final String MSG_SITE_CONTAINER_NOT_FOLDER = "site_service.site_container_not_folder";
|
|
private static final String MSG_INVALID_SITE_TYPE = "site_service.invalid_site_type";
|
|
|
|
/* Services */
|
|
private NodeService nodeService;
|
|
private NodeService directNodeService;
|
|
private FileFolderService fileFolderService;
|
|
private SearchService searchService;
|
|
private NamespaceService namespaceService;
|
|
private PreferenceService preferenceService;
|
|
private PermissionService permissionService;
|
|
private ActivityService activityService;
|
|
private PersonService personService;
|
|
private AuthenticationContext authenticationContext;
|
|
private TaggingService taggingService;
|
|
private AuthorityService authorityService;
|
|
private DictionaryService dictionaryService;
|
|
private TenantService tenantService;
|
|
private RetryingTransactionHelper retryingTransactionHelper;
|
|
private Comparator<String> roleComparator;
|
|
private SysAdminParams sysAdminParams;
|
|
private BehaviourFilter behaviourFilter;
|
|
private SitesPermissionCleaner sitesPermissionsCleaner;
|
|
private PolicyComponent policyComponent;
|
|
private PublicServiceAccessService publicServiceAccessService;
|
|
|
|
private NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry;
|
|
|
|
/**
|
|
* Set the path to the location of the sites root folder. For example:
|
|
* <pre>
|
|
* ./app:company_home/st:sites
|
|
* </pre>
|
|
* @param sitesXPath a valid XPath
|
|
*/
|
|
public void setSitesXPath(String sitesXPath)
|
|
{
|
|
this.sitesXPath = sitesXPath;
|
|
}
|
|
|
|
public void setPreferenceService(PreferenceService preferenceService)
|
|
{
|
|
this.preferenceService = preferenceService;
|
|
}
|
|
|
|
/**
|
|
* Set node service
|
|
*/
|
|
public void setNodeService(NodeService nodeService)
|
|
{
|
|
this.nodeService = nodeService;
|
|
}
|
|
|
|
/**
|
|
* Set the unprotected node service
|
|
*/
|
|
public void setDirectNodeService(NodeService directNodeService)
|
|
{
|
|
this.directNodeService = directNodeService;
|
|
}
|
|
|
|
/**
|
|
* Set file folder service
|
|
*/
|
|
public void setFileFolderService(FileFolderService fileFolderService)
|
|
{
|
|
this.fileFolderService = fileFolderService;
|
|
}
|
|
|
|
/**
|
|
* Set search service
|
|
*/
|
|
public void setSearchService(SearchService searchService)
|
|
{
|
|
this.searchService = searchService;
|
|
}
|
|
|
|
/**
|
|
* Set Namespace service
|
|
*/
|
|
public void setNamespaceService(NamespaceService namespaceService)
|
|
{
|
|
this.namespaceService = namespaceService;
|
|
}
|
|
|
|
/**
|
|
* Set permission service
|
|
*/
|
|
public void setPermissionService(PermissionService permissionService)
|
|
{
|
|
this.permissionService = permissionService;
|
|
}
|
|
|
|
/**
|
|
* Set activity service
|
|
*/
|
|
public void setActivityService(ActivityService activityService)
|
|
{
|
|
this.activityService = activityService;
|
|
}
|
|
|
|
/**
|
|
* Set person service
|
|
*/
|
|
public void setPersonService(PersonService personService)
|
|
{
|
|
this.personService = personService;
|
|
}
|
|
|
|
/**
|
|
* Set authentication component
|
|
*/
|
|
public void setAuthenticationContext(
|
|
AuthenticationContext authenticationContext)
|
|
{
|
|
this.authenticationContext = authenticationContext;
|
|
}
|
|
|
|
/**
|
|
* Set the tagging service
|
|
*/
|
|
public void setTaggingService(TaggingService taggingService)
|
|
{
|
|
this.taggingService = taggingService;
|
|
}
|
|
|
|
/**
|
|
* Set the authority service
|
|
*/
|
|
public void setAuthorityService(AuthorityService authorityService)
|
|
{
|
|
this.authorityService = authorityService;
|
|
}
|
|
|
|
/**
|
|
* Set the dictionary service
|
|
*
|
|
* @param dictionaryService dictionary service
|
|
*/
|
|
public void setDictionaryService(DictionaryService dictionaryService)
|
|
{
|
|
this.dictionaryService = dictionaryService;
|
|
}
|
|
|
|
/**
|
|
* Set the tenant service
|
|
*
|
|
* @param tenantService tenant service
|
|
*/
|
|
public void setTenantService(TenantService tenantService)
|
|
{
|
|
this.tenantService = tenantService;
|
|
}
|
|
|
|
public void setSingletonCache(SimpleCache<String, Object> singletonCache)
|
|
{
|
|
this.singletonCache = singletonCache;
|
|
}
|
|
|
|
public void setSiteNodeRefCache(SimpleCache<String, NodeRef> siteNodeRefCache)
|
|
{
|
|
this.siteNodeRefCache = siteNodeRefCache;
|
|
}
|
|
|
|
/**
|
|
* Sets helper that provides transaction callbacks
|
|
*/
|
|
public void setTransactionHelper(RetryingTransactionHelper retryingTransactionHelper)
|
|
{
|
|
this.retryingTransactionHelper = retryingTransactionHelper;
|
|
}
|
|
|
|
public void setPolicyComponent(PolicyComponent policyComponent)
|
|
{
|
|
this.policyComponent = policyComponent;
|
|
}
|
|
|
|
public void setRoleComparator(Comparator<String> roleComparator)
|
|
{
|
|
this.roleComparator = roleComparator;
|
|
}
|
|
|
|
public void setSysAdminParams(SysAdminParams sysAdminParams)
|
|
{
|
|
this.sysAdminParams = sysAdminParams;
|
|
}
|
|
|
|
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
|
|
{
|
|
this.behaviourFilter = behaviourFilter;
|
|
}
|
|
|
|
public void setSitesPermissionsCleaner(SitesPermissionCleaner sitesPermissionsCleaner)
|
|
{
|
|
this.sitesPermissionsCleaner = sitesPermissionsCleaner;
|
|
}
|
|
|
|
public void setPublicServiceAccessService(PublicServiceAccessService publicServiceAccessService)
|
|
{
|
|
this.publicServiceAccessService = publicServiceAccessService;
|
|
}
|
|
|
|
/**
|
|
* Set the registry of {@link CannedQueryFactory canned queries}
|
|
*/
|
|
public void setCannedQueryRegistry(NamedObjectRegistry<CannedQueryFactory<? extends Object>> cannedQueryRegistry)
|
|
{
|
|
this.cannedQueryRegistry = cannedQueryRegistry;
|
|
}
|
|
|
|
public Comparator<String> getRoleComparator()
|
|
{
|
|
return roleComparator;
|
|
}
|
|
|
|
/**
|
|
* Checks that all necessary properties and services have been provided.
|
|
*/
|
|
public void init()
|
|
{
|
|
PropertyCheck.mandatory(this, "nodeService", nodeService);
|
|
PropertyCheck.mandatory(this, "directNodeService", directNodeService);
|
|
PropertyCheck.mandatory(this, "fileFolderService", fileFolderService);
|
|
PropertyCheck.mandatory(this, "searchService", searchService);
|
|
PropertyCheck.mandatory(this, "namespaceService", namespaceService);
|
|
PropertyCheck.mandatory(this, "permissionService", permissionService);
|
|
PropertyCheck.mandatory(this, "authenticationContext", authenticationContext);
|
|
PropertyCheck.mandatory(this, "personService", personService);
|
|
PropertyCheck.mandatory(this, "activityService", activityService);
|
|
PropertyCheck.mandatory(this, "taggingService", taggingService);
|
|
PropertyCheck.mandatory(this, "authorityService", authorityService);
|
|
PropertyCheck.mandatory(this, "sitesXPath", sitesXPath);
|
|
}
|
|
|
|
/* (non-Javadoc)
|
|
* @see org.springframework.extensions.surf.util.AbstractLifecycleBean#onBootstrap(org.springframework.context.ApplicationEvent)
|
|
*/
|
|
@Override
|
|
protected void onBootstrap(ApplicationEvent event)
|
|
{
|
|
this.policyComponent.bindClassBehaviour(
|
|
OnRestoreNodePolicy.QNAME,
|
|
SiteModel.TYPE_SITE,
|
|
new JavaBehaviour(this, "onRestoreNode"));
|
|
}
|
|
|
|
/* (non-Javadoc)
|
|
* @see org.springframework.extensions.surf.util.AbstractLifecycleBean#onShutdown(org.springframework.context.ApplicationEvent)
|
|
*/
|
|
@Override
|
|
protected void onShutdown(ApplicationEvent event)
|
|
{
|
|
}
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see org.alfresco.service.cmr.site.SiteService#hasCreateSitePermissions()
|
|
*/
|
|
public boolean hasCreateSitePermissions()
|
|
{
|
|
// NOTE: see ALF-13580 - since 3.4.6 PermissionService.CONTRIBUTOR is no longer used as the default on the Sites folder
|
|
// instead the ability to call createSite() and the Spring configured ACL is the mechanism used to protect access.
|
|
return (publicServiceAccessService.hasAccess("SiteService", "createSite", "", "", "", "", true) == AccessStatus.ALLOWED);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#createSite(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
|
|
*/
|
|
public SiteInfo createSite(final String sitePreset,
|
|
String passedShortName,
|
|
final String title,
|
|
final String description,
|
|
final boolean isPublic)
|
|
{
|
|
// Determine the site visibility
|
|
SiteVisibility visibility = SiteVisibility.PRIVATE;
|
|
if (isPublic == true)
|
|
{
|
|
visibility = SiteVisibility.PUBLIC;
|
|
}
|
|
|
|
// Create the site
|
|
return createSite(sitePreset, passedShortName, title, description, visibility);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#createSite(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)
|
|
*/
|
|
public SiteInfo createSite(final String sitePreset,
|
|
String passedShortName,
|
|
final String title,
|
|
final String description,
|
|
final SiteVisibility visibility)
|
|
{
|
|
return createSite(sitePreset, passedShortName, title, description, visibility, SiteModel.TYPE_SITE);
|
|
}
|
|
|
|
public SiteInfo createSite(final String sitePreset,
|
|
String passedShortName,
|
|
final String title,
|
|
final String description,
|
|
final SiteVisibility visibility,
|
|
final QName siteType)
|
|
{
|
|
// Check that the provided site type is a subtype of TYPE_SITE
|
|
if (SiteModel.TYPE_SITE.equals(siteType) == false &&
|
|
dictionaryService.isSubClass(siteType, TYPE_SITE) == false)
|
|
{
|
|
throw new SiteServiceException(MSG_INVALID_SITE_TYPE, new Object[]{siteType});
|
|
}
|
|
|
|
// Remove spaces from shortName
|
|
final String shortName = passedShortName.replaceAll(" ", "");
|
|
|
|
// Check to see if we already have a site of this name
|
|
NodeRef existingSite = getSiteNodeRef(shortName, false);
|
|
if (existingSite != null)
|
|
{
|
|
// Throw an exception since we have a duplicate site name
|
|
throw new SiteServiceException(MSG_UNABLE_TO_CREATE, new Object[]{shortName});
|
|
}
|
|
|
|
// Check that the site name isn't too long
|
|
// Authorities are limited to 100 characters by the PermissionService
|
|
int longestPermissionLength = 0;
|
|
for (String permission : permissionService.getSettablePermissions(siteType))
|
|
{
|
|
if (permission.length() > longestPermissionLength)
|
|
longestPermissionLength = permission.length();
|
|
}
|
|
int maximumPermisionGroupLength = 99 - longestPermissionLength;
|
|
|
|
if (getSiteGroup(shortName, true).length() > maximumPermisionGroupLength)
|
|
{
|
|
throw new SiteServiceException(MSG_SITE_SHORT_NAME_TOO_LONG, new Object[] {
|
|
shortName, maximumPermisionGroupLength - getSiteGroup("", true).length()
|
|
});
|
|
}
|
|
|
|
// Get the site parent node reference
|
|
final NodeRef siteParent = getSiteParent(shortName);
|
|
if (siteParent == null)
|
|
{
|
|
throw new SiteServiceException("No root sites folder exists");
|
|
}
|
|
|
|
// Create the site node
|
|
final PropertyMap properties = new PropertyMap(4);
|
|
properties.put(ContentModel.PROP_NAME, shortName);
|
|
properties.put(SiteModel.PROP_SITE_PRESET, sitePreset);
|
|
properties.put(SiteModel.PROP_SITE_VISIBILITY, visibility.toString());
|
|
properties.put(ContentModel.PROP_TITLE, title);
|
|
properties.put(ContentModel.PROP_DESCRIPTION, description);
|
|
|
|
final NodeRef siteNodeRef = AuthenticationUtil.runAs(new RunAsWork<NodeRef>() {
|
|
@Override
|
|
public NodeRef doWork() throws Exception {
|
|
|
|
behaviourFilter.disableBehaviour(siteParent, ContentModel.ASPECT_AUDITABLE);
|
|
try
|
|
{
|
|
return nodeService.createNode(
|
|
siteParent,
|
|
ContentModel.ASSOC_CONTAINS,
|
|
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, shortName),
|
|
siteType,
|
|
properties
|
|
).getChildRef();
|
|
}
|
|
finally
|
|
{
|
|
behaviourFilter.enableBehaviour(siteParent, ContentModel.ASPECT_AUDITABLE);
|
|
}
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
|
|
// Make the new site a tag scope
|
|
this.taggingService.addTagScope(siteNodeRef);
|
|
|
|
// Clear the sites inherited permissions
|
|
this.permissionService.setInheritParentPermissions(siteNodeRef, false);
|
|
|
|
// Create the relevant groups and assign permissions
|
|
setupSitePermissions(siteNodeRef, shortName, visibility, null);
|
|
|
|
// Return created site information
|
|
Map<QName, Serializable> customProperties = getSiteCustomProperties(siteNodeRef);
|
|
SiteInfo siteInfo = new SiteInfoImpl(sitePreset, shortName, title, description, visibility, customProperties, siteNodeRef);
|
|
return siteInfo;
|
|
}
|
|
|
|
/**
|
|
* Setup the Site permissions.
|
|
* <p>
|
|
* Creates the top-level site group, plus all the Role groups required for users of the site.
|
|
* <p>
|
|
* Note - Changes here likely need to be replicated to the {@link #updateSite(SiteInfo)}
|
|
* method too, as that also has to deal with Site Permissions.
|
|
*
|
|
* @param siteNodeRef
|
|
* @param shortName
|
|
* @param visibility
|
|
*/
|
|
private void setupSitePermissions(
|
|
final NodeRef siteNodeRef, final String shortName, final SiteVisibility visibility, final Map<String, Set<String>> memberships)
|
|
{
|
|
// Get the current user
|
|
final String currentUser = authenticationContext.getCurrentUserName();
|
|
|
|
// Create the relevant groups and assign permissions
|
|
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
|
{
|
|
public String doWork() throws Exception
|
|
{
|
|
Set<String> shareZones = new HashSet<String>(2, 1.0f);
|
|
shareZones.add(AuthorityService.ZONE_APP_SHARE);
|
|
shareZones.add(AuthorityService.ZONE_AUTH_ALFRESCO);
|
|
|
|
// From Alfresco 3.4 the 'site public' group is configurable. Out of the box it is
|
|
// GROUP_EVERYONE so unconfigured behaviour is unchanged. But from 3.4, admins
|
|
// can change the value of property site.public.group via JMX/properties files
|
|
// to be another group of their choosing.
|
|
// This then is the group that is given SiteConsumer access to newly created
|
|
// public and moderated sites.
|
|
final String sitePublicGroup = sysAdminParams.getSitePublicGroup();
|
|
boolean publicGroupExists = authorityService.authorityExists(sitePublicGroup);
|
|
if (!PermissionService.ALL_AUTHORITIES.equals(sitePublicGroup) && !publicGroupExists
|
|
&& !SiteVisibility.PRIVATE.equals(visibility))
|
|
{
|
|
// If the group specified in the settings does not exist, we cannot create the site.
|
|
throw new SiteServiceException(MSG_VISIBILITY_GROUP_MISSING, new Object[]{sitePublicGroup});
|
|
}
|
|
|
|
// Create the site's groups
|
|
String siteGroupShortName = getSiteGroup(shortName, false);
|
|
String siteGroup = authorityService.createAuthority(AuthorityType.GROUP, siteGroupShortName,
|
|
siteGroupShortName, shareZones);
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
Set<String> permissions = permissionService.getSettablePermissions(siteType);
|
|
for (String permission : permissions)
|
|
{
|
|
// Create a group for the permission
|
|
String permissionGroupShortName = getSiteRoleGroup(shortName, permission, false);
|
|
String permissionGroup = authorityService.createAuthority(AuthorityType.GROUP,
|
|
permissionGroupShortName, permissionGroupShortName, shareZones);
|
|
authorityService.addAuthority(siteGroup, permissionGroup);
|
|
|
|
// add any supplied memberships to it
|
|
String siteRoleGroup = getSiteRoleGroup(shortName, permission, true);
|
|
if (memberships != null && memberships.containsKey(siteRoleGroup))
|
|
{
|
|
for (String authority : memberships.get(siteRoleGroup))
|
|
{
|
|
authorityService.addAuthority(siteRoleGroup, authority);
|
|
}
|
|
}
|
|
|
|
// Assign the group the relevant permission on the site
|
|
permissionService.setPermission(siteNodeRef, permissionGroup, permission, true);
|
|
}
|
|
|
|
// Set the memberships details
|
|
// - give all authorities site consumer if site is public
|
|
// - give all authorities read properties if site is moderated
|
|
// - give all authorities read permission on permissions so
|
|
// memberships can be calculated
|
|
// - add the current user to the site manager group
|
|
if (SiteVisibility.PUBLIC.equals(visibility) == true &&
|
|
permissions.contains(SITE_CONSUMER))
|
|
{
|
|
// The public site group becomes the consumer
|
|
permissionService.setPermission(siteNodeRef, sitePublicGroup, SITE_CONSUMER, true);
|
|
}
|
|
else if (SiteVisibility.MODERATED.equals(visibility) == true &&
|
|
permissions.contains(SITE_CONSUMER))
|
|
{
|
|
// For moderated sites, the Public Group has consumer access to the
|
|
// site root, but not to site components.
|
|
permissionService.setPermission(siteNodeRef, sitePublicGroup, SITE_CONSUMER, true);
|
|
|
|
// Permissions will be set on the site components as they get created
|
|
}
|
|
|
|
// No matter what, everyone must be able to read permissions on
|
|
// the site, so they can check to see if they're a member or not
|
|
permissionService.setPermission(siteNodeRef,
|
|
PermissionService.ALL_AUTHORITIES,
|
|
PermissionService.READ_PERMISSIONS, true);
|
|
if (memberships == null)
|
|
{
|
|
// add the default site manager authority
|
|
authorityService.addAuthority(getSiteRoleGroup(shortName,
|
|
SiteModel.SITE_MANAGER, true), currentUser);
|
|
}
|
|
|
|
// Return nothing
|
|
return null;
|
|
}
|
|
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
}
|
|
|
|
/**
|
|
* Gets a map containing the site's custom properties
|
|
*
|
|
* @return Map<QName, Serializable> map containing the custom properties of the site
|
|
*/
|
|
private Map<QName, Serializable> getSiteCustomProperties(Map<QName, Serializable> properties)
|
|
{
|
|
Map<QName, Serializable> customProperties = new HashMap<QName, Serializable>(4);
|
|
|
|
for (Map.Entry<QName, Serializable> entry : properties.entrySet())
|
|
{
|
|
if (entry.getKey().getNamespaceURI().equals(SITE_CUSTOM_PROPERTY_URL) == true)
|
|
{
|
|
customProperties.put(entry.getKey(), entry.getValue());
|
|
}
|
|
}
|
|
|
|
return customProperties;
|
|
}
|
|
|
|
/**
|
|
* Gets a map containing the site's custom properties
|
|
*
|
|
* @return Map<QName, Serializable> map containing the custom properties of the site
|
|
*/
|
|
private Map<QName, Serializable> getSiteCustomProperties(NodeRef siteNodeRef)
|
|
{
|
|
Map<QName, Serializable> customProperties = new HashMap<QName, Serializable>(4);
|
|
Map<QName, Serializable> properties = directNodeService.getProperties(siteNodeRef);
|
|
|
|
for (Map.Entry<QName, Serializable> entry : properties.entrySet())
|
|
{
|
|
if (entry.getKey().getNamespaceURI().equals(SITE_CUSTOM_PROPERTY_URL) == true)
|
|
{
|
|
customProperties.put(entry.getKey(), entry.getValue());
|
|
}
|
|
}
|
|
|
|
return customProperties;
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSiteGroup(java.lang.String)
|
|
*/
|
|
public String getSiteGroup(String shortName)
|
|
{
|
|
return getSiteGroup(shortName, true);
|
|
}
|
|
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSiteRoleGroup(java.lang.String,
|
|
* java.lang.String)
|
|
*/
|
|
public String getSiteRoleGroup(String shortName, String role)
|
|
{
|
|
return getSiteRoleGroup(shortName, role, true);
|
|
}
|
|
|
|
/**
|
|
* Helper method to get the name of the site group
|
|
*
|
|
* @param shortName site short name
|
|
* @return String site group name
|
|
*/
|
|
public String getSiteGroup(String shortName, boolean withGroupPrefix)
|
|
{
|
|
StringBuffer sb = new StringBuffer(64);
|
|
if (withGroupPrefix == true)
|
|
{
|
|
sb.append(PermissionService.GROUP_PREFIX);
|
|
}
|
|
sb.append(SITE_PREFIX);
|
|
sb.append(shortName);
|
|
return sb.toString();
|
|
}
|
|
|
|
/**
|
|
* Helper method to get the name of the site permission group
|
|
*
|
|
* @param shortName site short name
|
|
* @param permission permission name
|
|
* @param withGroupPrefix - should the name have the GROUP_ prefix?
|
|
* @return String site permission group name
|
|
*/
|
|
public String getSiteRoleGroup(String shortName, String permission, boolean withGroupPrefix)
|
|
{
|
|
return getSiteGroup(shortName, withGroupPrefix) + '_' + permission;
|
|
}
|
|
|
|
/**
|
|
* Gets a sites parent folder based on it's short name
|
|
*
|
|
* @param shortName site short name
|
|
* @return NodeRef the site's parent
|
|
*/
|
|
private NodeRef getSiteParent(String shortName)
|
|
{
|
|
// TODO: For now just return the site root, later we may build folder
|
|
// structure based on the shortname to spread the sites about
|
|
return getSiteRoot();
|
|
}
|
|
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
public NodeRef getSiteRoot()
|
|
{
|
|
NodeRef siteHomeRef = (NodeRef)singletonCache.get(KEY_SITEHOME_NODEREF);
|
|
if (siteHomeRef == null)
|
|
{
|
|
siteHomeRef = AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
|
{
|
|
public NodeRef doWork() throws Exception
|
|
{
|
|
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
|
|
{
|
|
public NodeRef execute() throws Exception
|
|
{
|
|
NodeRef result = null;
|
|
|
|
// Get the root 'sites' folder
|
|
NodeRef rootNodeRef = directNodeService.getRootNode(SITE_STORE);
|
|
List<NodeRef> results = searchService.selectNodes(
|
|
rootNodeRef,
|
|
sitesXPath,
|
|
null,
|
|
namespaceService,
|
|
false,
|
|
SearchService.LANGUAGE_XPATH);
|
|
if (results.size() != 0)
|
|
{
|
|
result = results.get(0);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}, true);
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
|
|
// There may be domains with no sites (e.g. JSF-only clients).
|
|
if (siteHomeRef != null)
|
|
{
|
|
singletonCache.put(KEY_SITEHOME_NODEREF, siteHomeRef);
|
|
}
|
|
}
|
|
return siteHomeRef;
|
|
}
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see org.alfresco.service.cmr.site.SiteService#findSites(java.lang.String, java.lang.String, int)
|
|
*/
|
|
@Override
|
|
public List<SiteInfo> findSites(String filter, String sitePresetFilter, int size)
|
|
{
|
|
List<SiteInfo> result;
|
|
|
|
NodeRef siteRoot = getSiteRoot();
|
|
if (siteRoot == null)
|
|
{
|
|
result = Collections.emptyList();
|
|
}
|
|
else
|
|
{
|
|
// get the sites that match the specified names
|
|
StringBuilder query = new StringBuilder(128);
|
|
query.append("+PARENT:\"").append(siteRoot.toString()).append('"');
|
|
|
|
final boolean filterIsPresent = filter != null && filter.length() > 0;
|
|
// The filter string is only used in the Lucene query if it restricts results.
|
|
// A search for name/title/description = "*" does not need to be put into the Lucene query.
|
|
// This allows users to search for "*" in the site-finder.
|
|
final boolean filterIsPresentAndNecessary = filterIsPresent && !filter.equals("*");
|
|
final boolean sitePresetFilterIsPresent = sitePresetFilter != null && sitePresetFilter.length() > 0;
|
|
|
|
if (filterIsPresentAndNecessary || sitePresetFilterIsPresent)
|
|
{
|
|
query.append(" +(");
|
|
if (filterIsPresentAndNecessary)
|
|
{
|
|
String escNameFilter = AbstractLuceneQueryParser.escape(filter.replace('"', ' '));
|
|
|
|
query.append(" @cm\\:name:\"*" + escNameFilter + "*\"")
|
|
.append(" @cm\\:title:\"" + escNameFilter + "\"")
|
|
.append(" @cm\\:description:\"" + escNameFilter + "\"");
|
|
}
|
|
if (sitePresetFilterIsPresent)
|
|
{
|
|
String escPresetFilter = AbstractLuceneQueryParser.escape(sitePresetFilter.replace('"', ' '));
|
|
query.append(" @st\\:sitePreset:\"" + escPresetFilter + "\"");
|
|
}
|
|
|
|
query.append(")");
|
|
}
|
|
|
|
SearchParameters sp = new SearchParameters();
|
|
sp.addStore(siteRoot.getStoreRef());
|
|
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
|
sp.setQuery(query.toString());
|
|
if (size > 0)
|
|
{
|
|
sp.setLimit(size);
|
|
sp.setLimitBy(LimitBy.FINAL_SIZE);
|
|
}
|
|
ResultSet results = this.searchService.query(sp);
|
|
try
|
|
{
|
|
result = new ArrayList<SiteInfo>(results.length());
|
|
for (NodeRef site : results.getNodeRefs())
|
|
{
|
|
// Ignore any node type that is not a "site"
|
|
QName siteClassName = this.nodeService.getType(site);
|
|
if (this.dictionaryService.isSubClass(siteClassName, SiteModel.TYPE_SITE))
|
|
{
|
|
result.add(createSiteInfo(site));
|
|
}
|
|
}
|
|
}
|
|
finally
|
|
{
|
|
results.close();
|
|
}
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#listSites(java.lang.String, java.lang.String)
|
|
*/
|
|
public List<SiteInfo> listSites(String nameFilter, String sitePresetFilter)
|
|
{
|
|
return listSites(nameFilter, sitePresetFilter, -1);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#listSites(java.lang.String, java.lang.String, int)
|
|
*/
|
|
public List<SiteInfo> listSites(final String filter, final String sitePresetFilter, int size)
|
|
{
|
|
List<SiteInfo> result = Collections.emptyList();
|
|
|
|
NodeRef siteRoot = getSiteRoot();
|
|
if (siteRoot != null)
|
|
{
|
|
final boolean filterHasValue = filter != null && filter.length() != 0;
|
|
final boolean sitePresetFilterHasValue = sitePresetFilter != null && sitePresetFilter.length() > 0;
|
|
|
|
List<Pair<QName, Boolean>> sortProps = null;
|
|
|
|
PagingRequest pagingRequest = new PagingRequest(size <= 0 ? Integer.MAX_VALUE : size);
|
|
List<FilterProp> filterProps = new ArrayList<FilterProp>();
|
|
|
|
if (filterHasValue)
|
|
{
|
|
filterProps.add(new FilterPropString(ContentModel.PROP_NAME, filter, FilterTypeString.STARTSWITH_IGNORECASE));
|
|
filterProps.add(new FilterPropString(ContentModel.PROP_TITLE, filter, FilterTypeString.STARTSWITH_IGNORECASE));
|
|
filterProps.add(new FilterPropString(ContentModel.PROP_DESCRIPTION, filter, FilterTypeString.STARTSWITH_IGNORECASE));
|
|
}
|
|
if (sitePresetFilterHasValue)
|
|
{
|
|
filterProps.add(new FilterPropString(SiteModel.PROP_SITE_PRESET, sitePresetFilter, FilterTypeString.EQUALS));
|
|
}
|
|
|
|
PagingResults<SiteInfo> allSites = listSites(filterProps, sortProps, pagingRequest);
|
|
result = allSites.getPage();
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
/*
|
|
* (non-Javadoc)
|
|
* @see org.alfresco.service.cmr.site.SiteService#listSites(java.lang.String)
|
|
*/
|
|
public List<SiteInfo> listSites(final String userName)
|
|
{
|
|
return listSites(userName, 0);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#listSites(java.lang.String, int)
|
|
*/
|
|
public List<SiteInfo> listSites(final String userName, final int size)
|
|
{
|
|
// MT share - for activity service system callback
|
|
if (tenantService.isEnabled() && (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil.getRunAsUser())) && tenantService.isTenantUser(userName))
|
|
{
|
|
final String tenantDomain = tenantService.getUserDomain(userName);
|
|
|
|
return TenantUtil.runAsSystemTenant(new TenantRunAsWork<List<SiteInfo>>()
|
|
{
|
|
public List<SiteInfo> doWork() throws Exception
|
|
{
|
|
return listSitesImpl(userName, size);
|
|
}
|
|
}, tenantDomain);
|
|
}
|
|
else
|
|
{
|
|
return listSitesImpl(userName, size);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* This method uses {@link CannedQuery canned queries} to retrieve {@link SiteModel#TYPE_SITE st:site} NodeRefs
|
|
* with support for {@link PagingRequest result paging}.
|
|
*/
|
|
@Override
|
|
public PagingResults<SiteInfo> listSites(List<FilterProp> filterProps, List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest)
|
|
{
|
|
// Only search for "st:site" nodes.
|
|
final Set<QName> searchTypeQNames = new HashSet<QName>(1);
|
|
searchTypeQNames.add(SiteModel.TYPE_SITE);
|
|
// ... and all subtypes of st:site
|
|
searchTypeQNames.addAll(dictionaryService.getSubTypes(SiteModel.TYPE_SITE, true));
|
|
|
|
// get canned query
|
|
final String cQBeanName = "siteGetChildrenCannedQueryFactory";
|
|
GetChildrenCannedQueryFactory getChildrenCannedQueryFactory = (GetChildrenCannedQueryFactory)cannedQueryRegistry.getNamedObject(cQBeanName);
|
|
|
|
GetChildrenCannedQuery cq = (GetChildrenCannedQuery)getChildrenCannedQueryFactory.getCannedQuery(getSiteRoot(), null, null, searchTypeQNames,
|
|
filterProps, sortProps, pagingRequest);
|
|
|
|
// execute canned query
|
|
final CannedQueryResults<NodeRef> results = cq.execute();
|
|
|
|
// Now convert the CannedQueryResults<NodeRef> into a more useful PagingResults<SiteInfo>
|
|
List<NodeRef> nodeRefs = Collections.emptyList();
|
|
if (results.getPageCount() > 0)
|
|
{
|
|
nodeRefs = results.getPages().get(0);
|
|
}
|
|
|
|
// set total count
|
|
final Pair<Integer, Integer> totalCount;
|
|
if (pagingRequest.getRequestTotalCountMax() > 0)
|
|
{
|
|
totalCount = results.getTotalResultCount();
|
|
}
|
|
else
|
|
{
|
|
totalCount = null;
|
|
}
|
|
|
|
final List<SiteInfo> siteInfos = new ArrayList<SiteInfo>(nodeRefs.size());
|
|
for (NodeRef nodeRef : nodeRefs)
|
|
{
|
|
siteInfos.add(createSiteInfo(nodeRef));
|
|
}
|
|
|
|
return new PagingResults<SiteInfo>()
|
|
{
|
|
@Override
|
|
public String getQueryExecutionId()
|
|
{
|
|
return results.getQueryExecutionId();
|
|
}
|
|
|
|
@Override
|
|
public List<SiteInfo> getPage()
|
|
{
|
|
return siteInfos;
|
|
}
|
|
|
|
@Override
|
|
public boolean hasMoreItems()
|
|
{
|
|
return results.hasMoreItems();
|
|
}
|
|
|
|
@Override
|
|
public Pair<Integer, Integer> getTotalResultCount()
|
|
{
|
|
return totalCount;
|
|
}
|
|
};
|
|
}
|
|
|
|
/**
|
|
* This method returns the {@link SiteInfo siteInfos} for sites to which the specified user has access.
|
|
* Note that if the user has access to more than 1000 sites, the list will be truncated to 1000 entries.
|
|
*
|
|
* @param userName the username
|
|
* @return a list of {@link SiteInfo site infos}.
|
|
*/
|
|
public String resolveSite(String group)
|
|
{
|
|
// purge non Site related Groups and strip the group name down to the site "shortName" it relates too
|
|
if (group.startsWith(GROUP_SITE_PREFIX))
|
|
{
|
|
int roleIndex = group.lastIndexOf('_');
|
|
if (roleIndex + 1 <= GROUP_SITE_PREFIX_LENGTH)
|
|
{
|
|
// There is no role associated
|
|
return group.substring(GROUP_SITE_PREFIX_LENGTH);
|
|
}
|
|
else
|
|
{
|
|
return group.substring(GROUP_SITE_PREFIX_LENGTH, roleIndex);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
private List<SiteInfo> listSitesImpl(final String userName, int size)
|
|
{
|
|
final int maxResults = size > 0 ? size : 1000;
|
|
final Set<String> siteNames = new TreeSet<String>();
|
|
authorityService.getContainingAuthoritiesInZone(AuthorityType.GROUP, userName, AuthorityService.ZONE_APP_SHARE, new AuthorityFilter(){
|
|
@Override
|
|
public boolean includeAuthority(String authority)
|
|
{
|
|
if (siteNames.size() < maxResults)
|
|
{
|
|
String siteName = resolveSite(authority);
|
|
if (siteName == null)
|
|
{
|
|
return false;
|
|
}
|
|
return siteNames.add(siteName);
|
|
}
|
|
return false;
|
|
}}, maxResults);
|
|
if (siteNames.isEmpty())
|
|
{
|
|
return Collections.emptyList();
|
|
}
|
|
List<ChildAssociationRef> assocs = this.nodeService.getChildrenByName(
|
|
getSiteRoot(),
|
|
ContentModel.ASSOC_CONTAINS,
|
|
siteNames);
|
|
List<SiteInfo> result = new ArrayList<SiteInfo>(assocs.size());
|
|
for (ChildAssociationRef assoc : assocs)
|
|
{
|
|
// Ignore any node that is not a "site" type
|
|
NodeRef site = assoc.getChildRef();
|
|
QName siteClassName = this.directNodeService.getType(site);
|
|
if (this.dictionaryService.isSubClass(siteClassName, SiteModel.TYPE_SITE))
|
|
{
|
|
result.add(createSiteInfo(site));
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Creates a site information object given a site node reference
|
|
*
|
|
* @param siteNodeRef
|
|
* site node reference
|
|
* @return SiteInfo site information object
|
|
*/
|
|
private SiteInfo createSiteInfo(NodeRef siteNodeRef)
|
|
{
|
|
SiteInfo siteInfo = null;
|
|
|
|
// Get the properties
|
|
Map<QName, Serializable> properties = this.directNodeService.getProperties(siteNodeRef);
|
|
String shortName = (String) properties.get(ContentModel.PROP_NAME);
|
|
String sitePreset = (String) properties.get(PROP_SITE_PRESET);
|
|
String title = (String) properties.get(ContentModel.PROP_TITLE);
|
|
String description = (String) properties.get(ContentModel.PROP_DESCRIPTION);
|
|
|
|
// Get the visibility of the site
|
|
SiteVisibility visibility = getSiteVisibility(siteNodeRef);
|
|
|
|
// Create and return the site information
|
|
Map<QName, Serializable> customProperties = getSiteCustomProperties(properties);
|
|
siteInfo = new SiteInfoImpl(sitePreset, shortName, title, description, visibility, customProperties, siteNodeRef);
|
|
|
|
return siteInfo;
|
|
}
|
|
|
|
/**
|
|
* Helper method to get the visibility of the site. If no value is present in the repository then it is calculated from the
|
|
* set permissions. This will maintain backwards compatibility with earlier versions of the service implementation.
|
|
*
|
|
* @param siteNodeRef site node reference
|
|
* @return SiteVisibility site visibility
|
|
*/
|
|
private SiteVisibility getSiteVisibility(NodeRef siteNodeRef)
|
|
{
|
|
SiteVisibility visibility = SiteVisibility.PRIVATE;
|
|
|
|
// Get the visibility value stored in the repo
|
|
String visibilityValue = (String)this.directNodeService.getProperty(siteNodeRef, SiteModel.PROP_SITE_VISIBILITY);
|
|
|
|
// To maintain backwards compatibility calculate the visibility from the permissions
|
|
// if there is no value specified on the site node
|
|
if (visibilityValue == null)
|
|
{
|
|
// Examine each permission to see if this is a public site or not
|
|
Set<AccessPermission> permissions;
|
|
try {
|
|
permissions = this.permissionService.getAllSetPermissions(siteNodeRef);
|
|
} catch (AccessDeniedException ae){
|
|
// We might not have permission to examine the permissions
|
|
return visibility;
|
|
}
|
|
for (AccessPermission permission : permissions)
|
|
{
|
|
if (permission.getAuthority().equals(PermissionService.ALL_AUTHORITIES) == true &&
|
|
permission.getPermission().equals(SITE_CONSUMER) == true)
|
|
{
|
|
visibility = SiteVisibility.PUBLIC;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Create the enum value from the string
|
|
visibility = SiteVisibility.valueOf(visibilityValue);
|
|
}
|
|
|
|
return visibility;
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSite(java.lang.String)
|
|
*/
|
|
public SiteInfo getSite(final String shortName)
|
|
{
|
|
// MT share - for activity service system callback
|
|
if (tenantService.isEnabled() && (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil.getRunAsUser())) && tenantService.isTenantName(shortName))
|
|
{
|
|
final String tenantDomain = tenantService.getDomain(shortName);
|
|
final String sName = tenantService.getBaseName(shortName, true);
|
|
|
|
return TenantUtil.runAsSystemTenant(new TenantRunAsWork<SiteInfo>()
|
|
{
|
|
public SiteInfo doWork() throws Exception
|
|
{
|
|
SiteInfo site = getSiteImpl(sName);
|
|
return new SiteInfoImpl(site.getSitePreset(), shortName, site.getTitle(), site.getDescription(), site.getVisibility(), site.getCustomProperties(), site.getNodeRef());
|
|
}
|
|
}, tenantDomain);
|
|
}
|
|
else
|
|
{
|
|
return getSiteImpl(shortName);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Get the site implementation given a short name
|
|
*
|
|
* @param shortName
|
|
* @return
|
|
*/
|
|
private SiteInfo getSiteImpl(String shortName)
|
|
{
|
|
SiteInfo result = null;
|
|
|
|
// Get the site node
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef != null)
|
|
{
|
|
// Create the site info
|
|
result = createSiteInfo(siteNodeRef);
|
|
}
|
|
|
|
// Return the site information
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSite(org.alfresco.service.cmr.repository.NodeRef)
|
|
*/
|
|
public SiteInfo getSite(NodeRef nodeRef)
|
|
{
|
|
SiteInfo siteInfo = null;
|
|
NodeRef siteNodeRef = getSiteNodeRef(nodeRef);
|
|
if (siteNodeRef != null)
|
|
{
|
|
siteInfo = createSiteInfo(siteNodeRef);
|
|
}
|
|
return siteInfo;
|
|
}
|
|
|
|
/**
|
|
* This method gets the <code>st:site</code> NodeRef for the Share Site which contains the given NodeRef.
|
|
* If the given NodeRef is not contained within a Share Site, then <code>null</code> is returned.
|
|
*
|
|
* @param nodeRef the node whose containing site is to be found.
|
|
* @return NodeRef site node reference or null if node is not in a site
|
|
*/
|
|
private NodeRef getSiteNodeRef(NodeRef nodeRef)
|
|
{
|
|
NodeRef siteNodeRef = null;
|
|
QName nodeRefType = directNodeService.getType(nodeRef);
|
|
if (dictionaryService.isSubClass(nodeRefType, TYPE_SITE) == true)
|
|
{
|
|
siteNodeRef = nodeRef;
|
|
}
|
|
else
|
|
{
|
|
ChildAssociationRef primaryParent = nodeService.getPrimaryParent(nodeRef);
|
|
if (primaryParent != null && primaryParent.getParentRef() != null)
|
|
{
|
|
siteNodeRef = getSiteNodeRef(primaryParent.getParentRef());
|
|
}
|
|
}
|
|
return siteNodeRef;
|
|
}
|
|
|
|
/**
|
|
* Gets the site's node reference based on its short name
|
|
*
|
|
* @param shortName short name
|
|
*
|
|
* @return NodeRef node reference
|
|
*/
|
|
private NodeRef getSiteNodeRef(final String shortName)
|
|
{
|
|
return getSiteNodeRef(shortName, true);
|
|
}
|
|
|
|
/**
|
|
* Gets the site's node reference based on its short name
|
|
*
|
|
* @param shortName short name
|
|
* @param enforcePermissions should we ensure that we have access to this node?
|
|
*
|
|
* @return NodeRef node reference
|
|
*/
|
|
private NodeRef getSiteNodeRef(final String shortName, boolean enforcePermissions)
|
|
{
|
|
NodeRef siteNodeRef = siteNodeRefCache.get(shortName);
|
|
if (siteNodeRef != null)
|
|
{
|
|
// test for existance - and remove from cache if no longer exists
|
|
if (!this.directNodeService.exists(siteNodeRef))
|
|
{
|
|
siteNodeRefCache.remove(shortName);
|
|
siteNodeRef = null;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// not in cache - find and store
|
|
final NodeRef siteRoot = getSiteParent(shortName);
|
|
|
|
siteNodeRef = AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<NodeRef>()
|
|
{
|
|
public NodeRef doWork() throws Exception
|
|
{
|
|
// the site "short name" directly maps to the cm:name property
|
|
NodeRef siteNode = directNodeService.getChildByName(siteRoot, ContentModel.ASSOC_CONTAINS, shortName);
|
|
|
|
// cache the result if found - null results will be required to ensure new sites are found later
|
|
if (siteNode != null)
|
|
{
|
|
siteNodeRefCache.put(shortName, siteNode);
|
|
}
|
|
return siteNode;
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
}
|
|
if (enforcePermissions)
|
|
{
|
|
return siteNodeRef == null
|
|
|| !this.permissionService.hasPermission(siteNodeRef, PermissionService.READ_PROPERTIES).equals(
|
|
AccessStatus.ALLOWED) ? null : siteNodeRef;
|
|
}
|
|
else
|
|
{
|
|
return siteNodeRef;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#updateSite(org.alfresco.service.cmr.site.SiteInfo)
|
|
*/
|
|
public void updateSite(SiteInfo siteInfo)
|
|
{
|
|
String shortName = siteInfo.getShortName();
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteServiceException(MSG_CAN_NOT_UPDATE, new Object[]{siteInfo.getShortName()});
|
|
}
|
|
|
|
// Get the sites properties
|
|
Map<QName, Serializable> properties = this.directNodeService.getProperties(siteNodeRef);
|
|
|
|
// Update the properties of the site
|
|
// Note: the site preset and short name should never be updated!
|
|
properties.put(ContentModel.PROP_TITLE, siteInfo.getTitle());
|
|
properties.put(ContentModel.PROP_DESCRIPTION, siteInfo.getDescription());
|
|
|
|
// Update the permissions based on the visibility
|
|
SiteVisibility currentVisibility = getSiteVisibility(siteNodeRef);
|
|
SiteVisibility updatedVisibility = siteInfo.getVisibility();
|
|
if (currentVisibility.equals(updatedVisibility) == false)
|
|
{
|
|
// visibility has changed
|
|
logger.debug("site:" + shortName + " visibility has changed from: " + currentVisibility + "to: " + updatedVisibility);
|
|
|
|
// Grab the Public Site Group and validate
|
|
final String sitePublicGroup = sysAdminParams.getSitePublicGroup();
|
|
boolean publicGroupExists = authorityService.authorityExists(sitePublicGroup);
|
|
if (!PermissionService.ALL_AUTHORITIES.equals(sitePublicGroup) && !publicGroupExists)
|
|
{
|
|
// If the group specified in the settings does not exist, we cannot update the site.
|
|
throw new SiteServiceException(MSG_VISIBILITY_GROUP_MISSING, new Object[]{sitePublicGroup});
|
|
}
|
|
|
|
// The site Visibility has changed.
|
|
// Remove current visibility permissions
|
|
if (SiteVisibility.PUBLIC.equals(currentVisibility) == true ||
|
|
SiteVisibility.MODERATED.equals(currentVisibility) == true)
|
|
{
|
|
// Remove the old Consumer permissions
|
|
// (Always remove both EVERYONE and the Publci Site Group, just to be safe)
|
|
this.permissionService.deletePermission(siteNodeRef, sitePublicGroup, SITE_CONSUMER);
|
|
if (sitePublicGroup.equals(PermissionService.ALL_AUTHORITIES))
|
|
{
|
|
this.permissionService.deletePermission(siteNodeRef, PermissionService.ALL_AUTHORITIES, SITE_CONSUMER);
|
|
}
|
|
}
|
|
|
|
// If the site was moderated before, undo the work of #setModeratedPermissions
|
|
// by restoring inherited permissions on the containers
|
|
// (Leaving the old extra permissions on containers is fine)
|
|
if (SiteVisibility.MODERATED.equals(currentVisibility) == true)
|
|
{
|
|
List<FileInfo> folders = fileFolderService.listFolders(siteNodeRef);
|
|
for(FileInfo folder : folders)
|
|
{
|
|
NodeRef containerNodeRef = folder.getNodeRef();
|
|
this.permissionService.setInheritParentPermissions(containerNodeRef, true);
|
|
}
|
|
}
|
|
|
|
// Add new visibility permissions
|
|
// Note - these need to be kept in sync manually with those in #setupSitePermissions
|
|
if (SiteVisibility.PUBLIC.equals(updatedVisibility) == true)
|
|
{
|
|
this.permissionService.setPermission(siteNodeRef, sitePublicGroup, SITE_CONSUMER, true);
|
|
}
|
|
else if (SiteVisibility.MODERATED.equals(updatedVisibility) == true)
|
|
{
|
|
this.permissionService.setPermission(siteNodeRef, sitePublicGroup, SITE_CONSUMER, true);
|
|
|
|
// Set the moderated permissions on all the containers the site already has
|
|
List<FileInfo> folders = fileFolderService.listFolders(siteNodeRef);
|
|
for(FileInfo folder : folders)
|
|
{
|
|
NodeRef containerNodeRef = folder.getNodeRef();
|
|
setModeratedPermissions(shortName, containerNodeRef);
|
|
}
|
|
}
|
|
else if (SiteVisibility.PRIVATE.equals(updatedVisibility))
|
|
{
|
|
// No additional permissions need to be granted for a site become private
|
|
}
|
|
|
|
// Update the site node reference with the updated visibility value
|
|
properties.put(SiteModel.PROP_SITE_VISIBILITY, siteInfo.getVisibility().toString());
|
|
}
|
|
|
|
// Set the updated properties back onto the site node reference
|
|
this.nodeService.setProperties(siteNodeRef, properties);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#deleteSite(java.lang.String)
|
|
*/
|
|
public void deleteSite(final String shortName)
|
|
{
|
|
logger.debug("delete site :" + shortName);
|
|
final NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteServiceException(MSG_CAN_NOT_DELETE, new Object[]{shortName});
|
|
}
|
|
final QName siteType = this.directNodeService.getType(siteNodeRef);
|
|
|
|
// Delete the cached reference
|
|
siteNodeRefCache.remove(shortName);
|
|
|
|
// Collection for recording the group memberships present on the site
|
|
final Map<String, Set<String>> groupsMemberships = new HashMap<String, Set<String>>();
|
|
|
|
// Save the group memberships so we can use them later
|
|
this.nodeService.setProperty(siteNodeRef, QName.createQName(null, "memberships"), (Serializable)groupsMemberships);
|
|
|
|
// The default behaviour is that sites cannot be deleted. But we disable that behaviour here
|
|
// in order to allow site deletion only via this service. Share calls this service for deletion.
|
|
//
|
|
// See ALF-7888 for some background on this issue
|
|
this.behaviourFilter.disableBehaviour(siteNodeRef, ContentModel.ASPECT_UNDELETABLE);
|
|
|
|
NodeRef siteParent = getSiteParent(shortName);
|
|
this.behaviourFilter.disableBehaviour(siteParent, ContentModel.ASPECT_AUDITABLE);
|
|
|
|
try
|
|
{
|
|
this.nodeService.deleteNode(siteNodeRef);
|
|
}
|
|
finally
|
|
{
|
|
this.behaviourFilter.enableBehaviour(siteNodeRef, ContentModel.ASPECT_UNDELETABLE);
|
|
this.behaviourFilter.enableBehaviour(siteParent, ContentModel.ASPECT_AUDITABLE);
|
|
}
|
|
|
|
// Delete the associated groups
|
|
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
|
{
|
|
public Object doWork() throws Exception
|
|
{
|
|
// Delete the master site group
|
|
final String siteGroup = getSiteGroup(shortName, true);
|
|
if (authorityService.authorityExists(siteGroup))
|
|
{
|
|
authorityService.deleteAuthority(siteGroup, false);
|
|
|
|
// Iterate over the role related groups and delete then
|
|
Set<String> permissions = permissionService.getSettablePermissions(siteType);
|
|
for (String permission : permissions)
|
|
{
|
|
String siteRoleGroup = getSiteRoleGroup(shortName, permission, true);
|
|
|
|
// Collect up the memberships so we can potentially restore them later
|
|
Set<String> groupUsers = authorityService.getContainedAuthorities(null, siteRoleGroup, true);
|
|
groupsMemberships.put(siteRoleGroup, groupUsers);
|
|
|
|
// Delete the site role group
|
|
authorityService.deleteAuthority(siteRoleGroup);
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
|
|
logger.debug("site deleted :" + shortName);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.repo.node.NodeServicePolicies.OnRestoreNodePolicy#onRestoreNode(org.alfresco.service.cmr.repository.ChildAssociationRef)
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
public void onRestoreNode(ChildAssociationRef childAssocRef)
|
|
{
|
|
// regenerate the groups for the site when it is restored from the Archive store
|
|
NodeRef siteRef = childAssocRef.getChildRef();
|
|
setupSitePermissions(
|
|
siteRef,
|
|
(String)directNodeService.getProperty(siteRef, ContentModel.PROP_NAME),
|
|
getSiteVisibility(siteRef),
|
|
(Map<String, Set<String>>)directNodeService.getProperty(siteRef, QName.createQName(null, "memberships")));
|
|
}
|
|
|
|
public void listMembers(String shortName, final String nameFilter, final String roleFilter, final boolean collapseGroups, final SiteMembersCallback callback)
|
|
{
|
|
// MT share - for activity service system callback
|
|
if (tenantService.isEnabled() && (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil.getRunAsUser())) && tenantService.isTenantName(shortName))
|
|
{
|
|
final String tenantDomain = tenantService.getDomain(shortName);
|
|
final String sName = tenantService.getBaseName(shortName, true);
|
|
|
|
TenantUtil.runAsSystemTenant(new TenantRunAsWork<Void>()
|
|
{
|
|
public Void doWork() throws Exception
|
|
{
|
|
listMembersImpl(sName, nameFilter, roleFilter, collapseGroups, callback);
|
|
return null;
|
|
}
|
|
}, tenantDomain);
|
|
}
|
|
else
|
|
{
|
|
listMembersImpl(shortName, nameFilter, roleFilter, collapseGroups, callback);
|
|
}
|
|
}
|
|
|
|
// note that this may return an authority more than once
|
|
protected void listMembersImpl(String shortName, String nameFilter, String roleFilter, boolean collapseGroups, SiteMembersCallback callback)
|
|
{
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// Build an array of name filter tokens pre lowercased to test against person properties
|
|
// We require that matching people have at least one match against one of these on
|
|
// either their firstname or last name
|
|
String nameFilterLower = null;
|
|
String[] nameFilters = new String[0];
|
|
if (nameFilter != null && nameFilter.length() != 0)
|
|
{
|
|
StringTokenizer t = new StringTokenizer(nameFilter, " ");
|
|
nameFilters = new String[t.countTokens()];
|
|
for (int i=0; t.hasMoreTokens(); i++)
|
|
{
|
|
nameFilters[i] = t.nextToken().toLowerCase();
|
|
}
|
|
nameFilterLower = nameFilter.toLowerCase();
|
|
}
|
|
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
Set<String> permissions = this.permissionService.getSettablePermissions(siteType);
|
|
Map<String, String> groupsToExpand = new HashMap<String, String>(32);
|
|
|
|
for (String permission : permissions)
|
|
{
|
|
if (roleFilter == null || roleFilter.length() == 0 || roleFilter.equals(permission))
|
|
{
|
|
String groupName = getSiteRoleGroup(shortName, permission, true);
|
|
Set<String> authorities = this.authorityService.getContainedAuthorities(null, groupName, true);
|
|
for (String authority : authorities)
|
|
{
|
|
switch (AuthorityType.getAuthorityType(authority))
|
|
{
|
|
case USER:
|
|
boolean addUser = true;
|
|
if (nameFilter != null && nameFilter.length() != 0 && !nameFilter.equals(authority))
|
|
{
|
|
// found a filter - does it match person first/last name?
|
|
addUser = matchPerson(nameFilters, authority);
|
|
}
|
|
if (addUser)
|
|
{
|
|
// Add the user and their permission to the returned map
|
|
callback.siteMember(authority, permission);
|
|
}
|
|
if(callback.isDone())
|
|
{
|
|
break;
|
|
}
|
|
break;
|
|
case GROUP:
|
|
if (collapseGroups)
|
|
{
|
|
if (!groupsToExpand.containsKey(authority))
|
|
{
|
|
groupsToExpand.put(authority, permission);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (nameFilter != null && nameFilter.length() != 0)
|
|
{
|
|
// found a filter - does it match Group name part?
|
|
if (authority.substring(GROUP_PREFIX_LENGTH).toLowerCase().contains(nameFilterLower))
|
|
{
|
|
callback.siteMember(authority, permission);
|
|
}
|
|
else
|
|
{
|
|
// Does it match on the Group Display Name part instead?
|
|
String displayName = authorityService.getAuthorityDisplayName(authority);
|
|
if(displayName != null && displayName.toLowerCase().contains(nameFilterLower))
|
|
{
|
|
callback.siteMember(authority, permission);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// No name filter add this group
|
|
callback.siteMember(authority, permission);
|
|
}
|
|
|
|
if(callback.isDone())
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (collapseGroups)
|
|
{
|
|
for (Map.Entry<String,String> entry : groupsToExpand.entrySet())
|
|
{
|
|
Set<String> subUsers = this.authorityService.getContainedAuthorities(AuthorityType.USER, entry.getKey(), false);
|
|
for (String subUser : subUsers)
|
|
{
|
|
boolean addUser = true;
|
|
if (nameFilter != null && nameFilter.length() != 0 && !nameFilter.equals(subUser))
|
|
{
|
|
// found a filter - does it match person first/last name?
|
|
addUser = matchPerson(nameFilters, subUser);
|
|
}
|
|
|
|
if (addUser)
|
|
{
|
|
// Add the collapsed user into the members list if they do not already appear in the list
|
|
callback.siteMember(subUser, entry.getValue());
|
|
}
|
|
|
|
if(callback.isDone())
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public PagingResults<SiteMembership> listMembersPaged(String shortName, boolean collapseGroups, List<Pair<SiteService.SortFields, Boolean>> sortProps, PagingRequest pagingRequest)
|
|
{
|
|
SiteMembershipCannedQueryFactory sitesCannedQueryFactory = (SiteMembershipCannedQueryFactory)cannedQueryRegistry.getNamedObject("sitesCannedQueryFactory");
|
|
|
|
CannedQueryPageDetails pageDetails = new CannedQueryPageDetails(pagingRequest.getSkipCount(), pagingRequest.getMaxItems());
|
|
|
|
// sort details
|
|
CannedQuerySortDetails sortDetails = null;
|
|
if(sortProps != null)
|
|
{
|
|
List<Pair<? extends Object, SortOrder>> sortPairs = new ArrayList<Pair<? extends Object, SortOrder>>(sortProps.size());
|
|
for (Pair<SiteService.SortFields, Boolean> sortProp : sortProps)
|
|
{
|
|
sortPairs.add(new Pair<SiteService.SortFields, SortOrder>(sortProp.getFirst(), (sortProp.getSecond() ? SortOrder.ASCENDING : SortOrder.DESCENDING)));
|
|
}
|
|
|
|
sortDetails = new CannedQuerySortDetails(sortPairs);
|
|
}
|
|
|
|
SiteMembersCannedQueryParams parameterBean = new SiteMembersCannedQueryParams(shortName, collapseGroups);
|
|
CannedQueryParameters params = new CannedQueryParameters(parameterBean, pageDetails, sortDetails, pagingRequest.getRequestTotalCountMax(), pagingRequest.getQueryExecutionId());
|
|
|
|
CannedQuery<SiteMembership> query = sitesCannedQueryFactory.getCannedQuery(params);
|
|
|
|
CannedQueryResults<SiteMembership> results = query.execute();
|
|
|
|
return getPagingResults(pagingRequest, results);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#listMembers(java.lang.String, java.lang.String, java.lang.String, int)
|
|
*/
|
|
public Map<String, String> listMembers(String shortName, String nameFilter, String roleFilter, int size)
|
|
{
|
|
return listMembers(shortName, nameFilter, roleFilter, size, false);
|
|
}
|
|
|
|
public Map<String, String> listMembers(String shortName, final String nameFilter, final String roleFilter, final int size, final boolean collapseGroups)
|
|
{
|
|
// MT share - for activity service system callback
|
|
if (tenantService.isEnabled() && (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil.getRunAsUser())) && tenantService.isTenantName(shortName))
|
|
{
|
|
final String tenantDomain = tenantService.getDomain(shortName);
|
|
final String sName = tenantService.getBaseName(shortName, true);
|
|
|
|
return TenantUtil.runAsSystemTenant(new TenantRunAsWork<Map<String, String>>()
|
|
{
|
|
public Map<String, String> doWork() throws Exception
|
|
{
|
|
return listMembersImpl(sName, nameFilter, roleFilter, size, collapseGroups);
|
|
}
|
|
}, tenantDomain);
|
|
}
|
|
else
|
|
{
|
|
return listMembersImpl(shortName, nameFilter, roleFilter, size, collapseGroups);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#listMembersInfo(String,
|
|
* String, String, int, boolean)
|
|
*/
|
|
public List<SiteMemberInfo> listMembersInfo(String shortName, final String nameFilter, final String roleFilter, final int size, final boolean collapseGroups)
|
|
{
|
|
// MT share - for activity service system callback
|
|
if (tenantService.isEnabled()
|
|
&& (AuthenticationUtil.SYSTEM_USER_NAME.equals(AuthenticationUtil
|
|
.getRunAsUser())) && tenantService.isTenantName(shortName))
|
|
{
|
|
final String tenantDomain = tenantService.getDomain(shortName);
|
|
final String sName = tenantService.getBaseName(shortName, true);
|
|
|
|
return AuthenticationUtil.runAs(
|
|
new AuthenticationUtil.RunAsWork<List<SiteMemberInfo>>()
|
|
{
|
|
public List<SiteMemberInfo> doWork() throws Exception
|
|
{
|
|
return listMembersInfoImpl(sName, nameFilter, roleFilter, size,
|
|
collapseGroups);
|
|
}
|
|
}, tenantService.getDomainUser(AuthenticationUtil.getSystemUserName(),
|
|
tenantDomain));
|
|
}
|
|
else
|
|
{
|
|
return listMembersInfoImpl(shortName, nameFilter, roleFilter, size, collapseGroups);
|
|
}
|
|
}
|
|
|
|
private Map<String, String> listMembersImpl(String shortName, String nameFilter, String roleFilter, int size, boolean collapseGroups)
|
|
{
|
|
Map<String, String> members = new HashMap<String, String>(32);
|
|
|
|
List<SiteMemberInfo> list = listMembersInfoImpl(shortName, nameFilter, roleFilter, size,
|
|
collapseGroups);
|
|
for (SiteMemberInfo info : list)
|
|
members.put(info.getMemberName(), info.getMemberRole());
|
|
|
|
return members;
|
|
}
|
|
|
|
private List<SiteMemberInfo> listMembersInfoImpl(String shortName, String nameFilter,
|
|
String roleFilter, int size, boolean collapseGroups)
|
|
{
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// max size limit
|
|
if (size <= 0)
|
|
{
|
|
size = Integer.MAX_VALUE;
|
|
}
|
|
|
|
// Build an array of name filter tokens pre lowercased to test against person properties
|
|
// We require that matching people have at least one match against one of these on
|
|
// either their firstname or last name
|
|
String nameFilterLower = null;
|
|
String[] nameFilters = new String[0];
|
|
if (nameFilter != null && nameFilter.length() != 0)
|
|
{
|
|
StringTokenizer t = new StringTokenizer(nameFilter, " ");
|
|
nameFilters = new String[t.countTokens()];
|
|
for (int i = 0; t.hasMoreTokens(); i++)
|
|
{
|
|
nameFilters[i] = t.nextToken().toLowerCase();
|
|
}
|
|
nameFilterLower = nameFilter.toLowerCase();
|
|
}
|
|
|
|
List<SiteMemberInfo> members = new ArrayList<SiteMemberInfo>(32);
|
|
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
Set<String> permissions = this.permissionService.getSettablePermissions(siteType);
|
|
Map<String, String> groupsToExpand = new HashMap<String, String>(32);
|
|
|
|
AUTHORITY_FIND: for (String permission : permissions)
|
|
{
|
|
if (roleFilter == null || roleFilter.length() == 0 || roleFilter.equals(permission))
|
|
{
|
|
String groupName = getSiteRoleGroup(shortName, permission, true);
|
|
Set<String> authorities = this.authorityService.getContainedAuthorities(null, groupName, true);
|
|
for (String authority : authorities)
|
|
{
|
|
switch (AuthorityType.getAuthorityType(authority))
|
|
{
|
|
case USER:
|
|
boolean addUser = true;
|
|
if (nameFilter != null && nameFilter.length() != 0 && !nameFilter.equals(authority))
|
|
{
|
|
// found a filter - does it match person first/last name?
|
|
addUser = matchPerson(nameFilters, authority);
|
|
}
|
|
if (addUser)
|
|
{
|
|
// Add the user and their permission to the returned map
|
|
members.add(new SiteMemberInfoImpl(authority, permission, false));
|
|
|
|
// break on max size limit reached
|
|
if (members.size() >= size)
|
|
{
|
|
break AUTHORITY_FIND;
|
|
}
|
|
}
|
|
break;
|
|
case GROUP:
|
|
if (collapseGroups)
|
|
{
|
|
if (!groupsToExpand.containsKey(authority))
|
|
{
|
|
groupsToExpand.put(authority, permission);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (nameFilter != null && nameFilter.length() != 0)
|
|
{
|
|
// found a filter - does it match Group name part?
|
|
if (matchByFilter(authority.substring(GROUP_PREFIX_LENGTH).toLowerCase(), nameFilterLower))
|
|
{
|
|
members.add(new SiteMemberInfoImpl(authority, permission, false));
|
|
}
|
|
else
|
|
{
|
|
// Does it match on the Group Display Name part instead?
|
|
String displayName = authorityService.getAuthorityDisplayName(authority);
|
|
if (displayName != null && matchByFilter(displayName.toLowerCase(), nameFilterLower))
|
|
{
|
|
members.add(new SiteMemberInfoImpl(authority, permission, false));
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// No name filter add this group
|
|
members.add(new SiteMemberInfoImpl(authority, permission, false));
|
|
}
|
|
|
|
// break on max size limit reached
|
|
if (members.size() >= size)
|
|
{
|
|
break AUTHORITY_FIND;
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if ((collapseGroups) && (members.size() < size))
|
|
{
|
|
GROUP_EXPAND: for (Map.Entry<String, String> entry : groupsToExpand.entrySet())
|
|
{
|
|
Set<String> subUsers = this.authorityService.getContainedAuthorities(AuthorityType.USER, entry.getKey(), false);
|
|
for (String subUser : subUsers)
|
|
{
|
|
boolean addUser = true;
|
|
if (nameFilter != null && nameFilter.length() != 0 && !nameFilter.equals(subUser))
|
|
{
|
|
// found a filter - does it match person first/last name?
|
|
addUser = matchPerson(nameFilters, subUser);
|
|
}
|
|
|
|
if (addUser)
|
|
{
|
|
SiteMemberInfo memberInfo = new SiteMemberInfoImpl(subUser,entry.getValue(), true);
|
|
// Add the collapsed user into the members list if they do not already appear in the list
|
|
if (members.contains(memberInfo) == false)
|
|
{
|
|
members.add(memberInfo);
|
|
}
|
|
|
|
// break on max size limit reached
|
|
if (members.size() >= size)
|
|
{
|
|
break GROUP_EXPAND;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return members;
|
|
}
|
|
|
|
/**
|
|
* Helper to match name filters to Person properties.
|
|
*
|
|
* One of the user's firstname or lastname must match at least
|
|
* one of the filters given.
|
|
*
|
|
* @param filter
|
|
* @param username
|
|
* @return
|
|
*/
|
|
private boolean matchPerson(final String[] nameFilters, final String username)
|
|
{
|
|
boolean addUser = false;
|
|
|
|
try
|
|
{
|
|
NodeRef person = personService.getPerson(username, false);
|
|
String firstName = (String)directNodeService.getProperty(person, ContentModel.PROP_FIRSTNAME);
|
|
String lastName = (String)directNodeService.getProperty(person, ContentModel.PROP_LASTNAME);
|
|
String userName = (String)directNodeService.getProperty(person, ContentModel.PROP_USERNAME);
|
|
|
|
final String lowFirstName = (firstName != null ? firstName.toLowerCase() : "");
|
|
final String lowLastName = (lastName != null ? lastName.toLowerCase() : "");
|
|
final String lowUserName = (userName != null ? userName.toLowerCase() : "");
|
|
for (int i=0; i<nameFilters.length; i++)
|
|
{
|
|
if (matchByFilter(lowUserName, nameFilters[i]) ||
|
|
matchByFilter(lowFirstName, nameFilters[i]) ||
|
|
matchByFilter(lowLastName, nameFilters[i]))
|
|
{
|
|
addUser = true;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
catch(NoSuchPersonException e)
|
|
{
|
|
// Group references a deleted user, shouldn't normally happen
|
|
}
|
|
|
|
return addUser;
|
|
}
|
|
|
|
private boolean matchByFilter(String compareString, String patternString)
|
|
{
|
|
if (compareString==null || compareString.isEmpty())
|
|
{
|
|
return false;
|
|
}
|
|
if (patternString==null || patternString.isEmpty())
|
|
{
|
|
return true;
|
|
}
|
|
StringBuilder paternStr=new StringBuilder();
|
|
for (char c: patternString.toCharArray())
|
|
{
|
|
if (c=='*')
|
|
{
|
|
paternStr.append(".*");
|
|
}
|
|
else if (c=='(' || c==')')
|
|
{
|
|
paternStr.append("\\"+c);
|
|
}
|
|
else if (Character.isLetterOrDigit(c) || c=='*')
|
|
{
|
|
paternStr.append(c);
|
|
}
|
|
else paternStr.append("\\"+c);
|
|
|
|
}
|
|
Pattern p=Pattern.compile(paternStr.toString(), Pattern.CASE_INSENSITIVE);
|
|
Matcher matcher=p.matcher(compareString);
|
|
return matcher.matches();
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getMembersRoleInfo(java.lang.String, java.lang.String)
|
|
*/
|
|
public SiteMemberInfo getMembersRoleInfo(String shortName, String authorityName)
|
|
{
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
Set<String> permissions = this.permissionService.getSettablePermissions(siteType);
|
|
// This set is a lazily evaluated one, so merely getting it in advance as we do here is not expensive
|
|
Set<String> userAuthoritySet = this.authorityService.getAuthoritiesForUser(authorityName);
|
|
for (String role : permissions)
|
|
{
|
|
String roleGroup = getSiteRoleGroup(shortName, role, true);
|
|
Set<String> authorities = this.authorityService.getContainedAuthorities(null, roleGroup, true);
|
|
if (authorities.contains(authorityName))
|
|
{
|
|
// found a direct membership for this user - return this role info
|
|
return new SiteMemberInfoImpl(authorityName, role, false);
|
|
}
|
|
// crawl the cache from the role group down to find the authority
|
|
else if (userAuthoritySet.contains(roleGroup))
|
|
{
|
|
return new SiteMemberInfoImpl(authorityName, role, true);
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getMembersRole(java.lang.String,
|
|
* java.lang.String)
|
|
*/
|
|
public String getMembersRole(String shortName, String authorityName)
|
|
{
|
|
String result = null;
|
|
List<String> roles = getMembersRoles(shortName, authorityName);
|
|
if (roles.size() != 0)
|
|
{
|
|
if (roles.size() > 1 && roleComparator != null)
|
|
{
|
|
// Need to sort the roles into the most important first.
|
|
SortedSet<String> sortedRoles = new TreeSet<String>(roleComparator);
|
|
for (String role : roles)
|
|
{
|
|
sortedRoles.add(role);
|
|
}
|
|
result = sortedRoles.first();
|
|
}
|
|
else
|
|
{
|
|
// don't search on precedence or only one result
|
|
result = roles.get(0);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public List<String> getMembersRoles(String shortName, String authorityName)
|
|
{
|
|
List<String> result = new ArrayList<String>(5);
|
|
List<String> groups = getPermissionGroups(shortName, authorityName);
|
|
for (String group : groups)
|
|
{
|
|
int index = group.lastIndexOf('_');
|
|
if (index != -1)
|
|
{
|
|
result.add(group.substring(index + 1));
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/**
|
|
* Helper method to get the permission groups for a given authority on a site.
|
|
* Returns empty List if the user does not have a explicit membership to the site.
|
|
*
|
|
* A user permission will take precedence over a permission obtained via a group.
|
|
*
|
|
* @param siteShortName site short name
|
|
* @param authorityName authority name
|
|
* @return List<String> Permission groups, empty list if no explicit membership set
|
|
*/
|
|
private List<String> getPermissionGroups(String siteShortName, String authorityName)
|
|
{
|
|
NodeRef siteNodeRef = getSiteNodeRef(siteShortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(siteShortName);
|
|
}
|
|
|
|
List<String> fullResult = new ArrayList<String>(5);
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
Set<String> roles = this.permissionService.getSettablePermissions(siteType);
|
|
|
|
// First use the authority's cached recursive group memberships to answer the question quickly
|
|
Set<String> authorities = authorityService.getAuthoritiesForUser(authorityName);
|
|
for (String role : roles)
|
|
{
|
|
String roleGroup = getSiteRoleGroup(siteShortName, role, true);
|
|
if (authorities.contains(roleGroup))
|
|
{
|
|
fullResult.add(roleGroup);
|
|
}
|
|
}
|
|
|
|
// Unfortunately, due to direct membership taking precedence, we can't answer the question quickly if more than one role has been inherited
|
|
if (fullResult.size() <= 1)
|
|
{
|
|
return fullResult;
|
|
}
|
|
|
|
// Check direct group memberships
|
|
List<String> result = new ArrayList<String>(5);
|
|
Set <String> authorityGroups = this.authorityService.getContainingAuthorities(AuthorityType.GROUP,
|
|
authorityName, true);
|
|
for (String role : roles)
|
|
{
|
|
String roleGroup = getSiteRoleGroup(siteShortName, role, true);
|
|
if (authorityGroups.contains(roleGroup))
|
|
{
|
|
result.add(roleGroup);
|
|
}
|
|
}
|
|
|
|
// If there are user permissions then they take priority
|
|
return result.size() > 0 ? result : fullResult;
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSiteRoles()
|
|
*/
|
|
public List<String> getSiteRoles()
|
|
{
|
|
return getSiteRoles(SiteModel.TYPE_SITE);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSiteRoles(String)
|
|
*/
|
|
public List<String> getSiteRoles(String shortName)
|
|
{
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
return getSiteRoles(siteType);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSiteRoles()
|
|
* @see org.alfresco.service.cmr.site.SiteService#getSiteRoles(String)
|
|
*/
|
|
public List<String> getSiteRoles(QName type)
|
|
{
|
|
Set<String> permissions = permissionService.getSettablePermissions(type);
|
|
return new ArrayList<String>(permissions);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#isMember(java.lang.String, java.lang.String)
|
|
*/
|
|
public boolean isMember(String shortName, String authorityName)
|
|
{
|
|
return (!getPermissionGroups(shortName, authorityName).isEmpty());
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#removeMembership(java.lang.String, java.lang.String)
|
|
*/
|
|
public void removeMembership(final String shortName, final String authorityName)
|
|
{
|
|
final NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// TODO what do we do about the user if they are in a group that has
|
|
// rights to the site?
|
|
|
|
// Get the current user
|
|
String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser();
|
|
|
|
// Get the user current role
|
|
final String role = getMembersRole(shortName, authorityName);
|
|
if (role != null)
|
|
{
|
|
// Check that we are not about to remove the last site manager
|
|
checkLastManagerRemoval(shortName, authorityName, role);
|
|
|
|
// If ...
|
|
// -- the current user has change permissions rights on the site
|
|
// or
|
|
// -- the user is ourselves
|
|
if ((currentUserName.equals(authorityName) == true) ||
|
|
(permissionService.hasPermission(siteNodeRef, PermissionService.CHANGE_PERMISSIONS) == AccessStatus.ALLOWED))
|
|
{
|
|
// Run as system user
|
|
AuthenticationUtil.runAs(
|
|
new AuthenticationUtil.RunAsWork<Object>()
|
|
{
|
|
public Object doWork() throws Exception
|
|
{
|
|
// Remove the user from the current permission
|
|
// group
|
|
String currentGroup = getSiteRoleGroup(shortName, role, true);
|
|
authorityService.removeAuthority(currentGroup, authorityName);
|
|
|
|
return null;
|
|
}
|
|
}, AuthenticationUtil.SYSTEM_USER_NAME);
|
|
|
|
// Raise events
|
|
AuthorityType authorityType = AuthorityType.getAuthorityType(authorityName);
|
|
if (authorityType == AuthorityType.USER)
|
|
{
|
|
activityService.postActivity(
|
|
ActivityType.SITE_USER_REMOVED, shortName,
|
|
ACTIVITY_TOOL, getActivityUserData(authorityName, ""));
|
|
}
|
|
else if (authorityType == AuthorityType.GROUP)
|
|
{
|
|
activityService.postActivity(
|
|
ActivityType.SITE_GROUP_REMOVED, shortName,
|
|
ACTIVITY_TOOL, getActivityGroupData(authorityName, ""));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Throw an exception
|
|
throw new SiteServiceException(MSG_CAN_NOT_REMOVE_MSHIP, new Object[]{shortName});
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Throw an exception
|
|
throw new SiteServiceException(MSG_CAN_NOT_REMOVE_MSHIP, new Object[]{shortName});
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#canAddMember(java.lang.String,
|
|
* java.lang.String, java.lang.String)
|
|
*/
|
|
public boolean canAddMember(final String shortName, final String authorityName, final String role)
|
|
{
|
|
final NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// Get the user's current role
|
|
final String currentRole = getMembersRole(shortName, authorityName);
|
|
|
|
// Get the visibility of the site
|
|
SiteVisibility visibility = getSiteVisibility(siteNodeRef);
|
|
|
|
// If we are ...
|
|
// -- the current user has change permissions rights on the site
|
|
// or we are ...
|
|
// -- referring to a public site and
|
|
// -- the role being set is consumer and
|
|
// -- the user being added is ourselves and
|
|
// -- the member does not already have permissions
|
|
// ... then we can set the permissions as system user
|
|
final String currentUserName = AuthenticationUtil.getFullyAuthenticatedUser();
|
|
return((permissionService.hasPermission(siteNodeRef, PermissionService.CHANGE_PERMISSIONS) == AccessStatus.ALLOWED) ||
|
|
(SiteVisibility.PUBLIC.equals(visibility) &&
|
|
role.equals(SiteModel.SITE_CONSUMER) &&
|
|
authorityName.equals(currentUserName) &&
|
|
currentRole == null));
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#setMembership(java.lang.String,
|
|
* java.lang.String, java.lang.String)
|
|
*/
|
|
public void setMembership(final String shortName,
|
|
final String authorityName,
|
|
final String role)
|
|
{
|
|
final NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// Get the user's current role
|
|
final String currentRole = getMembersRole(shortName, authorityName);
|
|
|
|
// Do nothing if the role of the user is not being changed
|
|
if (currentRole == null || role.equals(currentRole) == false)
|
|
{
|
|
// TODO if this is the only site manager do not down grade their
|
|
// permissions
|
|
if(canAddMember(shortName, authorityName, role))
|
|
{
|
|
// Check that we are not about to remove the last site manager
|
|
checkLastManagerRemoval(shortName, authorityName, currentRole);
|
|
|
|
// Run as system user
|
|
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
|
|
{
|
|
public Object doWork() throws Exception
|
|
{
|
|
if (currentRole != null)
|
|
{
|
|
// Remove the user from the current
|
|
// permission group
|
|
String currentGroup = getSiteRoleGroup(shortName, currentRole, true);
|
|
authorityService.removeAuthority(currentGroup, authorityName);
|
|
}
|
|
|
|
// Add the user to the new permission group
|
|
String newGroup = getSiteRoleGroup(shortName, role, true);
|
|
authorityService.addAuthority(newGroup, authorityName);
|
|
|
|
return null;
|
|
}
|
|
|
|
}, AuthenticationUtil.SYSTEM_USER_NAME);
|
|
|
|
if (currentRole == null)
|
|
{
|
|
AuthorityType authorityType = AuthorityType.getAuthorityType(authorityName);
|
|
if (authorityType == AuthorityType.USER)
|
|
{
|
|
activityService.postActivity(
|
|
ActivityType.SITE_USER_JOINED, shortName,
|
|
ACTIVITY_TOOL, getActivityUserData(authorityName, role), authorityName);
|
|
}
|
|
else if (authorityType == AuthorityType.GROUP)
|
|
{
|
|
activityService.postActivity(
|
|
ActivityType.SITE_GROUP_ADDED, shortName,
|
|
ACTIVITY_TOOL, getActivityGroupData(authorityName, role));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
AuthorityType authorityType = AuthorityType.getAuthorityType(authorityName);
|
|
if (authorityType == AuthorityType.USER)
|
|
{
|
|
activityService.postActivity(
|
|
ActivityType.SITE_USER_ROLE_UPDATE, shortName,
|
|
ACTIVITY_TOOL, getActivityUserData(authorityName, role));
|
|
}
|
|
else if (authorityType == AuthorityType.GROUP)
|
|
{
|
|
activityService.postActivity(
|
|
ActivityType.SITE_GROUP_ROLE_UPDATE, shortName,
|
|
ACTIVITY_TOOL, getActivityGroupData(authorityName, role));
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Raise a permission exception
|
|
throw new SiteServiceException(MSG_CAN_NOT_CHANGE_MSHIP, new Object[]{shortName});
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#createContainer(java.lang.String,
|
|
* java.lang.String, org.alfresco.service.namespace.QName,
|
|
* java.util.Map)
|
|
*/
|
|
public NodeRef createContainer(String shortName,
|
|
String componentId,
|
|
QName containerType,
|
|
Map<QName, Serializable> containerProperties)
|
|
{
|
|
// Check for the component id
|
|
ParameterCheck.mandatoryString("componentId", componentId);
|
|
|
|
// retrieve site
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// Update the isPublic flag
|
|
SiteVisibility siteVisibility = getSiteVisibility(siteNodeRef);
|
|
|
|
// retrieve component folder within site
|
|
NodeRef containerNodeRef = null;
|
|
try
|
|
{
|
|
containerNodeRef = findContainer(siteNodeRef, componentId);
|
|
}
|
|
catch (FileNotFoundException e)
|
|
{
|
|
//NOOP
|
|
}
|
|
|
|
// create the container node reference
|
|
if (containerNodeRef == null)
|
|
{
|
|
if (containerType == null)
|
|
{
|
|
containerType = ContentModel.TYPE_FOLDER;
|
|
}
|
|
|
|
// create component folder
|
|
FileInfo fileInfo = fileFolderService.create(siteNodeRef,
|
|
componentId, containerType);
|
|
|
|
// Get the created container
|
|
containerNodeRef = fileInfo.getNodeRef();
|
|
|
|
// Set the properties if they have been provided
|
|
if (containerProperties != null)
|
|
{
|
|
Map<QName, Serializable> props = this.directNodeService
|
|
.getProperties(containerNodeRef);
|
|
props.putAll(containerProperties);
|
|
this.nodeService.setProperties(containerNodeRef, props);
|
|
}
|
|
|
|
// Add the container aspect
|
|
Map<QName, Serializable> aspectProps = new HashMap<QName, Serializable>(1, 1.0f);
|
|
aspectProps.put(SiteModel.PROP_COMPONENT_ID, componentId);
|
|
this.nodeService.addAspect(containerNodeRef, ASPECT_SITE_CONTAINER,
|
|
aspectProps);
|
|
|
|
// Set permissions on the container
|
|
if(SiteVisibility.MODERATED.equals(siteVisibility))
|
|
{
|
|
setModeratedPermissions(shortName, containerNodeRef);
|
|
}
|
|
|
|
// Make the container a tag scope
|
|
this.taggingService.addTagScope(containerNodeRef);
|
|
}
|
|
|
|
return containerNodeRef;
|
|
}
|
|
|
|
/**
|
|
* This method recursively cleans the site permissions on the specified NodeRef and all its primary
|
|
* descendants. This consists of
|
|
* <ul>
|
|
* <li>the removal of all site permissions pertaining to a site other than the containingSite</li>
|
|
* </ul>
|
|
* If the containingSite is <code>null</code> then the targetNode's current containing site is used.
|
|
*
|
|
* @param targetNode
|
|
* @param containingSite the site which the site is a member of. If <code>null</code>, it will be calculated.
|
|
*/
|
|
@Override
|
|
public void cleanSitePermissions(final NodeRef targetNode, SiteInfo containingSite)
|
|
{
|
|
this.sitesPermissionsCleaner.cleanSitePermissions(targetNode, containingSite);
|
|
}
|
|
|
|
/**
|
|
* Moderated sites have separate ACLs on each component and don't inherit from the
|
|
* site which has consumer role for everyone.
|
|
*/
|
|
private void setModeratedPermissions(String shortName, NodeRef containerNodeRef)
|
|
{
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
QName siteType = directNodeService.getType(siteNodeRef);
|
|
Set<String> permissions = permissionService.getSettablePermissions(siteType);
|
|
for (String permission : permissions)
|
|
{
|
|
String permissionGroup = getSiteRoleGroup(shortName, permission, true);
|
|
// Assign the group the relevant permission on the site
|
|
permissionService.setPermission(containerNodeRef, permissionGroup, permission, true);
|
|
}
|
|
permissionService.setPermission(containerNodeRef,
|
|
PermissionService.ALL_AUTHORITIES,
|
|
PermissionService.READ_PERMISSIONS, true);
|
|
|
|
this.permissionService.setInheritParentPermissions(containerNodeRef, false);
|
|
}
|
|
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#getContainer(java.lang.String)
|
|
*/
|
|
public NodeRef getContainer(String shortName, String componentId)
|
|
{
|
|
ParameterCheck.mandatoryString("componentId", componentId);
|
|
|
|
// retrieve site
|
|
NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// retrieve component folder within site
|
|
// NOTE: component id is used for folder name
|
|
NodeRef containerNodeRef = null;
|
|
try
|
|
{
|
|
containerNodeRef = findContainer(siteNodeRef, componentId);
|
|
}
|
|
catch (FileNotFoundException e)
|
|
{
|
|
//NOOP
|
|
}
|
|
|
|
return containerNodeRef;
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public PagingResults<FileInfo> listContainers(String shortName, PagingRequest pagingRequest)
|
|
{
|
|
SiteContainersCannedQueryFactory sitesContainersCannedQueryFactory = (SiteContainersCannedQueryFactory)cannedQueryRegistry.getNamedObject("siteContainersCannedQueryFactory");
|
|
|
|
CannedQueryPageDetails pageDetails = new CannedQueryPageDetails(pagingRequest.getSkipCount(), pagingRequest.getMaxItems());
|
|
CannedQuerySortDetails sortDetails = new CannedQuerySortDetails(new Pair<Object, SortOrder>(SiteContainersCannedQueryParams.SortFields.ContainerName, SortOrder.ASCENDING));
|
|
SiteContainersCannedQueryParams parameterBean = new SiteContainersCannedQueryParams(getSiteNodeRef(shortName));
|
|
CannedQueryParameters params = new CannedQueryParameters(parameterBean, pageDetails, sortDetails, pagingRequest.getRequestTotalCountMax(), pagingRequest.getQueryExecutionId());
|
|
|
|
CannedQuery<FileInfo> query = sitesContainersCannedQueryFactory.getCannedQuery(params);
|
|
|
|
CannedQueryResults<FileInfo> results = query.execute();
|
|
|
|
return getPagingResults(pagingRequest, results);
|
|
}
|
|
|
|
/**
|
|
* @see org.alfresco.service.cmr.site.SiteService#hasContainer(java.lang.String)
|
|
*/
|
|
public boolean hasContainer(final String shortName, final String componentId)
|
|
{
|
|
ParameterCheck.mandatoryString("componentId", componentId);
|
|
|
|
// retrieve site
|
|
final NodeRef siteNodeRef = getSiteNodeRef(shortName);
|
|
if (siteNodeRef == null)
|
|
{
|
|
throw new SiteDoesNotExistException(shortName);
|
|
}
|
|
|
|
// retrieve component folder within site
|
|
// NOTE: component id is used for folder name
|
|
boolean hasContainer = false;
|
|
|
|
NodeRef containerRef = AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
|
{
|
|
public NodeRef doWork() throws Exception
|
|
{
|
|
return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>()
|
|
{
|
|
public NodeRef execute() throws Exception
|
|
{
|
|
try
|
|
{
|
|
return findContainer(siteNodeRef, componentId);
|
|
}
|
|
catch (FileNotFoundException e)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
}, true);
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
|
|
if(containerRef != null)
|
|
{
|
|
hasContainer = true;
|
|
}
|
|
|
|
return hasContainer;
|
|
}
|
|
|
|
/**
|
|
* Locate site "container" folder for component
|
|
*
|
|
* @param siteNodeRef
|
|
* site
|
|
* @param componentId
|
|
* component id
|
|
* @return "container" node ref, if it exists
|
|
* @throws FileNotFoundException
|
|
*/
|
|
private NodeRef findContainer(NodeRef siteNodeRef, String componentId)
|
|
throws FileNotFoundException
|
|
{
|
|
List<String> paths = new ArrayList<String>(1);
|
|
paths.add(componentId);
|
|
FileInfo fileInfo = fileFolderService.resolveNamePath(siteNodeRef,
|
|
paths);
|
|
if (!fileInfo.isFolder())
|
|
{
|
|
throw new SiteServiceException(MSG_SITE_CONTAINER_NOT_FOLDER, new Object[]{fileInfo.getName()});
|
|
}
|
|
return fileInfo.getNodeRef();
|
|
}
|
|
|
|
/**
|
|
* Helper method to create a container if missing, and mark it as a
|
|
* tag scope if it isn't already one
|
|
*/
|
|
public static NodeRef getSiteContainer(final String siteShortName,
|
|
final String componentName, final boolean create,
|
|
final SiteService siteService, final TransactionService transactionService,
|
|
final TaggingService taggingService)
|
|
{
|
|
// Does the site exist?
|
|
if(siteService.getSite(siteShortName) == null) {
|
|
// Either the site doesn't exist, or you're not allowed to see it
|
|
if(! create)
|
|
{
|
|
// Just say there's no container
|
|
return null;
|
|
}
|
|
else
|
|
{
|
|
// We can't create on a non-existant site
|
|
throw new AlfrescoRuntimeException(
|
|
"Unable to create the " + componentName + " container from a hidden or non-existant site"
|
|
);
|
|
}
|
|
}
|
|
|
|
// Check about the container
|
|
if(! siteService.hasContainer(siteShortName, componentName))
|
|
{
|
|
if(create)
|
|
{
|
|
if(transactionService.isReadOnly())
|
|
{
|
|
throw new AlfrescoRuntimeException(
|
|
"Unable to create the " + componentName + " container from a read only transaction"
|
|
);
|
|
}
|
|
|
|
// Have the site container created
|
|
if(logger.isDebugEnabled())
|
|
{
|
|
logger.debug("Creating " + componentName + " container in site " + siteShortName);
|
|
}
|
|
|
|
NodeRef container = AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<NodeRef>()
|
|
{
|
|
public NodeRef doWork() throws Exception
|
|
{
|
|
// Create the site container
|
|
NodeRef container = siteService.createContainer(
|
|
siteShortName, componentName, null, null
|
|
);
|
|
|
|
// Done
|
|
return container;
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName()
|
|
);
|
|
|
|
if(logger.isDebugEnabled())
|
|
{
|
|
logger.debug("Created " + componentName + " as " + container + " for " + siteShortName);
|
|
}
|
|
|
|
// Container is setup and ready to use
|
|
return container;
|
|
}
|
|
else
|
|
{
|
|
// No container for this site, and not allowed to create
|
|
// Have the site container created
|
|
if(logger.isDebugEnabled())
|
|
{
|
|
logger.debug("No " + componentName + " component in " + siteShortName + " and not creating");
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Container is already there
|
|
NodeRef containerTmp = null;
|
|
try
|
|
{
|
|
containerTmp = siteService.getContainer(siteShortName, componentName);
|
|
}
|
|
catch(AccessDeniedException e)
|
|
{
|
|
if(!create)
|
|
{
|
|
// Just pretend it isn't there, as they can't see it
|
|
return null;
|
|
}
|
|
else
|
|
{
|
|
// It's there, they can't see it, and they need it
|
|
throw e;
|
|
}
|
|
}
|
|
final NodeRef container = containerTmp;
|
|
|
|
// Ensure the calendar container has the tag scope aspect applied to it
|
|
if(! taggingService.isTagScope(container))
|
|
{
|
|
if(logger.isDebugEnabled())
|
|
{
|
|
logger.debug("Attaching tag scope to " + componentName + " " + container.toString() + " for " + siteShortName);
|
|
}
|
|
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Void>() {
|
|
public Void doWork() throws Exception
|
|
{
|
|
transactionService.getRetryingTransactionHelper().doInTransaction(
|
|
new RetryingTransactionCallback<Void>() {
|
|
public Void execute() throws Throwable {
|
|
// Add the tag scope aspect
|
|
taggingService.addTagScope(container);
|
|
return null;
|
|
}
|
|
}, false, true
|
|
);
|
|
return null;
|
|
}
|
|
}, AuthenticationUtil.getSystemUserName());
|
|
}
|
|
|
|
// Container is appropriately setup and configured
|
|
return container;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Helper method to get the activity data for a user
|
|
*
|
|
* @param userName user name
|
|
* @param role role
|
|
* @return
|
|
*/
|
|
private String getActivityUserData(String userName, String role)
|
|
{
|
|
String memberFN = "";
|
|
String memberLN = "";
|
|
NodeRef person = personService.getPerson(userName);
|
|
if (person != null)
|
|
{
|
|
memberFN = (String) directNodeService.getProperty(person,
|
|
ContentModel.PROP_FIRSTNAME);
|
|
memberLN = (String) directNodeService.getProperty(person,
|
|
ContentModel.PROP_LASTNAME);
|
|
}
|
|
|
|
try
|
|
{
|
|
JSONObject activityData = new JSONObject();
|
|
activityData.put("role", role);
|
|
activityData.put("memberUserName", userName);
|
|
activityData.put("memberFirstName", memberFN);
|
|
activityData.put("memberLastName", memberLN);
|
|
activityData.put("title", (memberFN + " " + memberLN + " ("
|
|
+ userName + ")").trim());
|
|
return activityData.toString();
|
|
} catch (JSONException je)
|
|
{
|
|
// log error, subsume exception
|
|
logger.error("Failed to get activity data: " + je);
|
|
return "";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Helper method to get the activity data for a group
|
|
*
|
|
* @param groupName user name
|
|
* @param role role
|
|
* @return Activity data in JSON format
|
|
*/
|
|
private String getActivityGroupData(String groupName, String role)
|
|
{
|
|
try
|
|
{
|
|
JSONObject activityData = new JSONObject();
|
|
activityData.put("role", role);
|
|
activityData.put("groupName", groupName);
|
|
|
|
return activityData.toString();
|
|
}
|
|
catch (JSONException je)
|
|
{
|
|
// log error, subsume exception
|
|
logger.error("Failed to get activity data: " + je);
|
|
return "";
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Helper to check that we are not removing the last Site Manager from a site
|
|
*
|
|
* @param shortName
|
|
* @param authorityName
|
|
* @param role
|
|
*/
|
|
private void checkLastManagerRemoval(final String shortName, final String authorityName, final String role)
|
|
{
|
|
// Check that we are not about to remove the last site manager
|
|
if (SiteModel.SITE_MANAGER.equals(role) == true)
|
|
{
|
|
String mgrGroup = getSiteRoleGroup(shortName, SITE_MANAGER, true);
|
|
Set<String> siteUserMangers = this.authorityService.getContainedAuthorities(
|
|
AuthorityType.USER, mgrGroup, true);
|
|
if (siteUserMangers.size() <= 1)
|
|
{
|
|
Set<String> siteGroupManagers = this.authorityService.getContainedAuthorities(
|
|
AuthorityType.GROUP, mgrGroup, true);
|
|
|
|
if (siteUserMangers.size() + siteGroupManagers.size() == 1)
|
|
{
|
|
throw new SiteServiceException(MSG_DO_NOT_CHANGE_MGR, new Object[] {authorityName});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public List<SiteInfo> listSites(Set<String> siteNames)
|
|
{
|
|
List<ChildAssociationRef> assocs = this.nodeService.getChildrenByName(
|
|
getSiteRoot(),
|
|
ContentModel.ASSOC_CONTAINS,
|
|
siteNames);
|
|
List<SiteInfo> result = new ArrayList<SiteInfo>(assocs.size());
|
|
for (ChildAssociationRef assoc : assocs)
|
|
{
|
|
// Ignore any node that is not a "site" type
|
|
NodeRef site = assoc.getChildRef();
|
|
QName siteClassName = this.nodeService.getType(site);
|
|
if (dictionaryService.isSubClass(siteClassName, SiteModel.TYPE_SITE))
|
|
{
|
|
result.add(createSiteInfo(site));
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
public PagingResults<SiteMembership> listSitesPaged(final String userName, List<Pair<SiteService.SortFields, Boolean>> sortProps, final PagingRequest pagingRequest)
|
|
{
|
|
SiteMembershipCannedQueryFactory sitesCannedQueryFactory = (SiteMembershipCannedQueryFactory)cannedQueryRegistry.getNamedObject("sitesCannedQueryFactory");
|
|
|
|
CannedQueryPageDetails pageDetails = new CannedQueryPageDetails(pagingRequest.getSkipCount(), pagingRequest.getMaxItems());
|
|
|
|
// sort details
|
|
CannedQuerySortDetails sortDetails = null;
|
|
if(sortProps != null)
|
|
{
|
|
List<Pair<? extends Object, SortOrder>> sortPairs = new ArrayList<Pair<? extends Object, SortOrder>>(sortProps.size());
|
|
for (Pair<SiteService.SortFields, Boolean> sortProp : sortProps)
|
|
{
|
|
sortPairs.add(new Pair<SiteService.SortFields, SortOrder>(sortProp.getFirst(), (sortProp.getSecond() ? SortOrder.ASCENDING : SortOrder.DESCENDING)));
|
|
}
|
|
|
|
sortDetails = new CannedQuerySortDetails(sortPairs);
|
|
}
|
|
|
|
SitesCannedQueryParams parameterBean = new SitesCannedQueryParams(userName);
|
|
CannedQueryParameters params = new CannedQueryParameters(parameterBean, pageDetails, sortDetails, pagingRequest.getRequestTotalCountMax(), pagingRequest.getQueryExecutionId());
|
|
|
|
CannedQuery<SiteMembership> query = sitesCannedQueryFactory.getCannedQuery(params);
|
|
|
|
CannedQueryResults<SiteMembership> results = query.execute();
|
|
|
|
return getPagingResults(pagingRequest, results);
|
|
}
|
|
|
|
private <T extends Object> PagingResults<T> getPagingResults(PagingRequest pagingRequest, final CannedQueryResults<T> results)
|
|
{
|
|
List<T> entities = null;
|
|
if (results.getPageCount() > 0)
|
|
{
|
|
entities = results.getPages().get(0);
|
|
}
|
|
else
|
|
{
|
|
entities = Collections.emptyList();
|
|
}
|
|
|
|
// set total count
|
|
final Pair<Integer, Integer> totalCount;
|
|
if (pagingRequest.getRequestTotalCountMax() > 0)
|
|
{
|
|
totalCount = results.getTotalResultCount();
|
|
}
|
|
else
|
|
{
|
|
totalCount = null;
|
|
}
|
|
|
|
final List<T> members = new ArrayList<T>(entities.size());
|
|
for (T entity : entities)
|
|
{
|
|
members.add(entity);
|
|
}
|
|
|
|
return new PagingResults<T>()
|
|
{
|
|
@Override
|
|
public String getQueryExecutionId()
|
|
{
|
|
return results.getQueryExecutionId();
|
|
}
|
|
|
|
@Override
|
|
public List<T> getPage()
|
|
{
|
|
return members;
|
|
}
|
|
|
|
@Override
|
|
public boolean hasMoreItems()
|
|
{
|
|
return results.hasMoreItems();
|
|
}
|
|
|
|
@Override
|
|
public Pair<Integer, Integer> getTotalResultCount()
|
|
{
|
|
return totalCount;
|
|
}
|
|
};
|
|
}
|
|
}
|