mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-5068 - rework of content equality test.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22880 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -524,16 +524,9 @@ public class RepoPrimaryManifestProcessorImpl extends AbstractManifestProcessorB
|
||||
Map<QName, Serializable> props = new HashMap<QName, Serializable>(node.getProperties());
|
||||
Map<QName, Serializable> existingProps = nodeService.getProperties(nodeToUpdate);
|
||||
|
||||
// inject transferred property here
|
||||
// inject transferred properties/aspect here
|
||||
injectTransferred(props);
|
||||
|
||||
// if(!props.containsKey(TransferModel.PROP_REPOSITORY_ID))
|
||||
// {
|
||||
// log.debug("injecting repositoryId property");
|
||||
// props.put(TransferModel.PROP_REPOSITORY_ID, header.getRepositoryId());
|
||||
// }
|
||||
// props.put(TransferModel.PROP_FROM_REPOSITORY_ID, header.getRepositoryId());
|
||||
|
||||
|
||||
// Remove the invadedBy property since that is used by the transfer service
|
||||
// and is local to this repository.
|
||||
props.remove(TransferModel.PROP_INVADED_BY);
|
||||
@@ -937,13 +930,33 @@ public class RepoPrimaryManifestProcessorImpl extends AbstractManifestProcessorB
|
||||
* inject transferred
|
||||
*/
|
||||
private void injectTransferred(Map<QName, Serializable> props)
|
||||
{
|
||||
{
|
||||
if(!props.containsKey(TransferModel.PROP_REPOSITORY_ID))
|
||||
{
|
||||
log.debug("injecting repositoryId property");
|
||||
props.put(TransferModel.PROP_REPOSITORY_ID, header.getRepositoryId());
|
||||
}
|
||||
props.put(TransferModel.PROP_FROM_REPOSITORY_ID, header.getRepositoryId());
|
||||
|
||||
/**
|
||||
* For each property
|
||||
*/
|
||||
List<String> contentProps = new ArrayList();
|
||||
for (Serializable value : props.values())
|
||||
{
|
||||
if ((value != null) && ContentData.class.isAssignableFrom(value.getClass()))
|
||||
{
|
||||
ContentData srcContent = (ContentData)value;
|
||||
|
||||
if(srcContent.getContentUrl() != null && !srcContent.getContentUrl().isEmpty())
|
||||
{
|
||||
log.debug("adding part name to from content field");
|
||||
contentProps.add(TransferCommons.URLToPartName(srcContent.getContentUrl()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
props.put(TransferModel.PROP_FROM_CONTENT, (Serializable)contentProps);
|
||||
}
|
||||
|
||||
public void setAlienProcessor(AlienProcessor alienProcessor)
|
||||
|
Reference in New Issue
Block a user