@Override public String createItem( CallContext callContext, String repositoryId, Properties properties, String folderId, List<String> policies, Acl addAces, Acl removeAces, ExtensionsData extension) { // ////////////////// // General Exception // ////////////////// TypeDefinition td = typeManager.getTypeDefinition(repositoryId, DataUtil.getObjectTypeId(properties)); Folder parentFolder = contentService.getFolder(repositoryId, folderId); exceptionService.objectNotFoundParentFolder(repositoryId, folderId, parentFolder); exceptionService.invalidArgumentRequiredCollection("properties", properties.getPropertyList()); // ////////////////// // Specific Exception // ////////////////// exceptionService.constraintBaseTypeId(repositoryId, properties, BaseTypeId.CMIS_ITEM); exceptionService.constraintPropertyValue( repositoryId, td, properties, DataUtil.getIdProperty(properties, PropertyIds.OBJECT_ID)); exceptionService.constraintCotrollablePolicies(td, policies, properties); exceptionService.constraintCotrollableAcl(td, addAces, removeAces, properties); // ////////////////// // Body of the method // ////////////////// Item item = contentService.createItem( callContext, repositoryId, properties, folderId, policies, addAces, removeAces, extension); return item.getId(); }