ObjectStore objectStore = fStoreManager.getObjectStore(repositoryId);
Filing spo = null;
String user = context.getUsername();
if (null == so) {
throw new CmisObjectNotFoundException("Unknown object: " + objectId.getValue());
} else if (so instanceof Filing) {
spo = (Filing) so;
} else {
throw new CmisInvalidArgumentException("Object must be folder or document: " + objectId.getValue());
}
StoredObject soTarget = objectStore.getObjectById(targetFolderId);
if (null == soTarget) {
throw new CmisObjectNotFoundException("Unknown target folder: " + targetFolderId);
} else if (soTarget instanceof Folder) {
targetFolder = (Folder) soTarget;
} else {
throw new CmisNotSupportedException("Destination " + targetFolderId
+ " of a move operation must be a folder");
}
StoredObject soSource = objectStore.getObjectById(sourceFolderId);
if (null == soSource) {
throw new CmisObjectNotFoundException("Unknown source folder: " + sourceFolderId);
} else if (soSource instanceof Folder) {
sourceFolder = (Folder) soSource;
} else {
throw new CmisNotSupportedException("Source " + sourceFolderId + " of a move operation must be a folder");
}