diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml
index 3ee4b4076e..00ea36bafd 100644
--- a/config/alfresco/bootstrap-context.xml
+++ b/config/alfresco/bootstrap-context.xml
@@ -94,7 +94,6 @@
-
@@ -114,10 +113,6 @@
-
-
-
-
diff --git a/config/alfresco/dbscripts/upgrade/2.0/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.0-ContentUrls.sql b/config/alfresco/dbscripts/upgrade/2.0/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.0-ContentUrls.sql
deleted file mode 100644
index 0263eabfcc..0000000000
--- a/config/alfresco/dbscripts/upgrade/2.0/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.0-ContentUrls.sql
+++ /dev/null
@@ -1,24 +0,0 @@
---
--- Title: Indexes for alf_content_url table
--- Database: Generic
--- Since: V2.0 Schema 44
--- Author: Derek Hulley
---
--- Please contact support@alfresco.com if you need assistance with the upgrade.
---
-
--- Content URLs
-SELECT COUNT(*) FROM alf_content_url;
-CREATE INDEX idx_alf_con_urls ON alf_content_url (content_url);(optional)
-
---
--- Record script finish
---
-DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.0-ContentUrls';
-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.0-ContentUrls', 'Manually executed script upgrade V2.0: Indexes for alf_content_url table',
- 0, 123, -1, 124, null, 'UNKOWN', ${TRUE}, ${TRUE}, 'Script completed'
- );
\ No newline at end of file
diff --git a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-JBPMData.sql b/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-JBPMData.sql
deleted file mode 100644
index b53ef811c8..0000000000
--- a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-JBPMData.sql
+++ /dev/null
@@ -1,29 +0,0 @@
---
--- Title: Jbpm 3.1.2 -> 3.2 Data Migration
--- Database: Generic
--- Since: V2.1 Schema 52
--- Author: David Caruana
---
--- Please contact support@alfresco.com if you need assistance with the upgrade.
---
-
-UPDATE JBPM_TASK SET PRIORITY_ = 2;
-UPDATE JBPM_NODE SET ISASYNCEXCL_ = ${FALSE};
-UPDATE JBPM_MODULEINSTANCE SET VERSION_ = 0;
-UPDATE JBPM_POOLEDACTOR SET VERSION_ = 0;
-UPDATE JBPM_SWIMLANEINSTANCE SET VERSION_ = 0;
-UPDATE JBPM_TASKINSTANCE SET VERSION_ = 0;
-UPDATE JBPM_TOKENVARIABLEMAP SET VERSION_ = 0;
-UPDATE JBPM_VARIABLEINSTANCE SET VERSION_ = 0;
-
---
--- Record script finish
---
-DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-JBPMUpdate';
-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.1-JBPMUpdate', 'Manually executed script upgrade V2.1: JBPM 3.1.2 to 3.2 Data Upgrade',
- 0, 51, -1, 52, null, 'UNKOWN', ${TRUE}, ${TRUE}, 'Script completed'
- );
\ No newline at end of file
diff --git a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-JBPMProcessKey.sql b/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-JBPMProcessKey.sql
deleted file mode 100644
index e81c69f5b2..0000000000
--- a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-JBPMProcessKey.sql
+++ /dev/null
@@ -1,22 +0,0 @@
---
--- Title: Jbpm 3.2 Process Instance Key
--- Database: Generic
--- Since: V2.1 Schema 63
--- Author: David Caruana
---
--- Please contact support@alfresco.com if you need assistance with the upgrade.
---
-
-UPDATE JBPM_PROCESSINSTANCE SET KEY_ = ID_ WHERE KEY_ IS NULL;
-
---
--- Record script finish
---
-DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-JBPMProcessKey';
-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.1-JBPMProcessKey', 'Manually executed script upgrade V2.1: JBPM 3.2 Process Instance Key',
- 0, 62, -1, 63, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
- );
\ No newline at end of file
diff --git a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-NotNullColumns.sql b/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-NotNullColumns.sql
deleted file mode 100644
index 8a3ec9621b..0000000000
--- a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-NotNullColumns.sql
+++ /dev/null
@@ -1,21 +0,0 @@
---
--- Title: Add text columns that allow null
--- Database: Generic
--- Since: V2.1 Schema 64
--- Author: Derek Hulley
---
--- Please contact support@alfresco.com if you need assistance with the upgrade.
---
--- This is a Sybase issue, so nothing is required here.
-
---
--- Record script finish
---
-DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-NotNullColumns';
-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.1-NotNullColumns', 'Manually executed script upgrade V2.1: Add nullable columns',
- 0, 63, -1, 64, null, 'UNKOWN', ${TRUE}, ${TRUE}, 'Script completed'
- );
\ No newline at end of file
diff --git a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-VersionColumns.sql b/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-VersionColumns.sql
deleted file mode 100644
index d745ac541f..0000000000
--- a/config/alfresco/dbscripts/upgrade/2.1/org.hibernate.dialect.Dialect/AlfrescoSchemaUpdate-2.1-VersionColumns.sql
+++ /dev/null
@@ -1,33 +0,0 @@
---
--- Title: Fill 'version' columns with data
--- Database: Generic
--- Since: V2.1 Schema 54
--- Author: Derek Hulley
---
--- Please contact support@alfresco.com if you need assistance with the upgrade.
---
-
-UPDATE alf_store SET version = 1 WHERE version IS NULL;
-UPDATE alf_node SET version = 1 WHERE version IS NULL;
-UPDATE alf_child_assoc SET version = 1 WHERE version IS NULL;
-UPDATE alf_node_assoc SET version = 1 WHERE version IS NULL;
-UPDATE alf_node_status SET version = 1 WHERE version IS NULL;
-UPDATE alf_transaction SET version = 1 WHERE version IS NULL;
-UPDATE alf_server SET version = 1 WHERE version IS NULL;
-UPDATE alf_access_control_list SET version = 1 WHERE version IS NULL;
-UPDATE alf_access_control_entry SET version = 1 WHERE version IS NULL;
-UPDATE alf_permission SET version = 1 WHERE version IS NULL;
-UPDATE alf_authority SET version = 1 WHERE version IS NULL;
-UPDATE alf_version_count SET version = 1 WHERE version IS NULL;
-
---
--- Record script finish
---
-DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-VersionColumns2';
-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.1-VersionColumns2', 'Manually executed script upgrade V2.1: Created initial version number for ADM entities',
- 0, 63, -1, 64, null, 'UNKOWN', ${TRUE}, ${TRUE}, 'Script completed'
- );
\ No newline at end of file
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/patch-common-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/patch-common-SqlMap.xml
index 96a9b4604d..890a9c49bd 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/patch-common-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/patch-common-SqlMap.xml
@@ -74,6 +74,10 @@
+
+
+
+
@@ -270,6 +274,47 @@
name not in ('alfresco-tenants', '.avm_lock_table', '.PropertyBackedBeans', '.ChainingUserRegistrySynchronizer')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/permissions-common-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/permissions-common-SqlMap.xml
index e1edbb93ec..457de44228 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/permissions-common-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/permissions-common-SqlMap.xml
@@ -377,48 +377,6 @@
acl_id = ?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ patch.savedSearchesFolderpatch.savedSearchesFolder.description012
-
-
-
-
-
-
-
-
+
+ 3.3
-
+ patch.savedSearchesPermissionpatch.savedSearchesPermission.description045
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
+ patch.updatePermissionDatapatch.updatePermissionData.description023
-
-
-
+
+ 3.3
-
+ patch.guestUserpatch.guestUser.description023
-
-
-
+
+ 3.3
-
-
-
-
-
-
-
-
- patch.fixNodeSerializableValues
@@ -179,265 +155,163 @@
3.2
-
+ patch.updateGuestPermissionpatch.updateGuestPermission.description056
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
+ patch.guestPersonPermissionpatch.guestPersonPermission.description056
-
-
-
-
-
-
-
-
-
-
-
-
-
+ patch.spacesRootPermissionpatch.spacesRootPermission.description056
-
-
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
+ patch.categoryRootPermissionpatch.categoryRootPermission.description056
-
-
-
-
-
-
+
+ 3.3
-
+ patch.contentPermissionpatch.contentPermission.description067
-
-
-
-
-
-
-
+
+ 3.3
-
+ patch.forumsIconspatch.forumsIcons.description01213
-
-
+
+ 3.3
-
+ patch.emailTemplatesFolderpatch.emailTemplatesFolder.description01213
-
-
-
+
+ 3.3
-
-
-
-
+ patch.emailTemplatesContentpatch.emailTemplatesContent.description01213
- alfresco/templates/email_templates.acp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
- patch.emailInviteAndNotifyTemplatesFolder
- patch.emailInviteAndNotifyTemplatesFolder.description
- 0
- 4006
- 4007
-
-
-
-
-
-
-
-
-
-
-
-
-
+ patch.descriptorUpdatepatch.descriptorUpdate.description01112
-
-
-
-
-
-
+
+ 3.3
-
+ patch.scriptsFolderpatch.scriptsFolder.description01213
- alfresco/bootstrap/example_javascripts.acp
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.topLevelGroupParentChildAssociationTypePatchpatch.topLevelGroupParentChildAssociationTypePatch.description01314
+
+ 3.3
+
-
-
+ patch.actionRuleDecouplingPatchpatch.actionRuleDecouplingPatch.description01415
+
+ 3.3
+
-
-
+ patch.systemWorkflowFolderPatchpatch.systemWorkflowFolder.description01516
-
+
+ 3.3
+
-
-
+ patch.rssFolderpatch.rssTemplatesFolder.description01617
- alfresco/templates/rss_templates.acp
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.uifacetsTemplatespatch.uifacetsAspectRemovalPatch.description01718
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.guestPersonPermission2patch.guestPersonPermission2.description01819
-
-
-
-
-
-
+
+ 3.3
-
patch.schemaUpdateScript-V1.4-1patch.schemaUpgradeScript.description
@@ -478,326 +352,240 @@
3.3.x
-
+ patch.systemDescriptorContentpatch.systemDescriptorContent.description02223
-
-
-
-
-
-
+
+ 3.3
-
+ patch.versionHistoryPerformancepatch.versionHistoryPerformance.description03839
-
-
+
+ 3.3
-
+ patch.multilingualBootstrappatch.multilingualBootstrap.description02930
-
-
-
-
-
- /cm:multilingualRoot
-
-
-
- /
- alfresco/bootstrap/multilingualRoot.xml
-
+
+ 3.3
-
-
+ patch.LinkNodeFileExtensionpatch.linkNodeExtension.description03334
-
-
-
-
-
+
+ 3.3
-
-
+ patch.systemRegistryBootstrappatch.systemRegistryBootstrap.description03435
-
-
-
-
-
- /sys:system-registry
-
-
-
- /
- alfresco/bootstrap/systemRegistry.xml
-
+
+ 3.3
-
-
+ patch.userAndPersonUserNamesAsIdentifierspatch.userAndPersonUserNamesAsIdentifiers.description03536
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.contentFormFolderTypepatch.contentFormFolderType.description03637
-
-
-
+
+ 3.3
-
-
+ patch.db-V2.1-JBPMUpdatepatch.schemaUpgradeScript.description05152
-
- classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-JBPMData.sql
+
+ 3.3
-
-
+ patch.db-V2.1-NotNullColumnspatch.schemaUpgradeScript.description05152
-
- classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-NotNullColumns.sql
+
+ 3.3
-
-
+ patch.groupNamesAsIdentifierspatch.groupNamesAsIdentifiers.description05152
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.invalidUserPersonAndGrouppatch.invalidUserPersonAndGroup.description05152
-
-
-
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.AVMGuidPatchpatch.AVMGuidPatch.description05152
-
-
-
-
-
+
+ 3.3
-
-
+ patch.webscriptspatch.webscripts.description05051
-
-
-
-
-
-
- /${spaces.company_home.childname}/${spaces.dictionary.childname}
- alfresco/bootstrap/webScripts.xml
-
+
+ 3.3
-
-
+ patch.webscriptsExtensionpatch.webscriptsExtension.description05455
-
-
-
-
-
-
- /${spaces.company_home.childname}/${spaces.dictionary.childname}
- alfresco/bootstrap/webScriptsExtensions.xml
-
+
+ 3.3
-
-
+ patch.AVMLayeredSnapshotpatch.AVMLayeredSnapshot.description05556
-
-
-
-
-
+
+ 3.3
-
-
+ patch.groupMembersAsIdentifierspatch.groupMembersAsIdentifiers.description05657
-
-
-
-
-
-
+
+ 3.3
-
-
+ patch.redeploySubmitProcesspatch.redeploySubmitProcess.description05758
-
-
-
-
- jbpm
- alfresco/workflow/submit_processdefinition.xml
- text/xml
-
-
+
+ 3.3
-
-
+ patch.ReadmeTemplatepatch.ReadmeTemplate.description05960
-
-
-
-
-
-
- /${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname}
- alfresco/templates/readme_template.xml
- alfresco/messages/bootstrap-readme-template
-
+
+ 3.3
-
-
+ patch.webScriptsReadmepatch.webScriptsReadme.description05960
-
-
-
-
-
-
- /${spaces.company_home.childname}/${spaces.dictionary.childname}
- alfresco/bootstrap/webScriptsReadme.xml
-
+
+ 3.3
-
-
+ patch.db-V2.1-JBPMProcessKeypatch.schemaUpgradeScript.description06263
-
- classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-JBPMProcessKey.sql
+
+ 3.3
-
-
+ patch.db-V2.1-VersionColumns2patch.schemaUpgradeScript.description06364
-
- classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-VersionColumns.sql
+
+ 3.3
+
+ patch.db-V1.4-TxnCommitTimeIndex
+ patch.schemaUpgradeScript.description
+ 0
+ 110
+ 111
+
+ 3.3.x
+
+
+
+ patch.db-V2.0-ContentUrls
+ patch.schemaUpgradeScript.description
+ 0
+ 123
+ 124
+
+ 3.3.x
+
+
+
+
+
+
patch.webscripts2
@@ -805,6 +593,11 @@
0100101
+
+
+
+
+
@@ -822,7 +615,11 @@
0101102
-
+
+
+
+
+
@@ -844,7 +641,11 @@
0101102
-
+
+
+
+
+
@@ -866,7 +667,11 @@
0101102
-
+
+
+
+
+
@@ -888,6 +693,11 @@
0102103
+
+
+
+
+
@@ -917,6 +727,11 @@
0104105
+
+
+
+
+
@@ -934,7 +749,11 @@
0105106
-
+
+
+
+
+
@@ -964,17 +783,6 @@
-
- patch.db-V1.4-TxnCommitTimeIndex
- patch.schemaUpgradeScript.description
- 0
- 110
- 111
-
- 3.3.x
-
-
-
patch.avmFormPropertyIdentifierpatch.avmFormPropertyIdentifier.description
@@ -995,7 +803,11 @@
0112113
-
+
+
+
+
+
@@ -1016,7 +828,11 @@
0113114
-
+
+
+
+
+
@@ -1037,6 +853,11 @@
0116117
+
+
+
+
+
@@ -1054,6 +875,11 @@
0117118
+
+
+
+
+
@@ -1072,14 +898,14 @@
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
-
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-A--to--2.2-ACL.sql
+
@@ -1088,19 +914,19 @@
0119120
-
- classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.2-ACL.sql
-
-
+
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.2-ACL.sql
+
@@ -1109,15 +935,14 @@
0119120
-
-
-
-
+
+
+
@@ -1126,14 +951,14 @@
08990
-
- classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.2-CleanNodeStatuses.sql
-
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/AlfrescoSchemaUpdate-2.2-CleanNodeStatuses.sql
+ patch.db-V2.2-0-CreateMissingTables
@@ -1141,15 +966,15 @@
0120121
-
- classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-0-create-missing-tables.sql
-
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-0-create-missing-tables.sql
+ patch.db-V2.2-2-MoveQNames
@@ -1164,9 +989,6 @@
0120135
-
- classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.1.sql
-
@@ -1178,6 +1000,9 @@
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.1.sql
+ patch.db-V2.2-Upgrade-From-2.2SP1
@@ -1185,9 +1010,6 @@
0134135
-
- classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.2SP1.sql
-
@@ -1198,6 +1020,9 @@
+
+ classpath:alfresco/dbscripts/upgrade/2.2/${db.script.dialect}/upgrade-from-2.2SP1.sql
+
@@ -1206,6 +1031,11 @@
0122123
+
+
+
+
+
@@ -1217,35 +1047,21 @@
-
- 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.updateDmPermissionspatch.updateDmPermissions.description0124125
-
+
+
+
@@ -1265,7 +1081,11 @@
0126127
-
+
+
+
+
+
@@ -1277,7 +1097,11 @@
0127128
-
+
+
+
+
+
@@ -1299,7 +1123,12 @@
0128129
-
+
+
+
+
+
+
@@ -1309,11 +1138,6 @@
-
-
-
-
-
@@ -1322,7 +1146,11 @@
0129130
-
+
+
+
+
+
@@ -1347,7 +1175,6 @@
${version.store.migrateVersionStore.limitPerJobCycle}
-
@@ -1356,7 +1183,12 @@
0130131
-
+
+
+
+
+
+
@@ -1370,11 +1202,6 @@
alfresco/messages/bootstrap-spaces
-
-
-
-
-
@@ -1383,7 +1210,11 @@
0131132
-
+
+
+
+
+
@@ -1412,17 +1243,18 @@
0133134
+
+
+
+
+
+
-
-
-
-
-
@@ -1431,6 +1263,12 @@
010001001
+
+
+
+
+
+
@@ -1443,13 +1281,17 @@
-
patch.redeploySubmitProcess5patch.redeploySubmitProcess.description020002001
+
+
+
+
+
@@ -1462,13 +1304,17 @@
-
patch.deploySubmitDirectProcesspatch.deploySubmitDirectProcess.description020002001
+
+
+
+
+
@@ -1487,6 +1333,17 @@
020012002
+
+
+
+
+
+
+
+
+
+
+
@@ -1514,17 +1371,6 @@
ContentManager
-
-
-
-
-
-
-
-
-
-
-
@@ -1534,7 +1380,17 @@
020012002
-
+
+
+
+
+
+
+
+
+
+
+
@@ -1544,16 +1400,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -1563,7 +1409,6 @@
020012002
-
@@ -1578,7 +1423,6 @@
020012002
-
@@ -1586,7 +1430,6 @@
-
patch.redeploySubmitProcess6
@@ -1594,6 +1437,11 @@
020022003
+
+
+
+
+
@@ -1610,13 +1458,17 @@
-
patch.redeploySubmitProcess7patch.redeploySubmitProcess.description020032004
+
+
+
+
+
@@ -1650,6 +1502,11 @@
020062007
+
+
+
+
+
@@ -1667,6 +1524,11 @@
020062007
+
+
+
+
+
@@ -1693,8 +1555,11 @@
20082009true
-
-
+
+
+
+
+
@@ -1726,6 +1591,11 @@
020092010
+
+
+
+
+
@@ -1749,7 +1619,6 @@
20102011
-
classpath:alfresco/dbscripts/create/${db.script.dialect}/AlfrescoCreate-LockTables.sql
@@ -1760,7 +1629,12 @@
020112012
-
+
+
+
+
+
+
@@ -1773,11 +1647,6 @@
alfresco/bootstrap/alfrescoAuthorityStore.xml
-
-
-
-
-
@@ -1786,6 +1655,12 @@
020122013
+
+
+
+
+
+
@@ -1795,11 +1670,6 @@
-
-
-
-
-
@@ -1808,6 +1678,12 @@
020132014
+
+
+
+
+
+
@@ -1817,11 +1693,6 @@
-
-
-
-
-
@@ -1831,7 +1702,6 @@
20152016
-
classpath:alfresco/dbscripts/create/${db.script.dialect}/AlfrescoCreate-ContentTables.sql
@@ -1858,25 +1728,30 @@
-
- patch.imapFolders
- patch.imapFolders.description
- 0
- 2018
- 2019
-
-
-
-
-
-
-
-
-
- alfresco/templates/imap/imap_config_space.acp
- alfresco/templates/imap/email_actions_space.acp
- alfresco/templates/imap/command_processor_scripts.acp
-
+
+ patch.imapFolders
+ patch.imapFolders.description
+ 0
+ 2018
+ 2019
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ alfresco/templates/imap/imap_config_space.acp
+ alfresco/templates/imap/email_actions_space.acp
+ alfresco/templates/imap/command_processor_scripts.acp
+ patch.db-V3.2-PropertyValueTables
@@ -1885,7 +1760,6 @@
30003001
-
classpath:alfresco/dbscripts/create/${db.script.dialect}/AlfrescoCreate-PropertyValueTables.sql
@@ -1897,7 +1771,6 @@
30013002
-
classpath:alfresco/dbscripts/create/${db.script.dialect}/AlfrescoCreate-AuditTables.sql
@@ -1909,7 +1782,6 @@
30033004
-
classpath:alfresco/dbscripts/upgrade/3.1/${db.script.dialect}/IPv6-patch.sql
@@ -1920,7 +1792,11 @@
030043005
-
+
+
+
+
+
@@ -1976,6 +1852,11 @@
040004001
+
+
+
+
+
@@ -1993,15 +1874,14 @@
040014002
-
-
- classpath:alfresco/dbscripts/upgrade/3.2/${db.script.dialect}/AlfrescoSchemaUpdate-3.2-ContentTables2.sql
-
+
+ classpath:alfresco/dbscripts/upgrade/3.2/${db.script.dialect}/AlfrescoSchemaUpdate-3.2-ContentTables2.sql
+
@@ -2021,7 +1901,11 @@
040034004
-
+
+
+
+
+
@@ -2046,7 +1930,6 @@
040044005
-
@@ -2062,7 +1945,6 @@
{http://www.alfresco.org/model/rendition/1.0}rendition
-
+
+ patch.emailInviteAndNotifyTemplatesFolder
+ patch.emailInviteAndNotifyTemplatesFolder.description
+ 0
+ 4006
+ 4007
+
+
+
+
+
+
+
+
+
+
+
+
+
patch.transferServiceFolderpatch.transferDefinitions.description040084009
-
+
+
+
+
+
-
/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.transfers.childname}
@@ -2103,6 +2007,11 @@
40074008false
+
+
+
+
+
@@ -2269,7 +2178,6 @@
41064107false
-
@@ -2285,7 +2193,6 @@
41064107false
-
@@ -2301,7 +2208,6 @@
41064107false
-
@@ -2317,7 +2223,6 @@
41064107false
-
@@ -2333,11 +2238,6 @@
41064107false
-
-
-
-
-
@@ -2346,6 +2246,9 @@
+
+
+
@@ -2354,7 +2257,11 @@
041074108
-
+
+
+
+
+
@@ -2376,7 +2283,11 @@
041084109
-
+
+
+
+
+
@@ -2397,7 +2308,11 @@
041084109
-
+
+
+
+
+
@@ -2418,7 +2333,11 @@
041094110
-
+
+
+
+
+
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/AVMGuidPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/AVMGuidPatch.java
deleted file mode 100644
index 114501830d..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/AVMGuidPatch.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-
-package org.alfresco.repo.admin.patch.impl;
-
-import java.util.List;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.domain.avm.AVMNodeDAO;
-import org.alfresco.repo.domain.avm.AVMNodeEntity;
-import org.alfresco.repo.domain.patch.PatchDAO;
-import org.alfresco.util.GUID;
-
-/**
- * This makes sure that all GUIDs in AVM nodes are set.
- * @author britt
- */
-public class AVMGuidPatch extends AbstractPatch
-{
- private AVMNodeDAO fAVMNodeDAO;
- private PatchDAO patchDAO;
-
- private static final String MSG_SUCCESS = "patch.AVMGuidPatch.result";
-
- public AVMGuidPatch()
- {
- }
-
- public void setAvmNodeDao(AVMNodeDAO dao)
- {
- fAVMNodeDAO = dao;
- }
-
- public void setPatchDAO(PatchDAO dao)
- {
- patchDAO = dao;
- }
-
- /* (non-Javadoc)
- * @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
- */
- @Override
- protected String applyInternal() throws Exception
- {
- while (true)
- {
- List batch = patchDAO.getEmptyGUIDS(200);
- for (AVMNodeEntity nodeEntity : batch)
- {
- nodeEntity.setGuid(GUID.generate());
-
- fAVMNodeDAO.updateNode(nodeEntity);
- }
- if (batch.size() == 0)
- {
- break;
- }
- }
-
- return I18NUtil.getMessage(MSG_SUCCESS);
- }
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/AVMLayeredSnapshotPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/AVMLayeredSnapshotPatch.java
deleted file mode 100644
index 5255ac06ff..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/AVMLayeredSnapshotPatch.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-
-package org.alfresco.repo.admin.patch.impl;
-
-import java.util.List;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.domain.avm.AVMNodeDAO;
-import org.alfresco.repo.domain.avm.AVMNodeEntity;
-import org.alfresco.repo.domain.patch.PatchDAO;
-
-/**
- * Patch for changes to Layered Node path traversal.
- * @author britt
- */
-public class AVMLayeredSnapshotPatch extends AbstractPatch
-{
- private AVMNodeDAO fAVMNodeDAO;
- private PatchDAO patchDAO;
-
- private static final String MSG_SUCCESS = "patch.AVMLayeredSnapshot.result";
-
- public AVMLayeredSnapshotPatch()
- {
- }
-
- public void setAvmNodeDao(AVMNodeDAO dao)
- {
- fAVMNodeDAO = dao;
- }
-
- public void setPatchDAO(PatchDAO dao)
- {
- patchDAO = dao;
- }
-
- /* (non-Javadoc)
- * @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
- */
- @Override
- protected String applyInternal() throws Exception
- {
- while (true)
- {
- List batch = patchDAO.getNullVersionLayeredDirectories(200);
- for (AVMNodeEntity nodeEntity : batch)
- {
- nodeEntity.setIndirectionVersion(-1);
-
- fAVMNodeDAO.updateNode(nodeEntity);
- }
- if (batch.size() == 0)
- {
- break;
- }
- }
- while (true)
- {
- List batch = patchDAO.getNullVersionLayeredFiles(200);
- for (AVMNodeEntity nodeEntity : batch)
- {
- nodeEntity.setIndirectionVersion(-1);
-
- fAVMNodeDAO.updateNode(nodeEntity);
- }
- if (batch.size() == 0)
- {
- break;
- }
- }
- return I18NUtil.getMessage(MSG_SUCCESS);
- }
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/ActionRuleDecouplingPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/ActionRuleDecouplingPatch.java
deleted file mode 100644
index 669b48c801..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/ActionRuleDecouplingPatch.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-package org.alfresco.repo.admin.patch.impl;
-
-import java.io.Serializable;
-import java.util.Map;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.model.ContentModel;
-import org.alfresco.repo.action.ActionModel;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.rule.RuleModel;
-import org.alfresco.service.cmr.repository.ChildAssociationRef;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.StoreRef;
-import org.alfresco.service.cmr.search.ResultSet;
-import org.alfresco.service.namespace.QName;
-
-/**
- * Patch to apply the model changes made when decoupling actions from rules.
- *
- * @author Roy Wetherall
- */
-public class ActionRuleDecouplingPatch extends AbstractPatch
-{
- private static final String MSG_RESULT = "patch.actionRuleDecouplingPatch.result";
-
- /**
- * @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
- */
- @Override
- protected String applyInternal() throws Exception
- {
- // Get a reference to the spaces store
- StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
-
- // Get all the node's of type rule in the store
- int updateCount = 0;
- ResultSet resultSet = this.searchService.query(storeRef, "lucene", "TYPE:\"" + RuleModel.TYPE_RULE + "\"");
- try
- {
- for (NodeRef origRuleNodeRef : resultSet.getNodeRefs())
- {
- // Check that this rule need updated
- if (!this.nodeService.exists(origRuleNodeRef))
- {
- continue;
- }
- Map origProperties = this.nodeService.getProperties(origRuleNodeRef);
- if (origProperties.containsKey(RuleModel.PROP_EXECUTE_ASYNC) == false)
- {
- // 1) Change the type of the rule to be a composite action
- this.nodeService.setType(origRuleNodeRef, ActionModel.TYPE_COMPOSITE_ACTION);
-
- // 2) Create a new rule node
- ChildAssociationRef parentRef = this.nodeService.getPrimaryParent(origRuleNodeRef);
- NodeRef newRuleNodeRef = this.nodeService.createNode(
- parentRef.getParentRef(),
- parentRef.getTypeQName(),
- parentRef.getQName(),
- RuleModel.TYPE_RULE).getChildRef();
-
- // 3) Move the origional rule under the new rule
- this.nodeService.moveNode(
- origRuleNodeRef,
- newRuleNodeRef,
- RuleModel.ASSOC_ACTION,
- RuleModel.ASSOC_ACTION);
-
- // 4) Move the various properties from the origional, onto the new rule
- Map newProperties = this.nodeService.getProperties(newRuleNodeRef);
-
- // Set the rule type, execute async and applyToChildren properties on the rule
- Serializable ruleType = origProperties.get(RuleModel.PROP_RULE_TYPE);
- origProperties.remove(RuleModel.PROP_RULE_TYPE);
- newProperties.put(RuleModel.PROP_RULE_TYPE, ruleType);
- Serializable executeAsync = origProperties.get(ActionModel.PROP_EXECUTE_ASYNCHRONOUSLY);
- origProperties.remove(ActionModel.PROP_EXECUTE_ASYNCHRONOUSLY);
- newProperties.put(RuleModel.PROP_EXECUTE_ASYNC, executeAsync);
- Serializable applyToChildren = origProperties.get(RuleModel.PROP_APPLY_TO_CHILDREN);
- origProperties.remove(RuleModel.PROP_APPLY_TO_CHILDREN);
- newProperties.put(RuleModel.PROP_APPLY_TO_CHILDREN, applyToChildren);
- origProperties.remove(QName.createQName(RuleModel.RULE_MODEL_URI, "owningNodeRef"));
-
- // Move the action and description values from the composite action onto the rule
- Serializable title = origProperties.get(ActionModel.PROP_ACTION_TITLE);
- origProperties.remove(ActionModel.PROP_ACTION_TITLE);
- Serializable description = origProperties.get(ActionModel.PROP_ACTION_DESCRIPTION);
- origProperties.remove(ActionModel.PROP_ACTION_DESCRIPTION);
- newProperties.put(ContentModel.PROP_TITLE, title);
- newProperties.put(ContentModel.PROP_DESCRIPTION, description);
-
- // Set the updated property values
- this.nodeService.setProperties(origRuleNodeRef, origProperties);
- this.nodeService.setProperties(newRuleNodeRef, newProperties);
-
- // Increment the update count
- updateCount++;
- }
- }
- }
- finally
- {
- resultSet.close();
- }
-
- // Done
- String msg = I18NUtil.getMessage(MSG_RESULT, updateCount);
- return msg;
- }
-
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/CategoryRootPermissionPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/CategoryRootPermissionPatch.java
deleted file mode 100644
index 8d7bc8ef1b..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/CategoryRootPermissionPatch.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-package org.alfresco.repo.admin.patch.impl;
-
-import java.util.List;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.importer.ImporterBootstrap;
-import org.alfresco.repo.security.authentication.AuthenticationUtil;
-import org.alfresco.service.cmr.admin.PatchException;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.security.PermissionService;
-
-/**
- * Grant Consumer role to Guest in Category Root folder.
- *
- * This patch expects the folder to be present.
- */
-public class CategoryRootPermissionPatch extends AbstractPatch
-{
- private static final String MSG_RESULT = "patch.categoryRootPermission.result";
- private static final String ERR_NOT_FOUND = "patch.categoryRootPermission.err.not_found";
-
- private PermissionService permissionService;
- private ImporterBootstrap spacesBootstrap;
-
-
- public void setPermissionService(PermissionService permissionService)
- {
- this.permissionService = permissionService;
- }
-
- public void setSpacesBootstrap(ImporterBootstrap spacesBootstrap)
- {
- this.spacesBootstrap = spacesBootstrap;
- }
-
- @Override
- protected String applyInternal() throws Exception
- {
- String categoryRootPath = "/cm:categoryRoot";
-
- // find category root
- NodeRef rootNodeRef = nodeService.getRootNode(spacesBootstrap.getStoreRef());
- List nodeRefs = searchService.selectNodes(rootNodeRef, categoryRootPath, null, namespaceService, false);
- if (nodeRefs.size() == 0)
- {
- String msg = I18NUtil.getMessage(ERR_NOT_FOUND, categoryRootPath);
- throw new PatchException(msg);
- }
- NodeRef categoryRootRef = nodeRefs.get(0);
-
- // apply permission
- permissionService.setPermission(
- categoryRootRef,
- AuthenticationUtil.getGuestUserName(),
- PermissionService.READ,
- true);
-
- // done
- String msg = I18NUtil.getMessage(MSG_RESULT, categoryRootPath);
- return msg;
- }
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/ContentFormTypePatch.java b/source/java/org/alfresco/repo/admin/patch/impl/ContentFormTypePatch.java
deleted file mode 100644
index c0caa375eb..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/ContentFormTypePatch.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-package org.alfresco.repo.admin.patch.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.model.WCMAppModel;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.importer.ImporterBootstrap;
-import org.alfresco.service.cmr.admin.PatchException;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.search.ResultSet;
-import org.alfresco.service.cmr.search.ResultSetRow;
-import org.alfresco.service.cmr.search.SearchParameters;
-import org.alfresco.service.cmr.search.SearchService;
-
-/**
- * Patch to update the type of all WCM content form folders to 'wca:formfolder'.
- *
- * @author Kevin Roast
- */
-public class ContentFormTypePatch extends AbstractPatch
-{
- private final static String MSG_RESULT = "patch.contentFormFolderType.result";
-
- private ImporterBootstrap importerBootstrap;
-
- public void setImporterBootstrap(ImporterBootstrap importerBootstrap)
- {
- this.importerBootstrap = importerBootstrap;
- }
-
- /**
- * Ensure that required common properties have been set
- */
- protected void checkCommonProperties() throws Exception
- {
- if (searchService == null)
- {
- throw new PatchException("'searchService' property has not been set");
- }
- if (nodeService == null)
- {
- throw new PatchException("'nodeService' property has not been set");
- }
- if (importerBootstrap == null)
- {
- throw new PatchException("'importerBootstrap' property has not been set");
- }
- }
-
- /**
- * @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
- */
- @Override
- protected String applyInternal() throws Exception
- {
- checkCommonProperties();
-
- int count = 0;
- for (NodeRef formRef : getForms())
- {
- // update folder type to 'wcm:formfolder'
- this.nodeService.setType(formRef, WCMAppModel.TYPE_FORMFOLDER);
- count++;
- }
-
- return I18NUtil.getMessage(MSG_RESULT, new Object[] {Integer.toString(count)});
- }
-
- /**
- * @return all existing web form folders - marked with the 'wcm:form' aspect.
- */
- private Collection getForms()
- {
- SearchParameters sp = new SearchParameters();
- sp.addStore(this.importerBootstrap.getStoreRef());
- sp.setLanguage(SearchService.LANGUAGE_LUCENE);
- sp.setQuery("ASPECT:\"" + WCMAppModel.ASPECT_FORM + "\"");
- ResultSet rs = this.searchService.query(sp);
- try
- {
- Collection result = new ArrayList(rs.length());
- for (ResultSetRow row : rs)
- {
- result.add(row.getNodeRef());
- }
-
- return result;
- }
- finally
- {
- rs.close();
- }
- }
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/ContentPermissionPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/ContentPermissionPatch.java
deleted file mode 100644
index c07fd0704e..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/ContentPermissionPatch.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-package org.alfresco.repo.admin.patch.impl;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.service.namespace.NamespaceService;
-import org.alfresco.service.namespace.QName;
-
-/**
- * Roles defined in permissionsDefinition.xml moved from cm:content to sys:base.
- * This effects the data stored in the permission table.
- *
- * @author Derek Hulley
- */
-public class ContentPermissionPatch extends AbstractPermissionChangePatch
-{
- private static final String MSG_SUCCESS = "patch.contentPermission.result";
-
- private static final QName TYPE_QNAME_OLD = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content");
- private static final QName TYPE_QNAME_NEW = QName.createQName(NamespaceService.SYSTEM_MODEL_1_0_URI, "base");
- private static final String[] NAMES = new String[] {"Execute", "ReadContent", "WriteContent", "ExecuteContent"};
-
- @Override
- protected String applyInternal() throws Exception
- {
- int updateCount = 0;
- for (String permissionName : NAMES)
- {
- updateCount += super.renamePermission(
- ContentPermissionPatch.TYPE_QNAME_OLD,
- permissionName,
- ContentPermissionPatch.TYPE_QNAME_NEW,
- permissionName);
- }
-
- // build the result message
- String msg = I18NUtil.getMessage(MSG_SUCCESS, updateCount);
- // done
- return msg;
- }
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/DescriptorUpdatePatch.java b/source/java/org/alfresco/repo/admin/patch/impl/DescriptorUpdatePatch.java
deleted file mode 100644
index d773b3a64c..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/DescriptorUpdatePatch.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-package org.alfresco.repo.admin.patch.impl;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.model.ContentModel;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.importer.ImporterBootstrap;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.StoreRef;
-
-/**
- * Apply Version Edition to Repository Descriptor
- *
- * @author David Caruana
- */
-public class DescriptorUpdatePatch extends AbstractPatch
-{
- private static final String MSG_SUCCESS = "patch.descriptorUpdate.result";
-
- private ImporterBootstrap systemBootstrap;
-
- public void setSystemBootstrap(ImporterBootstrap systemBootstrap)
- {
- this.systemBootstrap = systemBootstrap;
- }
-
- @Override
- protected String applyInternal() throws Exception
- {
- checkPropertyNotNull(systemBootstrap, "systemBootstrap");
-
- // retrieve system descriptor location
- StoreRef storeRef = systemBootstrap.getStoreRef();
- Properties systemProperties = systemBootstrap.getConfiguration();
-
- // check for the store
- if (nodeService.exists(storeRef))
- {
- // get the current descriptor
- String path = systemProperties.getProperty("system.descriptor.current.childname");
- String searchPath = "/" + path;
- NodeRef rootNodeRef = nodeService.getRootNode(storeRef);
- List nodeRefs = searchService.selectNodes(rootNodeRef, searchPath, null, namespaceService, false);
- if (nodeRefs.size() > 0)
- {
- NodeRef descriptorNodeRef = nodeRefs.get(0);
-
- // set version edition
- Serializable value = nodeService.getProperty(descriptorNodeRef, ContentModel.PROP_SYS_VERSION_EDITION);
- if (value == null)
- {
- String edition = systemProperties.getProperty("version.edition");
- Collection editions = new ArrayList();
- editions.add(edition);
- nodeService.setProperty(descriptorNodeRef, ContentModel.PROP_SYS_VERSION_EDITION, (Serializable)editions);
- }
- }
- }
-
- // done
- String msg = I18NUtil.getMessage(MSG_SUCCESS);
- return msg;
- }
-
-}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/DmPermissionsPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/DmPermissionsPatch.java
index d58195d3db..af8a3f8e1c 100644
--- a/source/java/org/alfresco/repo/admin/patch/impl/DmPermissionsPatch.java
+++ b/source/java/org/alfresco/repo/admin/patch/impl/DmPermissionsPatch.java
@@ -21,11 +21,14 @@ package org.alfresco.repo.admin.patch.impl;
import java.util.Map;
import org.alfresco.repo.admin.patch.AbstractPatch;
+import org.alfresco.repo.domain.control.ControlDAO;
import org.alfresco.repo.domain.patch.PatchDAO;
import org.alfresco.repo.domain.permissions.AccessControlListDAO;
import org.alfresco.repo.security.permissions.ACLType;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.extensions.surf.util.I18NUtil;
/**
@@ -33,69 +36,101 @@ import org.springframework.extensions.surf.util.I18NUtil;
*/
public class DmPermissionsPatch extends AbstractPatch
{
-
private static final String MSG_SUCCESS = "patch.updateDmPermissions.result";
+ private static Log logger = LogFactory.getLog(DmPermissionsPatch.class);
+
private AccessControlListDAO accessControlListDao;
-
private PatchDAO patchDAO;
+ private ControlDAO controlDAO;
- @Override
- protected String applyInternal() throws Exception
- {
- Thread progressThread = null;
- if (this.patchDAO.supportsProgressTracking())
- {
- progressThread = new Thread(new ProgressWatcher(), "DMPatchProgressWatcher");
- progressThread.start();
- }
-
- Map summary = this.accessControlListDao.patchAcls();
-
- if (progressThread != null)
- {
- progressThread.interrupt();
- progressThread.join();
- }
-
- // build the result message
- String msg = I18NUtil.getMessage(DmPermissionsPatch.MSG_SUCCESS, summary.get(ACLType.DEFINING));
- // done
- return msg;
- }
-
- /**
- * Set the access control list dao
- *
- * @param accessControlListDao
- */
public void setAccessControlListDao(AccessControlListDAO accessControlListDao)
{
this.accessControlListDao = accessControlListDao;
}
- /**
- * Set the patch dao
- *
- * @param patchDAO
- */
public void setPatchDAO(PatchDAO patchDAO)
{
this.patchDAO = patchDAO;
}
+ public void setControlDAO(ControlDAO controlDAO)
+ {
+ this.controlDAO = controlDAO;
+ }
+
+ @Override
+ protected String applyInternal() throws Exception
+ {
+ Thread progressThread = null;
+ progressThread = new Thread(new ProgressWatcher(), "DMPatchProgressWatcher");
+ progressThread.start();
+
+ try
+ {
+ Map summary = this.accessControlListDao.patchAcls();
+ // build the result message
+ String msg = I18NUtil.getMessage(DmPermissionsPatch.MSG_SUCCESS, summary.get(ACLType.DEFINING));
+ // done
+ return msg;
+ }
+ finally
+ {
+ progressThread.interrupt();
+ progressThread.join();
+ }
+ }
+
private class ProgressWatcher implements Runnable
{
private boolean running = true;
-
Long toDo;
-
Long max;
public void run()
{
while (this.running)
{
+ if (this.running)
+ {
+ RetryingTransactionHelper txHelper = transactionService.getRetryingTransactionHelper();
+ txHelper.setMaxRetries(1);
+ RetryingTransactionCallback callback = new RetryingTransactionCallback()
+ {
+ public Long execute() throws Throwable
+ {
+ // Change isolation level
+ try
+ {
+ controlDAO.setTransactionIsolationLevel(1);
+ }
+ catch (IllegalStateException e)
+ {
+ // Can't be set. We're done here.
+ running = false;
+ return 0L;
+ }
+
+ if (toDo == null)
+ {
+ toDo = patchDAO.getDmNodeCount();
+ max = patchDAO.getMaxAclId();
+ }
+ return patchDAO.getDmNodeCountWithNewACLs(ProgressWatcher.this.max);
+ }
+ };
+ try
+ {
+ Long done = txHelper.doInTransaction(callback, true, true);
+ reportProgress(this.toDo, done);
+ }
+ catch (Throwable e)
+ {
+ logger.error("Failure in ProgressWatcher", e);
+ this.running = false;
+ }
+ }
+
try
{
Thread.sleep(60000);
@@ -104,33 +139,7 @@ public class DmPermissionsPatch extends AbstractPatch
{
this.running = false;
}
-
- if (this.running)
- {
- RetryingTransactionHelper txHelper = DmPermissionsPatch.this.transactionService
- .getRetryingTransactionHelper();
- txHelper.setMaxRetries(1);
- Long done = txHelper.doInTransaction(new RetryingTransactionCallback()
- {
-
- public Long execute() throws Throwable
- {
- if (ProgressWatcher.this.toDo == null)
- {
- ProgressWatcher.this.toDo = DmPermissionsPatch.this.patchDAO
- .getDmNodeCount();
- ProgressWatcher.this.max = DmPermissionsPatch.this.patchDAO.getMaxAclId();
- }
- return DmPermissionsPatch.this.patchDAO
- .getDmNodeCountWithNewACLs(ProgressWatcher.this.max);
- }
- }, true, true);
-
- reportProgress(this.toDo, done);
- }
}
}
-
}
-
}
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/EmailTemplatesContentPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/EmailTemplatesContentPatch.java
deleted file mode 100644
index d41658df29..0000000000
--- a/source/java/org/alfresco/repo/admin/patch/impl/EmailTemplatesContentPatch.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2005-2010 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 .
- */
-package org.alfresco.repo.admin.patch.impl;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-import org.springframework.extensions.surf.util.I18NUtil;
-import org.alfresco.repo.admin.patch.AbstractPatch;
-import org.alfresco.repo.importer.ACPImportPackageHandler;
-import org.alfresco.repo.importer.ImporterBootstrap;
-import org.alfresco.repo.security.authentication.AuthenticationUtil;
-import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
-import org.alfresco.service.cmr.admin.PatchException;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.StoreRef;
-import org.alfresco.service.cmr.view.ImporterService;
-import org.alfresco.service.cmr.view.Location;
-import org.springframework.context.MessageSource;
-import org.springframework.core.io.ClassPathResource;
-
-/**
- * Ensures that the email templates are imported into the default folder.
- *
- * This uses the bootstrap importer to get the paths to look for. If not present,
- * the required structures are created.
- *
- * This class should be replaced with a more generic ImporterPatch
- * that can do conditional importing into given locations.
- *
- * JIRA: {@link http://www.alfresco.org/jira/browse/AR-342 AR-342}
- *
- * @author Kevin Roast
- */
-public class EmailTemplatesContentPatch extends AbstractPatch
-{
- private static final String MSG_CREATED = "patch.emailTemplatesContent.result";
-
- public static final String PROPERTY_COMPANY_HOME_CHILDNAME = "spaces.company_home.childname";
- public static final String PROPERTY_DICTIONARY_CHILDNAME = "spaces.dictionary.childname";
- public static final String PROPERTY_EMAIL_TEMPLATES_CHILDNAME = "spaces.templates.email.childname";
-
- private ImporterBootstrap importerBootstrap;
- private ImporterService importerService;
- private MessageSource messageSource;
-
- protected Properties configuration;
- protected NodeRef emailTemplatesNodeRef;
-
- private String templatesACP;
-
- public void setImporterBootstrap(ImporterBootstrap importerBootstrap)
- {
- this.importerBootstrap = importerBootstrap;
- }
-
- public void setImporterService(ImporterService importerService)
- {
- this.importerService = importerService;
- }
-
- public void setMessageSource(MessageSource messageSource)
- {
- this.messageSource = messageSource;
- }
-
- /**
- * @param templatesACP The templates ACP file to import.
- */
- public void setTemplatesACP(String templatesACP)
- {
- this.templatesACP = templatesACP;
- }
-
- /**
- * Ensure that required properties have been set
- */
- protected void checkRequiredProperties() throws Exception
- {
- checkPropertyNotNull(importerBootstrap, "importerBootstrap");
- checkPropertyNotNull(importerService, "importerService");
- checkPropertyNotNull(messageSource, "messageSource");
- checkPropertyNotNull(templatesACP, "templatesACP");
- }
-
- /**
- * Extracts pertinent references and properties that are common to execution
- * of this and derived patches.
- */
- protected void setUp() throws Exception
- {
- // get the node store that we must work against
- StoreRef storeRef = importerBootstrap.getStoreRef();
- if (storeRef == null)
- {
- throw new PatchException("Bootstrap store has not been set");
- }
- NodeRef storeRootNodeRef = nodeService.getRootNode(storeRef);
-
- this.configuration = importerBootstrap.getConfiguration();
-
- // get the association names that form the path
- String companyHomeChildName = configuration.getProperty(PROPERTY_COMPANY_HOME_CHILDNAME);
- if (companyHomeChildName == null || companyHomeChildName.length() == 0)
- {
- throw new PatchException("Bootstrap property '" + PROPERTY_COMPANY_HOME_CHILDNAME + "' is not present");
- }
- String dictionaryChildName = configuration.getProperty(PROPERTY_DICTIONARY_CHILDNAME);
- if (dictionaryChildName == null || dictionaryChildName.length() == 0)
- {
- throw new PatchException("Bootstrap property '" + PROPERTY_DICTIONARY_CHILDNAME + "' is not present");
- }
- String emailTemplatesChildName = configuration.getProperty(PROPERTY_EMAIL_TEMPLATES_CHILDNAME);
- if (emailTemplatesChildName == null || emailTemplatesChildName.length() == 0)
- {
- throw new PatchException("Bootstrap property '" + PROPERTY_EMAIL_TEMPLATES_CHILDNAME + "' is not present");
- }
-
- // build the search string to get the email templates node
- StringBuilder sb = new StringBuilder(128);
- sb.append("/").append(companyHomeChildName)
- .append("/").append(dictionaryChildName)
- .append("/").append(emailTemplatesChildName);
- String xpath = sb.toString();
-
- // get the templates node
- List nodeRefs = searchService.selectNodes(storeRootNodeRef, xpath, null, namespaceService, false);
- if (nodeRefs.size() == 0)
- {
- throw new PatchException("Unable to locate Email Templates folder: \n" +
- " root: " + storeRootNodeRef + "\n" +
- " xpath: " + xpath);
- }
- else if (nodeRefs.size() > 1)
- {
- throw new PatchException("Found too many Email Templates folder results: \n" +
- " root: " + storeRootNodeRef + "\n" +
- " xpath: " + xpath + "\n" +
- " results: " + nodeRefs);
- }
- this.emailTemplatesNodeRef = nodeRefs.get(0);
- }
-
- @Override
- protected String applyInternal() throws Exception
- {
- // common properties must be set before we can continue
- checkRequiredProperties();
-
- setUp();
-
- // import the content
- RunAsWork