mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MT - fix AR-2023
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8111 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -753,6 +753,9 @@
|
|||||||
<property name="internalNodeService">
|
<property name="internalNodeService">
|
||||||
<ref bean="nodeService" />
|
<ref bean="nodeService" />
|
||||||
</property>
|
</property>
|
||||||
|
<property name="tenantService">
|
||||||
|
<ref bean="tenantService" />
|
||||||
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
@@ -40,6 +40,7 @@ import org.alfresco.repo.policy.ClassPolicyDelegate;
|
|||||||
import org.alfresco.repo.policy.JavaBehaviour;
|
import org.alfresco.repo.policy.JavaBehaviour;
|
||||||
import org.alfresco.repo.policy.PolicyComponent;
|
import org.alfresco.repo.policy.PolicyComponent;
|
||||||
import org.alfresco.repo.policy.PolicyScope;
|
import org.alfresco.repo.policy.PolicyScope;
|
||||||
|
import org.alfresco.repo.tenant.TenantService;
|
||||||
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
import org.alfresco.service.cmr.dictionary.AspectDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.ChildAssociationDefinition;
|
import org.alfresco.service.cmr.dictionary.ChildAssociationDefinition;
|
||||||
@@ -101,6 +102,9 @@ public class CopyServiceImpl implements CopyService
|
|||||||
/** Authentication service */
|
/** Authentication service */
|
||||||
private AuthenticationService authenticationService;
|
private AuthenticationService authenticationService;
|
||||||
|
|
||||||
|
/** Tenant service */
|
||||||
|
private TenantService tenantService;
|
||||||
|
|
||||||
/** Policy delegates */
|
/** Policy delegates */
|
||||||
private ClassPolicyDelegate<CopyServicePolicies.OnCopyNodePolicy> onCopyNodeDelegate;
|
private ClassPolicyDelegate<CopyServicePolicies.OnCopyNodePolicy> onCopyNodeDelegate;
|
||||||
private ClassPolicyDelegate<CopyServicePolicies.OnCopyCompletePolicy> onCopyCompleteDelegate;
|
private ClassPolicyDelegate<CopyServicePolicies.OnCopyCompletePolicy> onCopyCompleteDelegate;
|
||||||
@@ -185,6 +189,16 @@ public class CopyServiceImpl implements CopyService
|
|||||||
this.authenticationService = authenticationService;
|
this.authenticationService = authenticationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the tenant service
|
||||||
|
*
|
||||||
|
* @param tenantService the tenant service
|
||||||
|
*/
|
||||||
|
public void setTenantService(TenantService tenantService)
|
||||||
|
{
|
||||||
|
this.tenantService = tenantService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialise method
|
* Initialise method
|
||||||
*/
|
*/
|
||||||
@@ -225,7 +239,8 @@ public class CopyServiceImpl implements CopyService
|
|||||||
ParameterCheck.mandatory("Destination Parent", destinationParentRef);
|
ParameterCheck.mandatory("Destination Parent", destinationParentRef);
|
||||||
ParameterCheck.mandatory("Destination Association Name", destinationQName);
|
ParameterCheck.mandatory("Destination Association Name", destinationQName);
|
||||||
|
|
||||||
if (sourceNodeRef.getStoreRef().equals(destinationParentRef.getStoreRef()) == false)
|
// AR-2023, need to push down
|
||||||
|
if (tenantService.getName(sourceNodeRef.getStoreRef()).equals(tenantService.getName(destinationParentRef.getStoreRef())) == false)
|
||||||
{
|
{
|
||||||
// TODO We need to create a new node in the other store with the same id as the source
|
// TODO We need to create a new node in the other store with the same id as the source
|
||||||
|
|
||||||
|
@@ -470,7 +470,8 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
|||||||
ChildAssoc oldAssoc = nodeDaoService.getPrimaryParentAssoc(nodeToMove);
|
ChildAssoc oldAssoc = nodeDaoService.getPrimaryParentAssoc(nodeToMove);
|
||||||
ChildAssociationRef oldAssocRef = oldAssoc.getChildAssocRef();
|
ChildAssociationRef oldAssocRef = oldAssoc.getChildAssocRef();
|
||||||
|
|
||||||
boolean movingStore = !nodeToMoveRef.getStoreRef().equals(newParentRef.getStoreRef());
|
// AR-2023, need to push down
|
||||||
|
boolean movingStore = !tenantService.getName(nodeToMoveRef.getStoreRef()).equals(tenantService.getName(newParentRef.getStoreRef()));
|
||||||
|
|
||||||
// data needed for policy invocation
|
// data needed for policy invocation
|
||||||
QName nodeToMoveTypeQName = nodeToMove.getTypeQName();
|
QName nodeToMoveTypeQName = nodeToMove.getTypeQName();
|
||||||
|
Reference in New Issue
Block a user