Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78416: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      75791: ACE-2149: EOL AVM / WCM
       - Some (probably not all!) removal of AVM patch-related code and MyBatis config


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82548 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:09:04 +00:00
parent 81fbc4c634
commit 3b86753d32
6 changed files with 5 additions and 143 deletions

View File

@@ -25,15 +25,6 @@
</property> </property>
</bean> </bean>
<bean id="schema.create.avm" class="org.alfresco.repo.domain.schema.SchemaBootstrapRegistration" init-method="register">
<property name="schemaBootstrap" ref="schemaBootstrap" />
<property name="preCreateScriptUrls">
<list>
<value>classpath:alfresco/dbscripts/create/${db.script.dialect}/AlfrescoCreate-AvmTables.sql</value>
</list>
</property>
</bean>
<bean id="schema.create.jbpm" class="org.alfresco.repo.domain.schema.SchemaBootstrapRegistration" init-method="register"> <bean id="schema.create.jbpm" class="org.alfresco.repo.domain.schema.SchemaBootstrapRegistration" init-method="register">
<property name="schemaBootstrap" ref="schemaBootstrap" /> <property name="schemaBootstrap" ref="schemaBootstrap" />
<property name="postCreateScriptUrls"> <property name="postCreateScriptUrls">
@@ -98,22 +89,6 @@
</property> </property>
</bean> </bean>
<bean id="schema.upgrade.avm" class="org.alfresco.repo.domain.schema.SchemaBootstrapRegistration" init-method="register">
<property name="schemaBootstrap" ref="schemaBootstrap" />
<property name="postUpdateScriptPatches">
<list>
<ref bean="patch.db-V3.2-Remove-AVM-Issuer" />
<ref bean="patch.db-V3.2-Modify-AVM-MimeType" />
<ref bean="patch.db-V3.3-Fix-AVM-Seqs" />
<ref bean="patch.db-V3.4-RemovingLinkValidationMetadata" />
<ref bean="patch.db-V3.4-AVM-rename-dupes" />
<ref bean="patch.db-V3.4-AVM-index-child-entries-lower" />
<ref bean="patch.db-V4.1-fix-AVM-seqs-order" />
<ref bean="patch.db-V4.2-drop-AVM-index" />
</list>
</property>
</bean>
<bean id="schema.upgrade.activiti" class="org.alfresco.repo.domain.schema.SchemaBootstrapRegistration" init-method="register"> <bean id="schema.upgrade.activiti" class="org.alfresco.repo.domain.schema.SchemaBootstrapRegistration" init-method="register">
<property name="schemaBootstrap" ref="schemaBootstrap" /> <property name="schemaBootstrap" ref="schemaBootstrap" />
<property name="preUpdateScriptPatches"> <property name="preUpdateScriptPatches">

View File

@@ -206,8 +206,6 @@ Inbound settings from iBatis
<mapper resource="alfresco/ibatis/#resource.dialect#/solr-common-SqlMap.xml"/> <mapper resource="alfresco/ibatis/#resource.dialect#/solr-common-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/usage-common-SqlMap.xml"/> <mapper resource="alfresco/ibatis/#resource.dialect#/usage-common-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/usage-insert-SqlMap.xml"/> <mapper resource="alfresco/ibatis/#resource.dialect#/usage-insert-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/avm-common-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/avm-insert-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/subscriptions-common-SqlMap.xml"/> <mapper resource="alfresco/ibatis/#resource.dialect#/subscriptions-common-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/tenants-common-SqlMap.xml"/> <mapper resource="alfresco/ibatis/#resource.dialect#/tenants-common-SqlMap.xml"/>
<mapper resource="alfresco/ibatis/#resource.dialect#/metadata-query-common-SqlMap.xml"/> <mapper resource="alfresco/ibatis/#resource.dialect#/metadata-query-common-SqlMap.xml"/>

View File

@@ -261,28 +261,6 @@
ga.name = 'alfresco-tenants' ga.name = 'alfresco-tenants'
</select> </select>
<select id="select_oldAttrAVMLocks" resultMap="result_avmLock">
select
ma2.mkey as wpStoreId,
a4.string_value as relPath,
a5.string_value as avmStore,
a6.string_value as owner1
from
alf_global_attributes ga
join alf_map_attribute_entries ma on (ma.map_id = ga.attribute)
join alf_map_attribute_entries ma2 on (ma2.map_id = ma.attribute_id)
join alf_map_attribute_entries ma3 on (ma3.map_id = ma2.attribute_id)
join alf_map_attribute_entries ma4 on (ma4.map_id = ma3.attribute_id and ma4.mkey = 'path')
join alf_attributes a4 on (a4.id = ma4.attribute_id)
join alf_map_attribute_entries ma5 on (ma5.map_id = ma3.attribute_id and ma5.mkey = 'store')
join alf_attributes a5 on (a5.id = ma5.attribute_id)
join alf_map_attribute_entries ma6 on (ma6.map_id = ma3.attribute_id and ma6.mkey = 'owners')
join alf_list_attribute_entries la6 on (la6.list_id = ma6.attribute_id and la6.mindex = 0)
join alf_attributes a6 on (a6.id = la6.attribute_id)
where
ga.name = '.avm_lock_table'
</select>
<select id="select_oldAttrPropertyBackedBeans" resultMap="result_PBB"> <select id="select_oldAttrPropertyBackedBeans" resultMap="result_PBB">
select select
ma.mkey as componentName, ma.mkey as componentName,
@@ -317,22 +295,7 @@
from from
alf_global_attributes ga alf_global_attributes ga
where where
name not in ('alfresco-tenants', '.href', '.avm_lock_table', '.PropertyBackedBeans', '.ChainingUserRegistrySynchronizer') name not in ('alfresco-tenants', '.href', '.PropertyBackedBeans', '.ChainingUserRegistrySynchronizer')
</select>
<select id="select_AllAclIds" resultType="long">
select
id
from
alf_access_control_list
</select>
<!-- for patch -->
<select id="select_UsedAclIds" resultType="long">
select acl_id from avm_nodes where acl_id is not null
union select acl_id from avm_stores where acl_id is not null
union select acl_id from alf_node where acl_id is not null
union select acl_id from alf_attributes where acl_id is not null
</select> </select>
<!-- for patch --> <!-- for patch -->

View File

@@ -50,51 +50,30 @@ public abstract class AbstractPatchDAOImpl implements PatchDAO, BatchingDAO
this.contentDataDAO = contentDataDAO; this.contentDataDAO = contentDataDAO;
} }
@Override
public long getMaxAclId() public long getMaxAclId()
{ {
return getMaxAclEntityId(); return getMaxAclEntityId();
} }
@Override
public long getDmNodeCount() public long getDmNodeCount()
{ {
return getDmNodeEntitiesCount(); return getDmNodeEntitiesCount();
} }
@Override
public long getDmNodeCountWithNewACLs(Long above) public long getDmNodeCountWithNewACLs(Long above)
{ {
return getDmNodeEntitiesCountWithNewACLs(above); return getDmNodeEntitiesCountWithNewACLs(above);
} }
public List<Long> selectAllAclIds()
{
return selectAllAclEntityIds();
}
public List<Long> selectNonDanglingAclIds()
{
return selectNonDanglingAclEntityIds();
}
public int deleteDanglingAces()
{
return deleteDanglingAceEntities();
}
public int deleteAcls(List<Long> aclIds)
{
return deleteAclEntities(aclIds);
}
public int deleteAclMembersForAcls(List<Long> aclIds)
{
return deleteAclMemberEntitiesForAcls(aclIds);
}
/** /**
* {@inheritDoc} * {@inheritDoc}
* <p> * <p>
* @see #getAdmOldContentProperties(Long, Long) * @see #getAdmOldContentProperties(Long, Long)
*/ */
@Override
public void updateAdmV31ContentProperties(Long minNodeId, Long maxNodeId) public void updateAdmV31ContentProperties(Long minNodeId, Long maxNodeId)
{ {
List<Map<String, Object>> props = getAdmOldContentProperties(minNodeId, maxNodeId); List<Map<String, Object>> props = getAdmOldContentProperties(minNodeId, maxNodeId);
@@ -168,11 +147,6 @@ public abstract class AbstractPatchDAOImpl implements PatchDAO, BatchingDAO
protected abstract long getMaxAclEntityId(); protected abstract long getMaxAclEntityId();
protected abstract long getDmNodeEntitiesCount(); protected abstract long getDmNodeEntitiesCount();
protected abstract long getDmNodeEntitiesCountWithNewACLs(Long above); protected abstract long getDmNodeEntitiesCountWithNewACLs(Long above);
protected abstract List<Long> selectAllAclEntityIds();
protected abstract List<Long> selectNonDanglingAclEntityIds();
protected abstract int deleteDanglingAceEntities();
protected abstract int deleteAclEntities(List<Long> aclIds);
protected abstract int deleteAclMemberEntitiesForAcls(List<Long> aclIds);
// note: caller's row handler is expected to migrate the attrs // note: caller's row handler is expected to migrate the attrs
@Override @Override

View File

@@ -97,16 +97,6 @@ public interface PatchDAO
*/ */
public long getDmNodeCountWithNewACLs(Long above); public long getDmNodeCountWithNewACLs(Long above);
public List<Long> selectAllAclIds();
public List<Long> selectNonDanglingAclIds();
public int deleteDanglingAces();
public int deleteAcls(List<Long> aclIds);
public int deleteAclMembersForAcls(List<Long> aclIds);
/** /**
* @return Returns the names of authorities with incorrect CRC values * @return Returns the names of authorities with incorrect CRC values
*/ */

View File

@@ -59,8 +59,6 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
private static final String SELECT_ADM_MAX_NODE_ID = "alfresco.patch.select_admMaxNodeId"; private static final String SELECT_ADM_MAX_NODE_ID = "alfresco.patch.select_admMaxNodeId";
private static final String SELECT_ADM_OLD_CONTENT_PROPERTIES = "alfresco.patch.select_admOldContentProperties"; private static final String SELECT_ADM_OLD_CONTENT_PROPERTIES = "alfresco.patch.select_admOldContentProperties";
private static final String SELECT_AUTHORITIES_AND_CRC = "alfresco.patch.select_authoritiesAndCrc"; private static final String SELECT_AUTHORITIES_AND_CRC = "alfresco.patch.select_authoritiesAndCrc";
private static final String SELECT_PERMISSIONS_ALL_ACL_IDS = "alfresco.patch.select_AllAclIds";
private static final String SELECT_PERMISSIONS_USED_ACL_IDS = "alfresco.patch.select_UsedAclIds";
private static final String SELECT_PERMISSIONS_MAX_ACL_ID = "alfresco.patch.select_MaxAclId"; private static final String SELECT_PERMISSIONS_MAX_ACL_ID = "alfresco.patch.select_MaxAclId";
private static final String SELECT_PERMISSIONS_DM_NODE_COUNT = "alfresco.patch.select_DmNodeCount"; private static final String SELECT_PERMISSIONS_DM_NODE_COUNT = "alfresco.patch.select_DmNodeCount";
private static final String SELECT_PERMISSIONS_DM_NODE_COUNT_WITH_NEW_ACLS = "alfresco.patch.select_DmNodeCountWherePermissionsHaveChanged"; private static final String SELECT_PERMISSIONS_DM_NODE_COUNT_WITH_NEW_ACLS = "alfresco.patch.select_DmNodeCountWherePermissionsHaveChanged";
@@ -74,10 +72,6 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
private static final String UPDATE_CHILD_ASSOC_CRC = "alfresco.patch.update_childAssocCrc"; private static final String UPDATE_CHILD_ASSOC_CRC = "alfresco.patch.update_childAssocCrc";
private static final String UPDATE_CREATE_SIZE_CURRENT_PROPERTY = "alfresco.patch.update_CreateSizeCurrentProperty"; private static final String UPDATE_CREATE_SIZE_CURRENT_PROPERTY = "alfresco.patch.update_CreateSizeCurrentProperty";
private static final String DELETE_PERMISSIONS_UNUSED_ACES = "alfresco.permissions.delete_UnusedAces";
private static final String DELETE_PERMISSIONS_ACL_LIST = "alfresco.permissions.delete_AclList";
private static final String DELETE_PERMISSIONS_ACL_MEMBERS_FOR_ACL_LIST = "alfresco.permissions.delete_AclMembersForAclList";
private static final String SELECT_OLD_ATTR_TENANTS = "alfresco.patch.select_oldAttrTenants"; private static final String SELECT_OLD_ATTR_TENANTS = "alfresco.patch.select_oldAttrTenants";
private static final String SELECT_OLD_ATTR_PBBS = "alfresco.patch.select_oldAttrPropertyBackedBeans"; private static final String SELECT_OLD_ATTR_PBBS = "alfresco.patch.select_oldAttrPropertyBackedBeans";
private static final String SELECT_OLD_ATTR_CHAINING_URS = "alfresco.patch.select_oldAttrChainingURS"; private static final String SELECT_OLD_ATTR_CHAINING_URS = "alfresco.patch.select_oldAttrChainingURS";
@@ -236,38 +230,6 @@ public class PatchDAOImpl extends AbstractPatchDAOImpl
return count == null ? 0L : count; return count == null ? 0L : count;
} }
@SuppressWarnings("unchecked")
@Override
protected List<Long> selectAllAclEntityIds()
{
return (List<Long>) template.selectList(SELECT_PERMISSIONS_ALL_ACL_IDS);
}
@SuppressWarnings("unchecked")
@Override
protected List<Long> selectNonDanglingAclEntityIds()
{
return (List<Long>) template.selectList(SELECT_PERMISSIONS_USED_ACL_IDS);
}
@Override
protected int deleteDanglingAceEntities()
{
return template.delete(DELETE_PERMISSIONS_UNUSED_ACES);
}
@Override
protected int deleteAclEntities(List<Long> aclIds)
{
return template.delete(DELETE_PERMISSIONS_ACL_LIST, aclIds);
}
@Override
protected int deleteAclMemberEntitiesForAcls(List<Long> aclIds)
{
return template.delete(DELETE_PERMISSIONS_ACL_MEMBERS_FOR_ACL_LIST, aclIds);
}
public List<String> getAuthoritiesWithNonUtf8Crcs() public List<String> getAuthoritiesWithNonUtf8Crcs()
{ {
final List<String> results = new ArrayList<String>(1000); final List<String> results = new ArrayList<String>(1000);