DocumentManager documentManager = null;
try {
documentManager = (DocumentManager) this.manager.lookup(DocumentManager.ROLE);
if (clipboard.getMethod() == Clipboard.METHOD_COPY) {
documentManager.copyAll(area, clippedDocument.getPath(), area, targetPath);
} else if (clipboard.getMethod() == Clipboard.METHOD_CUT) {
documentManager.moveAll(area, clippedDocument.getPath(), area, targetPath);
} else {
throw new RuntimeException("This clipboard method is not supported!");
}