@Override public void moveObject( CallContext callContext, String repositoryId, Holder<String> objectId, String sourceFolderId, String targetFolderId) { exceptionService.invalidArgumentRequiredHolderString("objectId", objectId); Lock lock = threadLockService.getWriteLock(repositoryId, objectId.getValue()); try { lock.lock(); // ////////////////// // General Exception // ////////////////// exceptionService.invalidArgumentRequiredString("sourceFolderId", sourceFolderId); exceptionService.invalidArgumentRequiredString("targetFolderId", targetFolderId); Content content = contentService.getContent(repositoryId, objectId.getValue()); exceptionService.objectNotFound(DomainType.OBJECT, content, objectId.getValue()); Folder source = contentService.getFolder(repositoryId, sourceFolderId); exceptionService.objectNotFound(DomainType.OBJECT, source, sourceFolderId); Folder target = contentService.getFolder(repositoryId, targetFolderId); exceptionService.objectNotFound(DomainType.OBJECT, target, targetFolderId); exceptionService.permissionDenied( callContext, repositoryId, PermissionMapping.CAN_MOVE_OBJECT, content); exceptionService.permissionDenied( callContext, repositoryId, PermissionMapping.CAN_MOVE_SOURCE, source); exceptionService.permissionDenied( callContext, repositoryId, PermissionMapping.CAN_MOVE_TARGET, target); // ////////////////// // Body of the method // ////////////////// contentService.move(callContext, repositoryId, content, target); nemakiCachePool.get(repositoryId).removeCmisCache(content.getId()); } finally { lock.unlock(); } }