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

93840: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      93780: Merged DEV to 5.0.N (5.0.1).
         92809: MNT-12807: Impossible to create a tenant with specified contentstore if Content Encryption was enabled.
                   In CryptoContentStore was implemented ContentStoreCaps.
         93637: MNT-12807: Impossible to create a tenant with specified contentstore if Content Encryption was enabled.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95001 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 15:23:51 +00:00
parent f1cfb74849
commit 4e722d7cd0

View File

@@ -21,6 +21,7 @@ package org.alfresco.repo.management.subsystems;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import org.alfresco.repo.content.ContentStoreCaps;
import org.alfresco.repo.tenant.TenantDeployer; import org.alfresco.repo.tenant.TenantDeployer;
import org.alfresco.repo.tenant.TenantRoutingContentStore; import org.alfresco.repo.tenant.TenantRoutingContentStore;
import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInterceptor;
@@ -66,6 +67,17 @@ public class CryptodocSubsystemProxyFactory extends SubsystemProxyFactory
{ {
return (TenantDeployer) bean; return (TenantDeployer) bean;
} }
else
{
if (bean instanceof ContentStoreCaps)
{
Object ten = ((ContentStoreCaps)bean).getTenantDeployer();
if (ten instanceof TenantDeployer)
{
return (TenantDeployer) ten;
}
}
}
return null; return null;
} }
@@ -76,6 +88,17 @@ public class CryptodocSubsystemProxyFactory extends SubsystemProxyFactory
{ {
return (TenantRoutingContentStore) bean; return (TenantRoutingContentStore) bean;
} }
else
{
if (bean instanceof ContentStoreCaps)
{
Object ten = ((ContentStoreCaps)bean).getTenantRoutingContentStore();
if (ten instanceof TenantRoutingContentStore)
{
return (TenantRoutingContentStore) ten;
}
}
}
return null; return null;
} }
})); }));