. Clipboard inter-store copy support

- Inter-store copy between Workspace and AVM stores
 - Inter-store copy between AVM and Workspace stores
. Added CrossRepositoryCopyService to ServiceRegistry

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5034 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-02-05 11:48:51 +00:00
parent 9f04ddecf2
commit 2905f5ab1a
4 changed files with 202 additions and 17 deletions

View File

@@ -189,20 +189,41 @@ public class ClipboardBean
private boolean performClipboardOperation(ClipboardItem item, int action)
throws Throwable
{
boolean success = false;
FacesContext fc = FacesContext.getCurrentInstance();
// test the current JSF view to see if the clipboard item can paste to it
if (logger.isDebugEnabled())
logger.debug("Clipboard destintation View Id: " + fc.getViewRoot().getViewId());
if (item.canPasteToViewId(fc.getViewRoot().getViewId()) == false)
logger.debug("Clipboard destination View Id: " + fc.getViewRoot().getViewId());
if (item.getMode() == ClipboardStatus.CUT)
{
// early exit if we cannot support this view as a paste location
if (logger.isDebugEnabled())
logger.debug("Clipboard Item: " + item.getNodeRef() + " not suitable for paste to current View Id.");
return false;
if (item.canMoveToViewId(fc.getViewRoot().getViewId()) == true)
{
success = item.paste(fc, fc.getViewRoot().getViewId(), action);
}
else
{
// we cannot support this view as a Move paste location
if (logger.isDebugEnabled())
logger.debug("Clipboard Item: " + item.getNodeRef() + " not suitable for Move paste to current View Id.");
}
}
else if (item.getMode() == ClipboardStatus.COPY)
{
if (item.canCopyToViewId(fc.getViewRoot().getViewId()) == true)
{
success = item.paste(fc, fc.getViewRoot().getViewId(), action);
}
else
{
// we cannot support this view as a Copy paste location
if (logger.isDebugEnabled())
logger.debug("Clipboard Item: " + item.getNodeRef() + " not suitable for Copy paste to current View Id.");
}
}
return item.paste(fc, fc.getViewRoot().getViewId(), action);
return success;
}
/**