O'Reilly logo

Alfresco CMIS by Martin Bergljung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating, updating, and deleting content

We now know how to list folder content and how to get the available content type hierarchy. It's time to look at how we can create objects.

Creating folders

Creating folders is easy, just get a Folder object for the parent folder in which you want to create a new folder and then use the createFolder method on the parent folder object as in the following code:

public Folder createFolder(Session session) { String folderName = "OpenCMISTest"; Folder parentFolder = session.getRootFolder(); // Make sure the user is allowed to create a folder // under the root folder if (parentFolder.getAllowableActions().getAllowableActions(). contains(Action.CAN_CREATE_FOLDER) == false) { throw new CmisUnauthorizedException( "Current ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required