From c27b80dd53f2839795b355d21660a3d773281391 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Thu, 12 Mar 2009 22:23:39 +0000 Subject: [PATCH] Merged V3.1 to HEAD 13265: Fix incorrect wiring of guest user name 13266: Merged V2.1A to V3.1 13252: Fix ADB-159: Generation of content model xml throws exception 13267: Remove accidental addition of folders 13280: IndexTransactionTracker logging changes 13281: Added bean to push properties from repository properties into the VM properties 13283: Added forgotten Hibernate diff file after JAWS-223 fix 13291: Fix ETHREEOH-1340: Alfresco Repository Draft CMIS Implementation" link refers to localhost 13297: Fix ETHREEOH-885: workflow mapAuthorityToName tests don't handle sub-classed objects correctly. 13308: First part of JAWS-215 - permission migration from V2.1-A to V3.1 13313: Build fix for 2.1-A to 3.1 ACL patch ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V2.1-A:r13252 Merged /alfresco/BRANCHES/V3.1:r13265-13267,13277-13283,13286,13289,13291,13295,13297,13308-13313 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13615 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../authentication-services-context.xml | 2 +- config/alfresco/bootstrap-context.xml | 3 +- config/alfresco/core-services-context.xml | 22 + ...lfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql | 191 + .../alfresco/patch/patch-services-context.xml | 3150 +++++++++-------- config/alfresco/repository.properties | 4 + .../repo/dictionary/DictionaryDAOTest.java | 85 + .../repo/dictionary/M2ClassAssociation.java | 8 + .../repo/dictionary/M2NamedValue.java | 4 +- .../alfresco/repo/dictionary/m2binding.xml | 25 +- .../node/index/IndexTransactionTracker.java | 243 +- .../workflow/jbpm/AlfrescoAssignment.java | 14 +- .../repo/workflow/jbpm/JBPMEngine.java | 3 +- 13 files changed, 2051 insertions(+), 1703 deletions(-) create mode 100644 config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql diff --git a/config/alfresco/authentication-services-context.xml b/config/alfresco/authentication-services-context.xml index 8a45100508..fd35fcfae3 100644 --- a/config/alfresco/authentication-services-context.xml +++ b/config/alfresco/authentication-services-context.xml @@ -535,7 +535,7 @@ ${alfresco_user_store.adminusername} - ${alfresco_user_store.adminpassword} + ${alfresco_user_store.guestusername} \ No newline at end of file diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml index 3b7b380c85..b0b15b578d 100644 --- a/config/alfresco/bootstrap-context.xml +++ b/config/alfresco/bootstrap-context.xml @@ -77,7 +77,8 @@ - + + diff --git a/config/alfresco/core-services-context.xml b/config/alfresco/core-services-context.xml index 16dc901e4b..21cf88194e 100644 --- a/config/alfresco/core-services-context.xml +++ b/config/alfresco/core-services-context.xml @@ -52,6 +52,28 @@ + + + + + + ${alfresco.tcp.start_port} + + + ${alfresco.tcp.initial_hosts} + + + ${alfresco.tcp.port_range} + + + ${alfresco.udp.mcast_addr} + + + ${alfresco.udp.mcast_port} + + + + diff --git a/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql new file mode 100644 index 0000000000..169c5ae4e4 --- /dev/null +++ b/config/alfresco/dbscripts/upgrade/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql @@ -0,0 +1,191 @@ +-- +-- Title: Update for permissions schema changes +-- Database: MySQL InnoDB +-- Since: V2.2 Schema 85 +-- Author: Andy Hind +-- +-- Please contact support@alfresco.com if you need assistance with the upgrade. +-- + +CREATE TABLE alf_acl_change_set ( + id BIGINT NOT NULL AUTO_INCREMENT, + version BIGINT NOT NULL, + primary key (id) +) ENGINE=InnoDB; + + +-- Add to ACL +ALTER TABLE alf_access_control_list + ADD COLUMN type INT NOT NULL DEFAULT 0, + ADD COLUMN latest BOOLEAN NOT NULL DEFAULT TRUE, + ADD COLUMN acl_id VARCHAR(36) NOT NULL DEFAULT 'UNSET', + ADD COLUMN acl_version BIGINT NOT NULL DEFAULT 1, + ADD COLUMN inherited_acl BIGINT, + ADD COLUMN is_versioned BOOLEAN NOT NULL DEFAULT FALSE, + ADD COLUMN requires_version BOOLEAN NOT NULL DEFAULT FALSE, + ADD COLUMN acl_change_set BIGINT, + ADD COLUMN inherits_from BIGINT, + ADD INDEX fk_alf_acl_acs (acl_change_set), + ADD CONSTRAINT fk_alf_acl_acs FOREIGN KEY (acl_change_set) REFERENCES alf_acl_change_set (id), + ADD INDEX idx_alf_acl_inh (inherits, inherits_from); + +UPDATE alf_access_control_list acl + set acl_id = (acl.id); + +ALTER TABLE alf_access_control_list + ADD UNIQUE (acl_id, latest, acl_version); + +-- Create ACL member list +CREATE TABLE alf_acl_member ( + id BIGINT NOT NULL AUTO_INCREMENT, + version BIGINT NOT NULL, + acl_id BIGINT NOT NULL, + ace_id BIGINT NOT NULL, + pos INT NOT NULL, + INDEX fk_alf_aclm_acl (acl_id), + CONSTRAINT fk_alf_aclm_acl FOREIGN KEY (acl_id) REFERENCES alf_access_control_list (id), + INDEX fk_alf_aclm_ace (ace_id), + CONSTRAINT fk_alf_aclm_ace FOREIGN KEY (ace_id) REFERENCES alf_access_control_entry (id), + primary key (id), + unique(acl_id, ace_id, pos) +) ENGINE=InnoDB; + +ALTER TABLE alf_access_control_entry DROP INDEX acl_id; + +-- Extend ACE +-- not required from 2.1-A +-- ADD COLUMN auth_id BIGINT NOT NULL DEFAULT -1, +ALTER TABLE alf_access_control_entry + ADD COLUMN applies INT NOT NULL DEFAULT 0, + ADD COLUMN context_id BIGINT; + +-- remove unused +DROP TABLE alf_auth_ext_keys; + + +-- not required from 2.1-A +-- remove authority constraint +ALTER TABLE alf_access_control_entry DROP INDEX FKFFF41F99B25A50BF, DROP FOREIGN KEY FKFFF41F99B25A50BF; -- (optional) + + +-- not required from 2.1-A +-- restructure authority +-- ALTER TABLE alf_authority +-- DROP PRIMARY KEY, +-- ADD COLUMN id BIGINT NOT NULL AUTO_INCREMENT, +-- ADD COLUMN crc BIGINT, +-- CHANGE recipient authority VARCHAR(100), +-- ADD INDEX idx_alf_auth_aut (authority), +-- ADD primary key (id), +-- ADD UNIQUE (authority, crc); + +-- migrate data - fix up FK refs to authority +-- UPDATE alf_access_control_entry ace +-- set auth_id = (select id from alf_authority a where a.authority = ace.authority_id); + + +-- migrate data - build equivalent ACL entries +INSERT INTO alf_acl_member (version, acl_id, ace_id, pos) + select 1, ace.acl_id, ace.id, 0 from alf_access_control_entry ace join alf_access_control_list acl on acl.id = ace.acl_id; + +-- Create ACE context +CREATE TABLE alf_ace_context ( + id BIGINT NOT NULL AUTO_INCREMENT, + version BIGINT NOT NULL, + class_context VARCHAR(1024), + property_context VARCHAR(1024), + kvp_context VARCHAR(1024), + primary key (id) + ) ENGINE=InnoDB; + + +-- Create auth aliases table +CREATE TABLE alf_authority_alias ( + id BIGINT NOT NULL AUTO_INCREMENT, + version BIGINT NOT NULL, + auth_id BIGINT NOT NULL, + alias_id BIGINT NOT NULL, + INDEX fk_alf_autha_ali (alias_id), + CONSTRAINT fk_alf_autha_ali FOREIGN KEY (alias_id) REFERENCES alf_authority (id), + INDEX fk_alf_autha_aut (auth_id), + CONSTRAINT fk_alf_autha_aut FOREIGN KEY (auth_id) REFERENCES alf_authority (id), + primary key (id), + UNIQUE (auth_id, alias_id) +) ENGINE=InnoDB; + + +-- Tidy up unused cols on ace table and add the FK contstraint back +-- finish take out of ACL_ID +-- DROP COLUMN authority_id, +-- not required from 2.1-A +-- CHANGE auth_id authority_id BIGINT NOT NULL, +ALTER TABLE alf_access_control_entry + DROP INDEX FKFFF41F99B9553F6C, DROP FOREIGN KEY FKFFF41F99B9553F6C, + DROP INDEX FKFFF41F9960601995, DROP FOREIGN KEY FKFFF41F9960601995, + DROP COLUMN acl_id, + ADD INDEX fk_alf_ace_auth (authority_id), + ADD CONSTRAINT fk_alf_ace_auth FOREIGN KEY (authority_id) REFERENCES alf_authority (id), + ADD INDEX fk_alf_ace_perm (permission_id), + ADD CONSTRAINT fk_alf_ace_perm FOREIGN KEY (permission_id) REFERENCES alf_permission (id), + ADD INDEX fk_alf_ace_ctx (context_id), + ADD CONSTRAINT fk_alf_ace_ctx FOREIGN KEY (context_id) REFERENCES alf_ace_context (id) +; + + +CREATE TABLE alf_tmp_min_ace ( + min BIGINT NOT NULL, + permission_id BIGINT NOT NULL, + authority_id BIGINT NOT NULL, + allowed BIT(1) NOT NULL, + applies INT NOT NULL, + UNIQUE (permission_id, authority_id, allowed, applies) +) ENGINE=InnoDB; + +INSERT INTO alf_tmp_min_ace (min, permission_id, authority_id, allowed, applies) + SELECT + min(ace1.id), + ace1.permission_id, + ace1.authority_id, + ace1.allowed, + ace1.applies + FROM + alf_access_control_entry ace1 + GROUP BY + ace1.permission_id, ace1.authority_id, ace1.allowed, ace1.applies +; + + +-- Update members to point to the first use of an access control entry +UPDATE alf_acl_member mem + SET ace_id = (SELECT help.min FROM alf_access_control_entry ace + JOIN alf_tmp_min_ace help + ON help.permission_id = ace.permission_id AND + help.authority_id = ace.authority_id AND + help.allowed = ace.allowed AND + help.applies = ace.applies + WHERE ace.id = mem.ace_id ); + +DROP TABLE alf_tmp_min_ace; + +-- Remove duplicate aces the mysql way (as you can not use the deleted table in the where clause ...) + +CREATE TABLE tmp_to_delete SELECT ace.id FROM alf_acl_member mem RIGHT OUTER JOIN alf_access_control_entry ace ON mem.ace_id = ace.id WHERE mem.ace_id IS NULL; +DELETE FROM ace USING alf_access_control_entry ace JOIN tmp_to_delete t ON ace.id = t.id; +DROP TABLE tmp_to_delete; + +-- Add constraint for duplicate acls + +ALTER TABLE alf_access_control_entry + ADD UNIQUE (permission_id, authority_id, allowed, applies, context_id); + +-- +-- Record script finish +-- +DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.2-ACL'; +INSERT INTO alf_applied_patch + (id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report) + VALUES + ( + 'patch.db-V2.2-ACL-From-2.1-A', 'Manually executed script upgrade V2.2: Update acl schema', + 81, 82, -1, 120, null, 'UNKOWN', 1, 1, 'Script completed' + ); \ No newline at end of file diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml index a7bb7cbd12..6cf0c40975 100644 --- a/config/alfresco/patch/patch-services-context.xml +++ b/config/alfresco/patch/patch-services-context.xml @@ -1,1565 +1,1587 @@ - - - - - - - - org.alfresco.repo.admin.patch.PatchService - - - - - - - - - - - - - - - - PROPAGATION_NOT_SUPPORTED - ${server.transaction.mode.readOnly} - ${server.transaction.mode.default} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Sample01 - A NO-OP sample patch - 0 - 1000 - 1001 - - - Sample02 - A NO-OP sample patch - 0 - 1000 - 1001 - - - - - - - - - - - - - - - alfresco/messages/bootstrap-spaces - - - - - - - - - - patch.authoritiesFolder - patch.authoritiesFolder.description - 0 - 0 - 6 - - - - - - /${alfresco_user_store.system_container.childname}/${alfresco_user_store.authorities_container.childname} - - - - /${alfresco_user_store.system_container.childname} - alfresco/bootstrap/alfrescoAuthorityStore.xml - - - - - patch.savedSearchesFolder - patch.savedSearchesFolder.description - 0 - 1 - 2 - - - - - - - patch.savedSearchesPermission - patch.savedSearchesPermission.description - 0 - 4 - 5 - - - - - - - - - - - - - patch.updatePermissionData - patch.updatePermissionData.description - 0 - 2 - 3 - - - - - - - - - - patch.guestUser - patch.guestUser.description - 0 - 2 - 3 - - - - - - - - - - - - - - - - patch.fixNodeSerializableValues - patch.fixNodeSerializableValues.description - 0 - 3 - 4 - - - - - - - patch.updateGuestPermission - patch.updateGuestPermission.description - 0 - 5 - 6 - - - - - - - - - - - - - - - - patch.guestPersonPermission - patch.guestPersonPermission.description - 0 - 5 - 6 - - - - - - - - - - - - - - - patch.spacesRootPermission - patch.spacesRootPermission.description - 0 - 5 - 6 - - - - - - - - - - - - - - - patch.categoryRootPermission - patch.categoryRootPermission.description - 0 - 5 - 6 - - - - - - - - - - patch.contentPermission - patch.contentPermission.description - 0 - 6 - 7 - - - - - - - - - - - - - - patch.forumsIcons - patch.forumsIcons.description - 0 - 12 - 13 - - - - - - patch.emailTemplatesFolder - patch.emailTemplatesFolder.description - 0 - 12 - 13 - - - - - - - - - - patch.emailTemplatesContent - patch.emailTemplatesContent.description - 0 - 12 - 13 - alfresco/templates/email_templates.acp - - - - - - - - - - - - - - - - - - - - - - patch.descriptorUpdate - patch.descriptorUpdate.description - 0 - 11 - 12 - - - - - - - - - - patch.scriptsFolder - patch.scriptsFolder.description - 0 - 12 - 13 - alfresco/bootstrap/example_javascripts.acp - - - - - - - - - - - - - - patch.topLevelGroupParentChildAssociationTypePatch - patch.topLevelGroupParentChildAssociationTypePatch.description - 0 - 13 - 14 - - - - patch.actionRuleDecouplingPatch - patch.actionRuleDecouplingPatch.description - 0 - 14 - 15 - - - - patch.systemWorkflowFolderPatch - patch.systemWorkflowFolder.description - 0 - 15 - 16 - - - - - patch.rssFolder - patch.rssTemplatesFolder.description - 0 - 16 - 17 - alfresco/templates/rss_templates.acp - - - - - - - - - - - - - - - - - patch.uifacetsTemplates - patch.uifacetsAspectRemovalPatch.description - 0 - 17 - 18 - - - - - - - - - - - patch.guestPersonPermission2 - patch.guestPersonPermission2.description - 0 - 18 - 19 - - - - - - - - - - - patch.schemaUpdateScript-V1.4-1 - patch.schemaUpgradeScript.description - 0 - 19 - 20 - - classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-1.sql - - - - patch.uniqueChildName - patch.uniqueChildName.description - 0 - 19 - 20 - - 2.1.4 - - - - patch.schemaUpdateScript-V1.4-2 - patch.schemaUpgradeScript.description - 0 - 20 - 21 - - classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-2.sql - - - - - - - - - - patch.InvalidNameEnding - patch.invalidNameEnding.description - 0 - 21 - 22 - - - - - - - - - - patch.systemDescriptorContent - patch.systemDescriptorContent.description - 0 - 22 - 23 - - - - - - - - - - patch.versionHistoryPerformance - patch.versionHistoryPerformance.description - 0 - 38 - 39 - - - - - - patch.multilingualBootstrap - patch.multilingualBootstrap.description - 0 - 29 - 30 - - - - - - /cm:multilingualRoot - - - - / - alfresco/bootstrap/multilingualRoot.xml - - - - - - patch.authoritiesFolderPermission - patch.authoritiesFolderPermission.description - 0 - 32 - 33 - - - - - - - /${alfresco_user_store.system_container.childname} - alfresco/bootstrap/alfrescoAuthorityStorePermission.xml - - - - - - patch.LinkNodeFileExtension - patch.linkNodeExtension.description - 0 - 33 - 34 - - - - - - - - - - - patch.systemRegistryBootstrap - patch.systemRegistryBootstrap.description - 0 - 34 - 35 - - - - - - /sys:system-registry - - - - / - alfresco/bootstrap/systemRegistry.xml - - - - - - patch.userAndPersonUserNamesAsIdentifiers - patch.userAndPersonUserNamesAsIdentifiers.description - 0 - 35 - 36 - - - - - - - - - - - - - - patch.contentFormFolderType - patch.contentFormFolderType.description - 0 - 36 - 37 - - - - - - - - patch.db-V2.1-JBPMUpdate - patch.schemaUpgradeScript.description - 0 - 51 - 52 - - classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-JBPMData.sql - - - - - patch.db-V2.1-NotNullColumns - patch.schemaUpgradeScript.description - 0 - 51 - 52 - - classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-NotNullColumns.sql - - - - - patch.groupNamesAsIdentifiers - patch.groupNamesAsIdentifiers.description - 0 - 51 - 52 - - - - - - - - - - - patch.invalidUserPersonAndGroup - patch.invalidUserPersonAndGroup.description - 0 - 51 - 52 - - - - - - - - - - - - - - patch.AVMGuidPatch - patch.AVMGuidPatch.description - 0 - 51 - 52 - - - - - - - patch.webscripts - patch.webscripts.description - 0 - 50 - 51 - - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/webScripts.xml - - - - - - patch.webscriptsExtension - patch.webscriptsExtension.description - 0 - 54 - 55 - - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/webScriptsExtensions.xml - - - - - - patch.AVMLayeredSnapshot - patch.AVMLayeredSnapshot.description - 0 - 55 - 56 - - - - - - - patch.groupMembersAsIdentifiers - patch.groupMembersAsIdentifiers.description - 0 - 56 - 57 - - - - - - - - - - - patch.redeploySubmitProcess - patch.redeploySubmitProcess.description - 0 - 57 - 58 - - - - - jbpm - alfresco/workflow/submit_processdefinition.xml - text/xml - - - - - - - patch.AVMLocking - patch.AVMLocking.description - 0 - 58 - 59 - - - - - - - patch.ReadmeTemplate - patch.ReadmeTemplate.description - 0 - 59 - 60 - - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname} - alfresco/templates/readme_template.xml - - - - - - patch.webScriptsReadme - patch.webScriptsReadme.description - 0 - 59 - 60 - - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/webScriptsReadme.xml - - - - - - patch.db-V2.1-JBPMProcessKey - patch.schemaUpgradeScript.description - 0 - 62 - 63 - - classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-JBPMProcessKey.sql - - - - - patch.db-V2.1-VersionColumns2 - patch.schemaUpgradeScript.description - 0 - 63 - 64 - - classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-VersionColumns.sql - - - - - patch.webscripts2 - patch.webscripts2.description - 0 - 100 - 101 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/webScripts2.xml - - - - - - patch.customModels - patch.customModels.description - 0 - 101 - 102 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:models - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/customModelsSpace.acp - - - - - - patch.customMessages - patch.customMessages.description - 0 - 101 - 102 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:messages - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/customMessagesSpace.xml - - - - - - patch.customWebClientExtension - patch.customWebClientExtension.description - 0 - 101 - 102 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:webclient_extension - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/customWebClientExtensionSpace.xml - - - - - - patch.redeploySubmitProcess - patch.redeploySubmitProcess.description - 0 - 102 - 103 - - - - - jbpm - alfresco/workflow/submit_processdefinition.xml - text/xml - - - - - - - patch.db-V2.1-RemoveWcmSubmittedAspect - patch.schemaUpgradeScript.description - 0 - 103 - 104 - - classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-RemoveWcmSubmittedAspect.sql - - - - - patch.webscripts3 - patch.webscripts3.description - 0 - 104 - 105 - - - - - - / - alfresco/bootstrap/webScriptsReadme2.xml - - - - - - patch.customWorkflowDefs - patch.customWorkflowDefs.description - 0 - 105 - 106 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:workflow_defs - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/customWorkflowDefsSpace.acp - - - - - - patch.emailContributorGroup - patch.emailContributorGroup.description - 0 - 108 - 109 - - - - - - /${alfresco_user_store.system_container.childname}/sys:authorities/usr:GROUP_EMAIL_CONTRIBUTORS - - - - /${alfresco_user_store.system_container.childname}/sys:authorities - alfresco/bootstrap/emailServer.xml - - - - - - patch.avmStoreAsIdentifier - patch.avmStoreAsIdentifier.description - 0 - 109 - 110 - - - - - - - - - - patch.db-V1.4-TxnCommitTimeIndex - patch.schemaUpgradeScript.description - 0 - 110 - 111 - - classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-TxnCommitTimeIndex.sql - - - - - - - - - - - patch.avmFormPropertyIdentifier - patch.avmFormPropertyIdentifier.description - 0 - 111 - 112 - - - - - - - - - - patch.formsFolder - patch.formsFolder.description - 0 - 112 - 113 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:forms - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname} - alfresco/bootstrap/formsSpace.xml - - - - - - patch.tagRootCategory - patch.tagRootCategory.description - 0 - 113 - 114 - - - - - - /cm:categoryRoot/cm:taggable - - - - /cm:categoryRoot - alfresco/bootstrap/tagRootCategory.xml - - - - - - patch.deploymentMigration - patch.deploymentMigration.description - 0 - 116 - 117 - - - - - - - - - - - - - patch.redeploySubmitProcess - patch.redeploySubmitProcess.description - 0 - 117 - 118 - - - - - jbpm - alfresco/workflow/submit_processdefinition.xml - text/xml - - - - - - patch.db-V2.2-ACL - patch.schemaUpgradeScript.description - 0 - 119 - 120 - - classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.2-ACL.sql - - - - - - - - - - patch.updateAvmPermissionData - patch.updateAvmPermissionData.description - 0 - 119 - 120 - - - - - - - - - - - - - - - - patch.updateAvmPermissions - patch.updateAvmPermissions.description - 0 - 119 - 120 - - - - - - - - - - - - - - - - patch.db-V2.2-0-CreateMissingTables - patch.schemaUpgradeScript.description - 0 - 120 - 121 - - classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-0-create-missing-tables.sql - - - - - - - - - patch.db-V2.2-2-MoveQNames - patch.noOpPatch.description - 0 - 120 - 121 - - - patch.db-V2.2-Upgrade-From-2.1 - patch.schemaUpgradeScript.description - 0 - 120 - 135 - - classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.1.sql - - - - - - - - - - - - - - patch.db-V2.2-Upgrade-From-2.2SP1 - patch.schemaUpgradeScript.description - 0 - 134 - 135 - - classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.2SP1.sql - - - - - - - - - - - - - - - patch.wcmPermissionPatch - patch.wcmPermissionPatch.description - 0 - 121 - 122 - - - - - - - - - - - - - - - - - - patch.wcmPostPermissionSnapshotPatch - patch.wcmPostPermissionSnapshotPatch.description - 0 - 122 - 123 - - - - - - - - - - - - - - - - - - - patch.avmWebProjectInheritPermissions02 - patch.avmWebProjectInheritPermissions.description - 0 - 122 - 123 - - - - - - - - - - - - - - - - - - patch.db-V2.0-ContentUrls - patch.schemaUpgradeScript.description - 0 - 123 - 124 - - classpath:alfresco/dbscripts/upgrade/2.0/${db.script.dialect}/AlfrescoSchemaUpdate-2.0-ContentUrls.sql - - - - - - - - - - patch.updateDmPermissions - patch.updateDmPermissions.description - 0 - 124 - 125 - - - - - - - - - - - patch.db-V3.0-0-CreateActivitiesExtras - patch.schemaUpgradeScript.description - 0 - 125 - 126 - - classpath:alfresco/dbscripts/create/3.0/${db.script.dialect}/create-activities-extras.sql - - - - - patch.createSiteStore - patch.createSiteStore.description - 0 - 126 - 127 - - - - - - - - patch.sitesFolder - patch.sitesFolder.description - 0 - 127 - 128 - - - - - - /${spaces.company_home.childname}/st:sites - - - - /${spaces.company_home.childname} - alfresco/bootstrap/sitesSpace.xml - alfresco/messages/bootstrap-spaces - - - - - - patch.sitePermissionRefactorPatch - patch.sitePermissionRefactorPatch.description - 0 - 128 - 129 - - - - - - - - - - - - - - patch.migrateVersionStore - patch.migrateVersionStore.description - 0 - 129 - 130 - - - - - - - - - - - - - - patch.inviteEmailTemplate - patch.inviteEmailTemplate.description - 0 - 130 - 131 - - - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}/${spaces.templates.email.invite.childname} - - - - /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname} - alfresco/bootstrap/invite/invite-email.xml - - - - - - - - - - - patch.calendarNamespaceUri - patch.calendarModelNamespacePatch.description - 0 - 131 - 132 - - - - - - - - - - - - - - patch.db-V2.1-AuditPathIndex - patch.schemaUpgradeScript.description - 0 - 132 - 133 - - classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql - - - - - patch.spacesStoreGuestPermission - patch.spacesStoreGuestPermission.description - 0 - 133 - 134 - - - - - - - - - - - - - - - patch.db-V2.2-Person - patch.schemaUpgradeScript.description - 0 - 134 - 135 - - classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-Person.sql - - - - - patch.redeploySubmitProcess4 - patch.redeploySubmitProcess.description - 0 - 1000 - 1001 - - - - - jbpm - alfresco/workflow/submit_processdefinition.xml - text/xml - - - - - - - patch.administratorGroup - patch.administratorGroup.description - 0 - 1001 - 1002 - - - - - - /${alfresco_user_store.system_container.childname}/sys:authorities/usr:GROUP_ALFRESCO_ADMINISTRATORS - - - - /${alfresco_user_store.system_container.childname}/sys:authorities - alfresco/bootstrap/adminGroup.xml - - - - + + + + + + + + org.alfresco.repo.admin.patch.PatchService + + + + + + + + + + + + + + + + PROPAGATION_NOT_SUPPORTED + ${server.transaction.mode.readOnly} + ${server.transaction.mode.default} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sample01 + A NO-OP sample patch + 0 + 1000 + 1001 + + + Sample02 + A NO-OP sample patch + 0 + 1000 + 1001 + + + + + + + + + + + + + + + alfresco/messages/bootstrap-spaces + + + + + + + + + + patch.authoritiesFolder + patch.authoritiesFolder.description + 0 + 0 + 6 + + + + + + /${alfresco_user_store.system_container.childname}/${alfresco_user_store.authorities_container.childname} + + + + /${alfresco_user_store.system_container.childname} + alfresco/bootstrap/alfrescoAuthorityStore.xml + + + + + patch.savedSearchesFolder + patch.savedSearchesFolder.description + 0 + 1 + 2 + + + + + + + patch.savedSearchesPermission + patch.savedSearchesPermission.description + 0 + 4 + 5 + + + + + + + + + + + + + patch.updatePermissionData + patch.updatePermissionData.description + 0 + 2 + 3 + + + + + + + + + + patch.guestUser + patch.guestUser.description + 0 + 2 + 3 + + + + + + + + + + + + + + + + patch.fixNodeSerializableValues + patch.fixNodeSerializableValues.description + 0 + 3 + 4 + + + + + + + patch.updateGuestPermission + patch.updateGuestPermission.description + 0 + 5 + 6 + + + + + + + + + + + + + + + + patch.guestPersonPermission + patch.guestPersonPermission.description + 0 + 5 + 6 + + + + + + + + + + + + + + + patch.spacesRootPermission + patch.spacesRootPermission.description + 0 + 5 + 6 + + + + + + + + + + + + + + + patch.categoryRootPermission + patch.categoryRootPermission.description + 0 + 5 + 6 + + + + + + + + + + patch.contentPermission + patch.contentPermission.description + 0 + 6 + 7 + + + + + + + + + + + + + + patch.forumsIcons + patch.forumsIcons.description + 0 + 12 + 13 + + + + + + patch.emailTemplatesFolder + patch.emailTemplatesFolder.description + 0 + 12 + 13 + + + + + + + + + + patch.emailTemplatesContent + patch.emailTemplatesContent.description + 0 + 12 + 13 + alfresco/templates/email_templates.acp + + + + + + + + + + + + + + + + + + + + + + patch.descriptorUpdate + patch.descriptorUpdate.description + 0 + 11 + 12 + + + + + + + + + + patch.scriptsFolder + patch.scriptsFolder.description + 0 + 12 + 13 + alfresco/bootstrap/example_javascripts.acp + + + + + + + + + + + + + + patch.topLevelGroupParentChildAssociationTypePatch + patch.topLevelGroupParentChildAssociationTypePatch.description + 0 + 13 + 14 + + + + patch.actionRuleDecouplingPatch + patch.actionRuleDecouplingPatch.description + 0 + 14 + 15 + + + + patch.systemWorkflowFolderPatch + patch.systemWorkflowFolder.description + 0 + 15 + 16 + + + + + patch.rssFolder + patch.rssTemplatesFolder.description + 0 + 16 + 17 + alfresco/templates/rss_templates.acp + + + + + + + + + + + + + + + + + patch.uifacetsTemplates + patch.uifacetsAspectRemovalPatch.description + 0 + 17 + 18 + + + + + + + + + + + patch.guestPersonPermission2 + patch.guestPersonPermission2.description + 0 + 18 + 19 + + + + + + + + + + + patch.schemaUpdateScript-V1.4-1 + patch.schemaUpgradeScript.description + 0 + 19 + 20 + + classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-1.sql + + + + patch.uniqueChildName + patch.uniqueChildName.description + 0 + 19 + 20 + + 2.1.4 + + + + patch.schemaUpdateScript-V1.4-2 + patch.schemaUpgradeScript.description + 0 + 20 + 21 + + classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-2.sql + + + + + + + + + + patch.InvalidNameEnding + patch.invalidNameEnding.description + 0 + 21 + 22 + + + + + + + + + + patch.systemDescriptorContent + patch.systemDescriptorContent.description + 0 + 22 + 23 + + + + + + + + + + patch.versionHistoryPerformance + patch.versionHistoryPerformance.description + 0 + 38 + 39 + + + + + + patch.multilingualBootstrap + patch.multilingualBootstrap.description + 0 + 29 + 30 + + + + + + /cm:multilingualRoot + + + + / + alfresco/bootstrap/multilingualRoot.xml + + + + + + patch.authoritiesFolderPermission + patch.authoritiesFolderPermission.description + 0 + 32 + 33 + + + + + + + /${alfresco_user_store.system_container.childname} + alfresco/bootstrap/alfrescoAuthorityStorePermission.xml + + + + + + patch.LinkNodeFileExtension + patch.linkNodeExtension.description + 0 + 33 + 34 + + + + + + + + + + + patch.systemRegistryBootstrap + patch.systemRegistryBootstrap.description + 0 + 34 + 35 + + + + + + /sys:system-registry + + + + / + alfresco/bootstrap/systemRegistry.xml + + + + + + patch.userAndPersonUserNamesAsIdentifiers + patch.userAndPersonUserNamesAsIdentifiers.description + 0 + 35 + 36 + + + + + + + + + + + + + + patch.contentFormFolderType + patch.contentFormFolderType.description + 0 + 36 + 37 + + + + + + + + patch.db-V2.1-JBPMUpdate + patch.schemaUpgradeScript.description + 0 + 51 + 52 + + classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-JBPMData.sql + + + + + patch.db-V2.1-NotNullColumns + patch.schemaUpgradeScript.description + 0 + 51 + 52 + + classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-NotNullColumns.sql + + + + + patch.groupNamesAsIdentifiers + patch.groupNamesAsIdentifiers.description + 0 + 51 + 52 + + + + + + + + + + + patch.invalidUserPersonAndGroup + patch.invalidUserPersonAndGroup.description + 0 + 51 + 52 + + + + + + + + + + + + + + patch.AVMGuidPatch + patch.AVMGuidPatch.description + 0 + 51 + 52 + + + + + + + patch.webscripts + patch.webscripts.description + 0 + 50 + 51 + + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/webScripts.xml + + + + + + patch.webscriptsExtension + patch.webscriptsExtension.description + 0 + 54 + 55 + + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/webScriptsExtensions.xml + + + + + + patch.AVMLayeredSnapshot + patch.AVMLayeredSnapshot.description + 0 + 55 + 56 + + + + + + + patch.groupMembersAsIdentifiers + patch.groupMembersAsIdentifiers.description + 0 + 56 + 57 + + + + + + + + + + + patch.redeploySubmitProcess + patch.redeploySubmitProcess.description + 0 + 57 + 58 + + + + + jbpm + alfresco/workflow/submit_processdefinition.xml + text/xml + + + + + + + patch.AVMLocking + patch.AVMLocking.description + 0 + 58 + 59 + + + + + + + patch.ReadmeTemplate + patch.ReadmeTemplate.description + 0 + 59 + 60 + + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname} + alfresco/templates/readme_template.xml + + + + + + patch.webScriptsReadme + patch.webScriptsReadme.description + 0 + 59 + 60 + + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/webScriptsReadme.xml + + + + + + patch.db-V2.1-JBPMProcessKey + patch.schemaUpgradeScript.description + 0 + 62 + 63 + + classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-JBPMProcessKey.sql + + + + + patch.db-V2.1-VersionColumns2 + patch.schemaUpgradeScript.description + 0 + 63 + 64 + + classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-VersionColumns.sql + + + + + patch.webscripts2 + patch.webscripts2.description + 0 + 100 + 101 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/webScripts2.xml + + + + + + patch.customModels + patch.customModels.description + 0 + 101 + 102 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:models + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/customModelsSpace.acp + + + + + + patch.customMessages + patch.customMessages.description + 0 + 101 + 102 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:messages + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/customMessagesSpace.xml + + + + + + patch.customWebClientExtension + patch.customWebClientExtension.description + 0 + 101 + 102 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:webclient_extension + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/customWebClientExtensionSpace.xml + + + + + + patch.redeploySubmitProcess + patch.redeploySubmitProcess.description + 0 + 102 + 103 + + + + + jbpm + alfresco/workflow/submit_processdefinition.xml + text/xml + + + + + + + patch.db-V2.1-RemoveWcmSubmittedAspect + patch.schemaUpgradeScript.description + 0 + 103 + 104 + + classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-RemoveWcmSubmittedAspect.sql + + + + + patch.webscripts3 + patch.webscripts3.description + 0 + 104 + 105 + + + + + + / + alfresco/bootstrap/webScriptsReadme2.xml + + + + + + patch.customWorkflowDefs + patch.customWorkflowDefs.description + 0 + 105 + 106 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:workflow_defs + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/customWorkflowDefsSpace.acp + + + + + + patch.emailContributorGroup + patch.emailContributorGroup.description + 0 + 108 + 109 + + + + + + /${alfresco_user_store.system_container.childname}/sys:authorities/usr:GROUP_EMAIL_CONTRIBUTORS + + + + /${alfresco_user_store.system_container.childname}/sys:authorities + alfresco/bootstrap/emailServer.xml + + + + + + patch.avmStoreAsIdentifier + patch.avmStoreAsIdentifier.description + 0 + 109 + 110 + + + + + + + + + + patch.db-V1.4-TxnCommitTimeIndex + patch.schemaUpgradeScript.description + 0 + 110 + 111 + + classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-TxnCommitTimeIndex.sql + + + + + + + + + + + patch.avmFormPropertyIdentifier + patch.avmFormPropertyIdentifier.description + 0 + 111 + 112 + + + + + + + + + + patch.formsFolder + patch.formsFolder.description + 0 + 112 + 113 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/app:forms + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname} + alfresco/bootstrap/formsSpace.xml + + + + + + patch.tagRootCategory + patch.tagRootCategory.description + 0 + 113 + 114 + + + + + + /cm:categoryRoot/cm:taggable + + + + /cm:categoryRoot + alfresco/bootstrap/tagRootCategory.xml + + + + + + patch.deploymentMigration + patch.deploymentMigration.description + 0 + 116 + 117 + + + + + + + + + + + + + patch.redeploySubmitProcess + patch.redeploySubmitProcess.description + 0 + 117 + 118 + + + + + jbpm + alfresco/workflow/submit_processdefinition.xml + text/xml + + + + + + + patch.db-V2.2-ACL-From-2.1-A + patch.schemaUpgradeScript.description + 0 + ${V2.1-A.fixes.to.schema} + 120 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql + + + + + + + + + + patch.db-V2.2-ACL + patch.schemaUpgradeScript.description + 0 + 119 + 120 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.2-ACL.sql + + + + + + + + + + + + + + + patch.updateAvmPermissionData + patch.updateAvmPermissionData.description + 0 + 119 + 120 + + + + + + + + + + + + + + + + patch.updateAvmPermissions + patch.updateAvmPermissions.description + 0 + 119 + 120 + + + + + + + + + + + + + + + + patch.db-V2.2-0-CreateMissingTables + patch.schemaUpgradeScript.description + 0 + 120 + 121 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-0-create-missing-tables.sql + + + + + + + + + patch.db-V2.2-2-MoveQNames + patch.noOpPatch.description + 0 + 120 + 121 + + + patch.db-V2.2-Upgrade-From-2.1 + patch.schemaUpgradeScript.description + 0 + 120 + 135 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.1.sql + + + + + + + + + + + + + + patch.db-V2.2-Upgrade-From-2.2SP1 + patch.schemaUpgradeScript.description + 0 + 134 + 135 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.2SP1.sql + + + + + + + + + + + + + + + patch.wcmPermissionPatch + patch.wcmPermissionPatch.description + 0 + 121 + 122 + + + + + + + + + + + + + + + + + + patch.wcmPostPermissionSnapshotPatch + patch.wcmPostPermissionSnapshotPatch.description + 0 + 122 + 123 + + + + + + + + + + + + + + + + + + + patch.avmWebProjectInheritPermissions02 + patch.avmWebProjectInheritPermissions.description + 0 + 122 + 123 + + + + + + + + + + + + + + + + + + patch.db-V2.0-ContentUrls + patch.schemaUpgradeScript.description + 0 + 123 + 124 + + classpath:alfresco/dbscripts/upgrade/2.0/${db.script.dialect}/AlfrescoSchemaUpdate-2.0-ContentUrls.sql + + + + + + + + + + patch.updateDmPermissions + patch.updateDmPermissions.description + 0 + 124 + 125 + + + + + + + + + + + patch.db-V3.0-0-CreateActivitiesExtras + patch.schemaUpgradeScript.description + 0 + 125 + 126 + + classpath:alfresco/dbscripts/create/3.0/${db.script.dialect}/create-activities-extras.sql + + + + + patch.createSiteStore + patch.createSiteStore.description + 0 + 126 + 127 + + + + + + + + patch.sitesFolder + patch.sitesFolder.description + 0 + 127 + 128 + + + + + + /${spaces.company_home.childname}/st:sites + + + + /${spaces.company_home.childname} + alfresco/bootstrap/sitesSpace.xml + alfresco/messages/bootstrap-spaces + + + + + + patch.sitePermissionRefactorPatch + patch.sitePermissionRefactorPatch.description + 0 + 128 + 129 + + + + + + + + + + + + + + patch.migrateVersionStore + patch.migrateVersionStore.description + 0 + 129 + 130 + + + + + + + + + + + + + + patch.inviteEmailTemplate + patch.inviteEmailTemplate.description + 0 + 130 + 131 + + + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}/${spaces.templates.email.invite.childname} + + + + /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname} + alfresco/bootstrap/invite/invite-email.xml + + + + + + + + + + + patch.calendarNamespaceUri + patch.calendarModelNamespacePatch.description + 0 + 131 + 132 + + + + + + + + + + + + + + patch.db-V2.1-AuditPathIndex + patch.schemaUpgradeScript.description + 0 + 132 + 133 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-AuditPathIndex.sql + + + + + patch.spacesStoreGuestPermission + patch.spacesStoreGuestPermission.description + 0 + 133 + 134 + + + + + + + + + + + + + + + patch.db-V2.2-Person + patch.schemaUpgradeScript.description + 0 + 134 + 135 + + classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-Person.sql + + + + + patch.redeploySubmitProcess4 + patch.redeploySubmitProcess.description + 0 + 1000 + 1001 + + + + + jbpm + alfresco/workflow/submit_processdefinition.xml + text/xml + + + + + + + patch.administratorGroup + patch.administratorGroup.description + 0 + 1001 + 1002 + + + + + + /${alfresco_user_store.system_container.childname}/sys:authorities/usr:GROUP_ALFRESCO_ADMINISTRATORS + + + + /${alfresco_user_store.system_container.childname}/sys:authorities + alfresco/bootstrap/adminGroup.xml + + + + patch.redeploySubmitProcess5 @@ -1597,7 +1619,7 @@ - + patch.moveWCMToGroupBasedPermissionsPatch patch.moveWCMToGroupBasedPermissionsPatch.description @@ -1694,4 +1716,4 @@ - + diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties index 7c585c5756..fc893ba586 100644 --- a/config/alfresco/repository.properties +++ b/config/alfresco/repository.properties @@ -306,3 +306,7 @@ img.root=./ImageMagick img.dyn=${img.root}/lib img.exe=${img.root}/bin/convert swf.exe=./bin/pdf2swf + +# Property to enable upgrade from 2.1-A +V2.1-A.fixes.to.schema=0 +#V2.1-A.fixes.to.schema=82 diff --git a/source/java/org/alfresco/repo/dictionary/DictionaryDAOTest.java b/source/java/org/alfresco/repo/dictionary/DictionaryDAOTest.java index 9bcc4cc3ef..29a246cb27 100644 --- a/source/java/org/alfresco/repo/dictionary/DictionaryDAOTest.java +++ b/source/java/org/alfresco/repo/dictionary/DictionaryDAOTest.java @@ -24,6 +24,10 @@ */ package org.alfresco.repo.dictionary; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -33,6 +37,7 @@ import net.sf.ehcache.Cache; import net.sf.ehcache.CacheManager; import org.alfresco.i18n.I18NUtil; +import org.alfresco.model.ContentModel; import org.alfresco.repo.cache.EhCacheAdapter; import org.alfresco.repo.dictionary.constraint.RegexConstraint; import org.alfresco.repo.dictionary.constraint.StringLengthConstraint; @@ -44,10 +49,12 @@ import org.alfresco.service.cmr.dictionary.ClassDefinition; import org.alfresco.service.cmr.dictionary.Constraint; import org.alfresco.service.cmr.dictionary.ConstraintDefinition; import org.alfresco.service.cmr.dictionary.DataTypeDefinition; +import org.alfresco.service.cmr.dictionary.DictionaryException; import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.cmr.dictionary.ModelDefinition; import org.alfresco.service.cmr.dictionary.PropertyDefinition; import org.alfresco.service.cmr.dictionary.TypeDefinition; +import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.QName; @@ -372,4 +379,82 @@ public class DictionaryDAOTest extends TestCase childAssocDef = (ChildAssociationDefinition) assocDef; assertTrue("Expected 'true' for timestamp propagation", childAssocDef.getPropagateTimestamps()); } + + public void testADB159() throws UnsupportedEncodingException + { + // source dictionary + TenantService tenantService = new SingleTServiceImpl(); + NamespaceDAOImpl namespaceDAO = new NamespaceDAOImpl(); + namespaceDAO.setTenantService(tenantService); + initNamespaceCaches(namespaceDAO); + DictionaryDAOImpl dictionaryDAO = new DictionaryDAOImpl(namespaceDAO); + dictionaryDAO.setTenantService(tenantService); + initDictionaryCaches(dictionaryDAO); + + // destination dictionary + NamespaceDAOImpl namespaceDAO2 = new NamespaceDAOImpl(); + namespaceDAO2.setTenantService(tenantService); + initNamespaceCaches(namespaceDAO2); + DictionaryDAOImpl dictionaryDAO2 = new DictionaryDAOImpl(namespaceDAO2); + dictionaryDAO2.setTenantService(tenantService); + initDictionaryCaches(dictionaryDAO2); + + List models = new ArrayList(); + models.add("alfresco/model/dictionaryModel.xml"); + models.add("alfresco/model/systemModel.xml"); + models.add("alfresco/model/contentModel.xml"); + models.add("alfresco/model/wcmModel.xml"); + models.add("alfresco/model/applicationModel.xml"); + models.add("org/alfresco/repo/security/authentication/userModel.xml"); + models.add("org/alfresco/repo/action/actionModel.xml"); + models.add("org/alfresco/repo/rule/ruleModel.xml"); + models.add("org/alfresco/repo/version/version_model.xml"); + + // round-trip default models + for (String bootstrapModel : models) + { + InputStream modelStream = getClass().getClassLoader().getResourceAsStream(bootstrapModel); + if (modelStream == null) + { + throw new DictionaryException("Could not find bootstrap model " + bootstrapModel); + } + try + { + // parse model from xml + M2Model model = M2Model.createModel(modelStream); + dictionaryDAO.putModel(model); + + // regenerate xml from model + ByteArrayOutputStream xml1 = new ByteArrayOutputStream(); + model.toXML(xml1); + + // register regenerated xml with other dictionary + M2Model model2 = M2Model.createModel(new ByteArrayInputStream(xml1.toByteArray())); + dictionaryDAO2.putModel(model2); + } + catch(DictionaryException e) + { + throw new DictionaryException("Could not import bootstrap model " + bootstrapModel, e); + } + } + + // specific test case + M2Model model = M2Model.createModel("test:adb25"); + model.createNamespace(TEST_URL, "test"); + model.createImport(NamespaceService.DICTIONARY_MODEL_1_0_URI, NamespaceService.DICTIONARY_MODEL_PREFIX); + model.createImport(NamespaceService.SYSTEM_MODEL_1_0_URI, NamespaceService.SYSTEM_MODEL_PREFIX); + model.createImport(NamespaceService.CONTENT_MODEL_1_0_URI, NamespaceService.CONTENT_MODEL_PREFIX); + + M2Type testType = model.createType("test:adb25" ); + testType.setParentName("cm:" + ContentModel.TYPE_CONTENT.getLocalName()); + + M2Property prop1 = testType.createProperty("test:prop1"); + prop1.setMandatory(false); + prop1.setType("d:" + DataTypeDefinition.TEXT.getLocalName()); + prop1.setMultiValued(false); + + ByteArrayOutputStream xml1 = new ByteArrayOutputStream(); + model.toXML(xml1); + } + } diff --git a/source/java/org/alfresco/repo/dictionary/M2ClassAssociation.java b/source/java/org/alfresco/repo/dictionary/M2ClassAssociation.java index 75c15087b8..95cadeea4e 100644 --- a/source/java/org/alfresco/repo/dictionary/M2ClassAssociation.java +++ b/source/java/org/alfresco/repo/dictionary/M2ClassAssociation.java @@ -171,6 +171,10 @@ public abstract class M2ClassAssociation this.targetRoleName = name; } + public Boolean getTargetMandatory() + { + return isTargetMandatory(); + } public boolean isTargetMandatory() { @@ -183,6 +187,10 @@ public abstract class M2ClassAssociation this.isTargetMandatory = isTargetMandatory; } + public Boolean getTargetMandatoryEnforced() + { + return isTargetMandatoryEnforced(); + } public boolean isTargetMandatoryEnforced() { diff --git a/source/java/org/alfresco/repo/dictionary/M2NamedValue.java b/source/java/org/alfresco/repo/dictionary/M2NamedValue.java index 6f2abea5d4..964ee5ed31 100644 --- a/source/java/org/alfresco/repo/dictionary/M2NamedValue.java +++ b/source/java/org/alfresco/repo/dictionary/M2NamedValue.java @@ -34,8 +34,8 @@ import java.util.List; public class M2NamedValue { private String name; - private String simpleValue; - private List listValue; + private String simpleValue = null; + private List listValue = null; /*package*/ M2NamedValue() { diff --git a/source/java/org/alfresco/repo/dictionary/m2binding.xml b/source/java/org/alfresco/repo/dictionary/m2binding.xml index 12223aa415..658e4eb728 100644 --- a/source/java/org/alfresco/repo/dictionary/m2binding.xml +++ b/source/java/org/alfresco/repo/dictionary/m2binding.xml @@ -61,7 +61,6 @@ - @@ -74,18 +73,18 @@ - + - + - + @@ -94,7 +93,7 @@ - + @@ -117,20 +116,16 @@ - + - - - + - - - - + + @@ -158,8 +153,8 @@ - - + + diff --git a/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java b/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java index 863c0f9eb1..d55c6cabc3 100644 --- a/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java +++ b/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java @@ -1,26 +1,26 @@ /* - * Copyright (C) 2005-2009 Alfresco Software Limited. + * Copyright (C) 2005-2009 Alfresco Software Limited. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program 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 General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - * As a special exception to the terms and conditions of version 2.0 of - * the GPL, you may redistribute this Program in connection with Free/Libre - * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing - * the FLOSS exception, and it is also available here: - * http://www.alfresco.com/legal/licensing" + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program 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 General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" */ package org.alfresco.repo.node.index; @@ -36,7 +36,7 @@ import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.repo.domain.Transaction; import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; -import org.alfresco.util.ISO8601DateFormat; +import org.alfresco.util.ISO8601DateFormat; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -65,10 +65,10 @@ public class IndexTransactionTracker extends AbstractReindexComponent private Map voids; private boolean forceReindex; - private long fromTxnId; - private String statusMsg; - private static final String NO_REINDEX = "No reindex in progress"; - + private long fromTxnId; + private String statusMsg; + private static final String NO_REINDEX = "No reindex in progress"; + /** * Set the defaults. *
    @@ -86,16 +86,16 @@ public class IndexTransactionTracker extends AbstractReindexComponent maxRecordSetSize = 1000; maxTransactionsPerLuceneCommit = 100; disableInTransactionIndexing = false; - - started = false; + + started = false; previousTxnIds = Collections.emptyList(); lastMaxTxnId = Long.MAX_VALUE; fromTimeInclusive = -1L; voids = new TreeMap(); forceReindex = false; - - fromTxnId = 0L; - statusMsg = NO_REINDEX; + + fromTxnId = 0L; + statusMsg = NO_REINDEX; } public synchronized void setListener(IndexTransactionTrackerListener listener) @@ -195,26 +195,29 @@ public class IndexTransactionTracker extends AbstractReindexComponent return reindexInTransaction(); } }; - - public void resetFromTxn(long txnId) - { - logger.info("resetFromTxn: "+txnId); - - this.fromTxnId = txnId; - this.started = false; // this will cause index tracker to break out (so that it can be re-started) - } + + public void resetFromTxn(long txnId) + { + if (logger.isInfoEnabled()) + { + logger.info("resetFromTxn: " + txnId); + } + + this.fromTxnId = txnId; + this.started = false; // this will cause index tracker to break out (so that it can be re-started) + } @Override protected void reindexImpl() { - if (logger.isDebugEnabled()) - { - logger.debug("reindexImpl started: " + this); - } - + if (logger.isInfoEnabled()) + { + logger.info("reindexImpl started: " + this); + } + RetryingTransactionHelper retryingTransactionHelper = transactionService.getRetryingTransactionHelper(); - - if (!started) + + if (!started) { // Disable in-transaction indexing if (disableInTransactionIndexing && nodeIndexer != null) @@ -226,29 +229,37 @@ public class IndexTransactionTracker extends AbstractReindexComponent voids.clear(); previousTxnIds = new ArrayList(maxRecordSetSize); lastMaxTxnId = null; // So that it is ignored at first - - if (this.fromTxnId != 0L) - { - logger.info("reindexImpl: start fromTxnId: "+fromTxnId+" "+this); - - Long fromTxnCommitTime = getTxnCommitTime(this.fromTxnId); - - if (fromTxnCommitTime == null) - { - return; - } - - fromTimeInclusive = fromTxnCommitTime; - } - else - { - fromTimeInclusive = retryingTransactionHelper.doInTransaction(getStartingCommitTimeWork, true, true); - } - - fromTxnId = 0L; + + if (this.fromTxnId != 0L) + { + if (logger.isInfoEnabled()) + { + logger.info("reindexImpl: start fromTxnId: " + fromTxnId); + } + + Long fromTxnCommitTime = getTxnCommitTime(this.fromTxnId); + + if (fromTxnCommitTime == null) + { + return; + } + + fromTimeInclusive = fromTxnCommitTime; + } + else + { + fromTimeInclusive = retryingTransactionHelper.doInTransaction(getStartingCommitTimeWork, true, true); + } + + fromTxnId = 0L; started = true; - - logger.info("reindexImpl: start fromTimeInclusive: "+ISO8601DateFormat.format(new Date(fromTimeInclusive))+" "+this); + + if (logger.isInfoEnabled()) + { + logger.info( + "reindexImpl: start fromTimeInclusive: " + + ISO8601DateFormat.format(new Date(fromTimeInclusive))); + } } while (true) @@ -262,36 +273,36 @@ public class IndexTransactionTracker extends AbstractReindexComponent } // Wait for the asynchronous reindexing to complete waitForAsynchronousReindexing(); - - if (logger.isTraceEnabled()) - { - logger.trace("reindexImpl: completed: "+this); - } - - statusMsg = NO_REINDEX; + + if (logger.isTraceEnabled()) + { + logger.trace("reindexImpl: completed: "+this); + } + + statusMsg = NO_REINDEX; + } + + private Long getTxnCommitTime(final long txnId) + { + RetryingTransactionHelper retryingTransactionHelper = transactionService.getRetryingTransactionHelper(); + + RetryingTransactionCallback getTxnCommitTimeWork = new RetryingTransactionCallback() + { + public Long execute() throws Exception + { + Transaction txn = nodeDaoService.getTxnById(txnId); + if (txn != null) + { + return txn.getCommitTimeMs(); + } + + logger.warn("Txn not found: "+txnId); + return null; + } + }; + + return retryingTransactionHelper.doInTransaction(getTxnCommitTimeWork, true, true); } - - private Long getTxnCommitTime(final long txnId) - { - RetryingTransactionHelper retryingTransactionHelper = transactionService.getRetryingTransactionHelper(); - - RetryingTransactionCallback getTxnCommitTimeWork = new RetryingTransactionCallback() - { - public Long execute() throws Exception - { - Transaction txn = nodeDaoService.getTxnById(txnId); - if (txn != null) - { - return txn.getCommitTimeMs(); - } - - logger.warn("Txn not found: "+txnId); - return null; - } - }; - - return retryingTransactionHelper.doInTransaction(getTxnCommitTimeWork, true, true); - } /** * @return Returns true if the reindex process can exit otherwise false if @@ -299,8 +310,8 @@ public class IndexTransactionTracker extends AbstractReindexComponent */ private boolean reindexInTransaction() { - List txns = null; - + List txns = null; + long toTimeExclusive = System.currentTimeMillis() - reindexLagMs; // Check that the voids haven't been filled @@ -316,7 +327,7 @@ public class IndexTransactionTracker extends AbstractReindexComponent } // get next transactions to index - txns = getNextTransactions(fromTimeInclusive, toTimeExclusive, previousTxnIds); + txns = getNextTransactions(fromTimeInclusive, toTimeExclusive, previousTxnIds); // If there are no transactions, then all the work is done if (txns.size() == 0) @@ -327,15 +338,15 @@ public class IndexTransactionTracker extends AbstractReindexComponent return false; } - statusMsg = String.format( - "Reindexing batch of %d transactions from %s (txnId=%s)", - txns.size(), - (new Date(fromTimeInclusive)).toString(), - txns.isEmpty() ? "---" : txns.get(0).getId().toString()); - + statusMsg = String.format( + "Reindexing batch of %d transactions from %s (txnId=%s)", + txns.size(), + (new Date(fromTimeInclusive)).toString(), + txns.isEmpty() ? "---" : txns.get(0).getId().toString()); + if (logger.isDebugEnabled()) { - logger.debug(statusMsg); + logger.debug(statusMsg); } // Reindex the transactions. Voids between the last set of transactions and this @@ -372,9 +383,9 @@ public class IndexTransactionTracker extends AbstractReindexComponent previousTxnIds.add(txn.getId()); } - if (isShuttingDown() || (! started)) + if (isShuttingDown() || (! started)) { - // break out if the VM is shutting down or tracker has been reset (ie. !started) + // break out if the VM is shutting down or tracker has been reset (ie. !started) return false; } else @@ -384,11 +395,11 @@ public class IndexTransactionTracker extends AbstractReindexComponent } } - public String getReindexStatus() - { - return statusMsg; - } - + public String getReindexStatus() + { + return statusMsg; + } + private static final long ONE_HOUR_MS = 3600*1000; /** * Find a transaction time to start indexing from (inclusive). The last recorded transaction by ID @@ -633,9 +644,9 @@ found: } } - if (isShuttingDown() || (! started)) + if (isShuttingDown() || (! started)) { - // break out if the VM is shutting down or tracker has been reset (ie. !started) + // break out if the VM is shutting down or tracker has been reset (ie. !started) break; } // Flush the reindex buffer, if it is full or if we are on the last transaction and there are no more diff --git a/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoAssignment.java b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoAssignment.java index fc8ec7ca35..392d73e6f1 100644 --- a/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoAssignment.java +++ b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoAssignment.java @@ -32,6 +32,7 @@ import org.alfresco.model.ContentModel; import org.alfresco.repo.jscript.ScriptNode; import org.alfresco.repo.security.authority.AuthorityDAO; import org.alfresco.service.ServiceRegistry; +import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.cmr.workflow.WorkflowException; import org.alfresco.service.namespace.QName; import org.dom4j.Element; @@ -50,6 +51,7 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler { private static final long serialVersionUID = 1025667849552265719L; private ServiceRegistry services; + private DictionaryService dictionaryService; private AuthorityDAO authorityDAO; private Element actor; @@ -63,6 +65,7 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler protected void initialiseHandler(BeanFactory factory) { services = (ServiceRegistry)factory.getBean(ServiceRegistry.SERVICE_REGISTRY); + dictionaryService = services.getDictionaryService(); authorityDAO = (AuthorityDAO)factory.getBean("authorityDAO"); } @@ -162,6 +165,10 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler if (node instanceof ScriptNode) { String actor = mapAuthorityToName((ScriptNode)node, true); + if (actor == null) + { + throw new WorkflowException("pooledactors expression does not evaluate to a collection of authorities"); + } actors.add(actor); } } @@ -218,15 +225,16 @@ public class AlfrescoAssignment extends JBPMSpringAssignmentHandler { String name = null; QName type = authority.getQNameType(); - if (type.equals(ContentModel.TYPE_PERSON)) + + if (dictionaryService.isSubClass(type, ContentModel.TYPE_PERSON)) { name = (String)authority.getProperties().get(ContentModel.PROP_USERNAME); } - else if (type.equals(ContentModel.TYPE_AUTHORITY)) + else if (allowGroup && dictionaryService.isSubClass(type, ContentModel.TYPE_AUTHORITY_CONTAINER)) { name = authorityDAO.getAuthorityName(authority.getNodeRef()); } - else if (allowGroup && type.equals(ContentModel.TYPE_AUTHORITY_CONTAINER)) + else if (type.equals(ContentModel.TYPE_AUTHORITY)) { name = authorityDAO.getAuthorityName(authority.getNodeRef()); } diff --git a/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngine.java b/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngine.java index 5a9da245be..6dd5389813 100644 --- a/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngine.java +++ b/source/java/org/alfresco/repo/workflow/jbpm/JBPMEngine.java @@ -2576,7 +2576,8 @@ public class JBPMEngine extends BPMEngine { String name = null; QName type = nodeService.getType(authority); - if (type.equals(ContentModel.TYPE_PERSON)) + + if (dictionaryService.isSubClass(type, ContentModel.TYPE_PERSON)) { name = (String)nodeService.getProperty(authority, ContentModel.PROP_USERNAME); }