mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
End-of-life for several 2.1 and 2.2 patches
- Officially, all upgrades from 2.1.x, 2.2.x and 3.0.x must now go via 3.4.x - Allows upgrades without indexes in 4.0 e.g. 'patch.deploymentMigration' (ALF-11760) - When attempting to upgrade directly from V2.1 or V2.2, a message will appear: Patch ''{0}'' was last supported on version {1}.\n Please follow an incremental upgrade using version {2}. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32396 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -125,13 +125,11 @@
|
||||
<ref bean="patch.db-V3.3-modify-index-permission_id" />
|
||||
<ref bean="patch.db-V3.2-AddFKIndexes" />
|
||||
<ref bean="patch.db-V3.2-AddFKIndexes-2" />
|
||||
<ref bean="patch.db-V3.4-UsageTables" />
|
||||
<ref bean="patch.db-V3.0-ActivityTables" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="postUpdateScriptPatches">
|
||||
<list>
|
||||
<ref bean="patch.db-V2.1-RemoveWcmSubmittedAspect" />
|
||||
<ref bean="patch.db-V3.1-Allow-IPv6" />
|
||||
<ref bean="patch.db-V3.2-Remove-AVM-Issuer" />
|
||||
<ref bean="patch.db-V3.2-Modify-AVM-MimeType" />
|
||||
|
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
|
||||
<cm:folder xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:custom="custom.model" xmlns=""
|
||||
view:childName="app:forms">
|
||||
<view:aspects>
|
||||
<app:uifacets></app:uifacets>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<cm:description>Content Forms</cm:description>
|
||||
<app:icon>space-icon-default</app:icon>
|
||||
<cm:title>Forms</cm:title>
|
||||
<cm:name>Forms</cm:name>
|
||||
</view:properties>
|
||||
</cm:folder>
|
||||
</view:view>
|
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
|
||||
<view:reference xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:custom="custom.model" xmlns="" view:pathref="/app:company_home/app:dictionary/cm:webscripts/cm:org/cm:alfresco/cm:sample">
|
||||
<view:associations>
|
||||
<cm:contains>
|
||||
<cm:content view:childName="cm:upload.get.desc.xml">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/upload.get.desc.xml|mimetype=text/xml|size=|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title></cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>upload.get.desc.xml</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:upload.get.html.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/upload.get.html.ftl|mimetype=text/plain|size=|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title></cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>upload.get.html.ftl</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:upload.post.desc.xml">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/upload.post.desc.xml|mimetype=text/xml|size=|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title></cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>upload.post.desc.xml</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:upload.post.js">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/upload.post.js|mimetype=application/x-javascript|size=|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title></cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>upload.post.js</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
<cm:content view:childName="cm:upload.post.html.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<cm:author></cm:author>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/upload.post.html.ftl|mimetype=text/plain|size=|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
<cm:title></cm:title>
|
||||
<cm:author></cm:author>
|
||||
<cm:name>upload.post.html.ftl</cm:name>
|
||||
</view:properties>
|
||||
</cm:content>
|
||||
</cm:contains>
|
||||
</view:associations>
|
||||
</view:reference>
|
||||
</view:view>
|
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
|
||||
<view:reference xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:alf="http://www.alfresco.org" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:custom="custom.model" xmlns:reg="http://www.alfresco.org/system/registry/1.0" xmlns:module="http://www.alfresco.org/system/modules/1.0" xmlns="" view:pathref="/app:company_home/app:dictionary/app:content_templates/cm:readme.ftl">
|
||||
<view:properties>
|
||||
<cm:content>contentUrl=classpath:alfresco/bootstrap/webscripts/readme.html|mimetype=text/html|size=|encoding=UTF-8|locale=en_US_</cm:content>
|
||||
</view:properties>
|
||||
</view:reference>
|
||||
</view:view>
|
@@ -1,35 +0,0 @@
|
||||
--
|
||||
-- Title: Remove wcmwf:submitted Aspect
|
||||
-- Database: Generic
|
||||
-- Since: V2.1 Schema 73
|
||||
-- Author: Derek Hulley
|
||||
--
|
||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
||||
--
|
||||
-- This removes the wcmwf:submitted aspect along with the wcmwf:workflowInstanceId property
|
||||
-- from the AVM nodes
|
||||
|
||||
DELETE FROM avm_aspects WHERE EXISTS
|
||||
(
|
||||
SELECT q.id FROM alf_qname q
|
||||
JOIN alf_namespace n ON (q.ns_id = n.id)
|
||||
WHERE n.uri = 'http://www.alfresco.org/model/wcmworkflow/1.0' and q.local_name = 'submitted' AND q.id = avm_aspects.qname_id
|
||||
);
|
||||
DELETE FROM avm_node_properties WHERE EXISTS
|
||||
(
|
||||
SELECT q.id FROM alf_qname q
|
||||
JOIN alf_namespace n ON (q.ns_id = n.id)
|
||||
WHERE n.uri = 'http://www.alfresco.org/model/wcmworkflow/1.0' and q.local_name = 'workflowInstanceId' AND q.id = avm_node_properties.qname_id
|
||||
);
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-RemoveWcmSubmittedAspect';
|
||||
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-RemoveWcmSubmittedAspect', 'Manually executed script upgrade V2.1: Remove wcmwf:submitted aspect',
|
||||
0, 72, -1, 73, null, 'UNKOWN', ${TRUE}, ${TRUE}, 'Script completed'
|
||||
);
|
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Solution to PostgreSQL issue:
|
||||
* function information_schema._pg_keypositions() does not exist
|
||||
* Taken from: http://archives.postgresql.org/pgsql-general/2005-12/msg00060.php
|
||||
* Author: Jason Long
|
||||
* Tested against PostgreSQL 8.2
|
||||
* First seen during upgrade testing of PostgreSQL from Alfresco 1.4.3 to 2.0
|
||||
*/
|
||||
SET search_path TO information_schema, public;
|
||||
CREATE FUNCTION _pg_keypositions() RETURNS SETOF integer
|
||||
LANGUAGE sql
|
||||
IMMUTABLE
|
||||
AS 'select g.s
|
||||
from generate_series(1,current_setting(''max_index_keys'')::int,1)
|
||||
as g(s)';
|
@@ -576,327 +576,161 @@
|
||||
<value>3.3.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--===========================-->
|
||||
<!--====== LIVE PATCHES =======-->
|
||||
<!--===========================-->
|
||||
|
||||
<bean id="patch.webscripts2" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.webscripts2" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.webscripts2</value></property>
|
||||
<property name="description"><value>patch.webscripts2.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>100</value></property>
|
||||
<property name="targetSchema"><value>101</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/webScripts2.xml</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.customModels" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.customModels" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.customModels</value></property>
|
||||
<property name="description"><value>patch.customModels.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>101</value></property>
|
||||
<property name="targetSchema"><value>102</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:models</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/customModelsSpace.acp</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.customMessages" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.customMessages" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.customMessages</value></property>
|
||||
<property name="description"><value>patch.customMessages.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>101</value></property>
|
||||
<property name="targetSchema"><value>102</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:messages</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/customMessagesSpace.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.customWebClientExtension" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.customWebClientExtension" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.customWebClientExtension</value></property>
|
||||
<property name="description"><value>patch.customWebClientExtension.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>101</value></property>
|
||||
<property name="targetSchema"><value>102</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:webclient_extension</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/customWebClientExtensionSpace.xml</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.redeploySubmitProcess2" class="org.alfresco.repo.admin.patch.impl.GenericWorkflowPatch" parent="basePatch" >
|
||||
<bean id="patch.redeploySubmitProcess2" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.redeploySubmitProcess</value></property>
|
||||
<property name="description"><value>patch.redeploySubmitProcess.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>102</value></property>
|
||||
<property name="targetSchema"><value>103</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="workflowDefinitions">
|
||||
<list>
|
||||
<props>
|
||||
<!-- WCM workflow definition -->
|
||||
<prop key="engineId">jbpm</prop>
|
||||
<prop key="location">alfresco/workflow/submit_processdefinition.xml</prop>
|
||||
<prop key="mimetype">text/xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.db-V2.1-RemoveWcmSubmittedAspect" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<bean id="patch.db-V2.1-RemoveWcmSubmittedAspect" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.db-V2.1-RemoveWcmSubmittedAspect</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>103</value></property>
|
||||
<property name="targetSchema"><value>104</value></property>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/2.1/${db.script.dialect}/AlfrescoSchemaUpdate-2.1-RemoveWcmSubmittedAspect.sql</value>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.webscripts3" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.webscripts3" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.webscripts3</value></property>
|
||||
<property name="description"><value>patch.webscripts3.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>104</value></property>
|
||||
<property name="targetSchema"><value>105</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/</prop>
|
||||
<prop key="location">alfresco/bootstrap/webScriptsReadme2.xml</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.customWorkflowDefs" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.customWorkflowDefs" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.customWorkflowDefs</value></property>
|
||||
<property name="description"><value>patch.customWorkflowDefs.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>105</value></property>
|
||||
<property name="targetSchema"><value>106</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:workflow_defs</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/customWorkflowDefsSpace.acp</prop>
|
||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.avmStoreAsIdentifier" class="org.alfresco.repo.admin.patch.impl.AVMStorePropertyTokenisationPatch" parent="basePatch" >
|
||||
<bean id="patch.avmStoreAsIdentifier" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.avmStoreAsIdentifier</value></property>
|
||||
<property name="description"><value>patch.avmStoreAsIdentifier.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>109</value></property>
|
||||
<property name="targetSchema"><value>110</value></property>
|
||||
<property name="spacesImporterBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="indexerAndSearcher">
|
||||
<ref bean="indexerAndSearcherFactory" />
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.avmFormPropertyIdentifier" class="org.alfresco.repo.admin.patch.impl.AVMFormsPropertyTokenisationPatch" parent="basePatch" >
|
||||
<bean id="patch.avmFormPropertyIdentifier" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.avmFormPropertyIdentifier</value></property>
|
||||
<property name="description"><value>patch.avmFormPropertyIdentifier.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>111</value></property>
|
||||
<property name="targetSchema"><value>112</value></property>
|
||||
<property name="spacesImporterBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="indexerAndSearcher">
|
||||
<ref bean="indexerAndSearcherFactory" />
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.formsFolder" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.formsFolder" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.formsFolder</value></property>
|
||||
<property name="description"><value>patch.formsFolder.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>112</value></property>
|
||||
<property name="targetSchema"><value>113</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/${spaces.company_home.childname}/${spaces.dictionary.childname}/app:forms</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
|
||||
<prop key="location">alfresco/bootstrap/formsSpace.xml</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.tagRootCategory" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||
<bean id="patch.tagRootCategory" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.tagRootCategory</value></property>
|
||||
<property name="description"><value>patch.tagRootCategory.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>113</value></property>
|
||||
<property name="targetSchema"><value>114</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="checkPath">
|
||||
<value>/cm:categoryRoot/cm:taggable</value>
|
||||
</property>
|
||||
<property name="bootstrapView">
|
||||
<props>
|
||||
<prop key="path">/cm:categoryRoot</prop>
|
||||
<prop key="location">alfresco/bootstrap/tagRootCategory.xml</prop>
|
||||
</props>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.db-V3.4-UsageTables" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<bean id="patch.db-V3.4-UsageTables" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.db-V3.4-UsageTables</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>113</value></property>
|
||||
<property name="targetSchema"><value>114</value></property>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/create/${db.script.dialect}/AlfrescoCreate-UsageTables.sql</value>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.deploymentMigration" class="org.alfresco.repo.admin.patch.impl.DeploymentMigrationPatch" parent="basePatch" >
|
||||
<bean id="patch.deploymentMigration" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.deploymentMigration</value></property>
|
||||
<property name="description"><value>patch.deploymentMigration.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>116</value></property>
|
||||
<property name="targetSchema"><value>117</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="importerBootstrap">
|
||||
<ref bean="spacesBootstrap" />
|
||||
</property>
|
||||
<property name="indexerAndSearcher">
|
||||
<ref bean="indexerAndSearcherFactory" />
|
||||
</property>
|
||||
<property name="avmService">
|
||||
<ref bean="avmService" />
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.redeploySubmitProcess3" class="org.alfresco.repo.admin.patch.impl.GenericWorkflowPatch" parent="basePatch" >
|
||||
<bean id="patch.redeploySubmitProcess3" class="org.alfresco.repo.admin.patch.impl.NoLongerSupportedPatch" parent="basePatch" >
|
||||
<property name="id"><value>patch.redeploySubmitProcess</value></property>
|
||||
<property name="description"><value>patch.redeploySubmitProcess.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>117</value></property>
|
||||
<property name="targetSchema"><value>118</value></property>
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.updateDmPermissions" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="workflowDefinitions">
|
||||
<list>
|
||||
<props>
|
||||
<!-- WCM workflow definition -->
|
||||
<prop key="engineId">jbpm</prop>
|
||||
<prop key="location">alfresco/workflow/submit_processdefinition.xml</prop>
|
||||
<prop key="mimetype">text/xml</prop>
|
||||
</props>
|
||||
</list>
|
||||
<property name="lastSupportedVersion" >
|
||||
<value>3.4.x</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--===========================-->
|
||||
<!--====== LIVE PATCHES =======-->
|
||||
<!--===========================-->
|
||||
|
||||
<bean id="patch.db-V2.2-ACL-From-2.1-A" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.db-V2.2-ACL-From-2.1-A</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
|
@@ -1,45 +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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.admin.patch.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.alfresco.repo.admin.patch.AbstractPatch;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
|
||||
/**
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class AVMFormsPropertyTokenisationPatch extends BaseReindexingPatch
|
||||
{
|
||||
private static final String MSG_SUCCESS = "patch.avmFormPropertyIdentifier.result";
|
||||
|
||||
private ImporterBootstrap spacesImporterBootstrap;
|
||||
|
||||
public void setSpacesImporterBootstrap(ImporterBootstrap spacesImporterBootstrap)
|
||||
{
|
||||
this.spacesImporterBootstrap = spacesImporterBootstrap;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String applyInternal() throws Exception
|
||||
{
|
||||
reindex("TYPE:\"wca:webform\"", spacesImporterBootstrap.getStoreRef());
|
||||
return I18NUtil.getMessage(MSG_SUCCESS);
|
||||
}
|
||||
}
|
@@ -1,48 +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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.alfresco.repo.admin.patch.impl;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
|
||||
/**
|
||||
* Patch wca:webfolder objects so that the avmstore property is in the
|
||||
* index in untokenized form.
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class AVMStorePropertyTokenisationPatch extends BaseReindexingPatch
|
||||
{
|
||||
private static final String MSG_SUCCESS = "patch.avmStoreAsIdentifier.result";
|
||||
|
||||
private ImporterBootstrap spacesImporterBootstrap;
|
||||
|
||||
public void setSpacesImporterBootstrap(ImporterBootstrap spacesImporterBootstrap)
|
||||
{
|
||||
this.spacesImporterBootstrap = spacesImporterBootstrap;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String applyInternal() throws Exception
|
||||
{
|
||||
reindex("TYPE:\"wca:webfolder\"", spacesImporterBootstrap.getStoreRef());
|
||||
return I18NUtil.getMessage(MSG_SUCCESS);
|
||||
}
|
||||
}
|
@@ -1,241 +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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.admin.patch.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.WCMAppModel;
|
||||
import org.alfresco.repo.admin.patch.AbstractPatch;
|
||||
import org.alfresco.repo.domain.PropertyValue;
|
||||
import org.alfresco.repo.importer.ImporterBootstrap;
|
||||
import org.alfresco.repo.search.IndexerAndSearcher;
|
||||
import org.alfresco.wcm.sandbox.SandboxConstants;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.service.namespace.RegexQNamePattern;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Patch that migrates deployment data to the new deployment model.
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class DeploymentMigrationPatch extends AbstractPatch
|
||||
{
|
||||
protected ImporterBootstrap importerBootstrap;
|
||||
protected IndexerAndSearcher indexerAndSearcher;
|
||||
protected AVMService avmService;
|
||||
|
||||
private static final String MSG_SUCCESS = "patch.deploymentMigration.result";
|
||||
private static final String MSG_WEBPROJECT = "patch.deploymentMigration.webProjectName";
|
||||
private static final String MSG_SERVER_MIGRATED = "patch.deploymentMigration.serverMigrated";
|
||||
private static final String MSG_REPORT_MIGRATED = "patch.deploymentMigration.reportMigrated";
|
||||
|
||||
private static final String FILE_SERVER_PREFIX = "\\\\";
|
||||
|
||||
private static final Log logger = LogFactory.getLog(DeploymentMigrationPatch.class);
|
||||
|
||||
public void setIndexerAndSearcher(IndexerAndSearcher indexerAndSearcher)
|
||||
{
|
||||
this.indexerAndSearcher = indexerAndSearcher;
|
||||
}
|
||||
|
||||
public void setImporterBootstrap(ImporterBootstrap importerBootstrap)
|
||||
{
|
||||
this.importerBootstrap = importerBootstrap;
|
||||
}
|
||||
|
||||
public void setAvmService(AVMService avmService)
|
||||
{
|
||||
this.avmService = avmService;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String applyInternal() throws Exception
|
||||
{
|
||||
String query = "TYPE:\"wca:webfolder\"";
|
||||
|
||||
ResultSet results = null;
|
||||
try
|
||||
{
|
||||
results = this.searchService.query(this.importerBootstrap.getStoreRef(),
|
||||
SearchService.LANGUAGE_LUCENE, query);
|
||||
|
||||
// iterate through the web projects and migrate the deployment data
|
||||
if (results.length() > 0)
|
||||
{
|
||||
for (NodeRef node : results.getNodeRefs())
|
||||
{
|
||||
if (this.nodeService.exists(node))
|
||||
{
|
||||
migrate(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (results != null)
|
||||
{
|
||||
results.close();
|
||||
}
|
||||
}
|
||||
|
||||
// return success message
|
||||
return I18NUtil.getMessage(MSG_SUCCESS);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void migrate(NodeRef webProject)
|
||||
{
|
||||
// output name of web project currently being migrated
|
||||
String projectName = (String)this.nodeService.getProperty(webProject, ContentModel.PROP_NAME);
|
||||
logger.info(I18NUtil.getMessage(MSG_WEBPROJECT, projectName));
|
||||
|
||||
// see if the web project has any deployment servers configured
|
||||
List<String> deployTo = (List<String>)this.nodeService.getProperty(webProject, WCMAppModel.PROP_DEPLOYTO);
|
||||
if (deployTo != null && deployTo.size() > 0)
|
||||
{
|
||||
for (String server : deployTo)
|
||||
{
|
||||
if (server != null && server.length() > 0)
|
||||
{
|
||||
migrateServer(server.trim(), webProject, projectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// migrate any deployment reports present
|
||||
List<ChildAssociationRef> deployReportRefs = nodeService.getChildAssocs(webProject,
|
||||
WCMAppModel.ASSOC_DEPLOYMENTREPORT, RegexQNamePattern.MATCH_ALL);
|
||||
if (deployReportRefs.size() > 0)
|
||||
{
|
||||
// gather data required for deploymentattempt node
|
||||
String attemptId = GUID.generate();
|
||||
String store = (String)this.nodeService.getProperty(webProject, WCMAppModel.PROP_AVMSTORE);
|
||||
List<String> servers = (List<String>)this.nodeService.getProperty(webProject,
|
||||
WCMAppModel.PROP_SELECTEDDEPLOYTO);
|
||||
if (servers == null)
|
||||
{
|
||||
servers = new ArrayList<String>();
|
||||
}
|
||||
Integer version = (Integer)this.nodeService.getProperty(webProject,
|
||||
WCMAppModel.PROP_SELECTEDDEPLOYVERSION);
|
||||
Date time = (Date)this.nodeService.getProperty(
|
||||
deployReportRefs.get(0).getChildRef(), WCMAppModel.PROP_DEPLOYSTARTTIME);
|
||||
|
||||
// create a deploymentattempt node for the reports to move to
|
||||
Map<QName, Serializable> props = new HashMap<QName, Serializable>(8, 1.0f);
|
||||
props.put(WCMAppModel.PROP_DEPLOYATTEMPTID, attemptId);
|
||||
props.put(WCMAppModel.PROP_DEPLOYATTEMPTTYPE, WCMAppModel.CONSTRAINT_LIVESERVER);
|
||||
props.put(WCMAppModel.PROP_DEPLOYATTEMPTSTORE, store);
|
||||
props.put(WCMAppModel.PROP_DEPLOYATTEMPTVERSION, version);
|
||||
props.put(WCMAppModel.PROP_DEPLOYATTEMPTSERVERS, (Serializable)servers);
|
||||
props.put(WCMAppModel.PROP_DEPLOYATTEMPTTIME, time);
|
||||
NodeRef attempt = this.nodeService.createNode(webProject,
|
||||
WCMAppModel.ASSOC_DEPLOYMENTATTEMPT, WCMAppModel.ASSOC_DEPLOYMENTATTEMPT,
|
||||
WCMAppModel.TYPE_DEPLOYMENTATTEMPT, props).getChildRef();
|
||||
|
||||
// set the attempt id on the staging store
|
||||
this.avmService.setStoreProperty(store, SandboxConstants.PROP_LAST_DEPLOYMENT_ID,
|
||||
new PropertyValue(DataTypeDefinition.TEXT, attemptId));
|
||||
|
||||
// migrate each report found
|
||||
for (ChildAssociationRef ref : deployReportRefs)
|
||||
{
|
||||
migrateReport(ref.getChildRef(), attempt, webProject, projectName);
|
||||
}
|
||||
}
|
||||
|
||||
// remove all the deprecated properties in the web project
|
||||
this.nodeService.removeProperty(webProject, WCMAppModel.PROP_DEPLOYTO);
|
||||
this.nodeService.removeProperty(webProject, WCMAppModel.PROP_SELECTEDDEPLOYTO);
|
||||
this.nodeService.removeProperty(webProject, WCMAppModel.PROP_SELECTEDDEPLOYVERSION);
|
||||
}
|
||||
|
||||
protected void migrateServer(String server, NodeRef webProject, String webProjectName)
|
||||
{
|
||||
// work out the host and port
|
||||
String host = server;
|
||||
int port = -1;
|
||||
int idx = server.indexOf(":");
|
||||
if (idx != -1)
|
||||
{
|
||||
host = server.substring(0, idx);
|
||||
String strPort = server.substring(idx+1);
|
||||
port = Integer.parseInt(strPort);
|
||||
}
|
||||
|
||||
Map<QName, Serializable> props = new HashMap<QName, Serializable>(4, 1.0f);
|
||||
if (server.startsWith(FILE_SERVER_PREFIX))
|
||||
{
|
||||
// server name starts with \\ so is therefore a file system deployment
|
||||
props.put(WCMAppModel.PROP_DEPLOYTYPE, WCMAppModel.CONSTRAINT_FILEDEPLOY);
|
||||
host = host.substring(FILE_SERVER_PREFIX.length());
|
||||
}
|
||||
else
|
||||
{
|
||||
// server name does not start with \\ so is therefore an Alfresco server deployment
|
||||
props.put(WCMAppModel.PROP_DEPLOYTYPE, WCMAppModel.CONSTRAINT_ALFDEPLOY);
|
||||
}
|
||||
|
||||
// set the properties
|
||||
props.put(WCMAppModel.PROP_DEPLOYSERVERTYPE, WCMAppModel.CONSTRAINT_LIVESERVER);
|
||||
props.put(WCMAppModel.PROP_DEPLOYSERVERHOST, host);
|
||||
if (port != -1)
|
||||
{
|
||||
props.put(WCMAppModel.PROP_DEPLOYSERVERPORT, new Integer(port));
|
||||
}
|
||||
|
||||
// create the deploymentserver node as a child of the webproject
|
||||
this.nodeService.createNode(webProject, WCMAppModel.ASSOC_DEPLOYMENTSERVER,
|
||||
WCMAppModel.ASSOC_DEPLOYMENTSERVER, WCMAppModel.TYPE_DEPLOYMENTSERVER,
|
||||
props).getChildRef();
|
||||
|
||||
// inform of migration
|
||||
logger.info(I18NUtil.getMessage(MSG_SERVER_MIGRATED, server, webProjectName));
|
||||
}
|
||||
|
||||
protected void migrateReport(NodeRef report, NodeRef attempt, NodeRef webProject,
|
||||
String webProjectName)
|
||||
{
|
||||
String server = (String)this.nodeService.getProperty(report, WCMAppModel.PROP_DEPLOYSERVER);
|
||||
|
||||
// make the deployment report node a child of the given deploymentattempt node
|
||||
this.nodeService.moveNode(report, attempt, WCMAppModel.ASSOC_DEPLOYMENTREPORTS,
|
||||
WCMAppModel.ASSOC_DEPLOYMENTREPORTS);
|
||||
|
||||
// inform of migration
|
||||
logger.info(I18NUtil.getMessage(MSG_REPORT_MIGRATED, server, webProjectName));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user