This example is based on the code in the ContentLibraryWorkflow.java sample file. The sample resource is located in the following vCloud Suite SDK for Java directory, client/samples/java/com/vmware/vcloud/suite/samples/interop.
This example uses the steps that are described in the Create a Local Content Library procedure.
... import com.vmware.content.LibraryModel; import com.vmware.content.library.StorageBacking; import com.vmware.content.library.StorageBacking.Type; // Create a StorageBacking instance to back the library content on the local file system. StorageBacking libraryBacking = new StorageBacking(); libraryBacking.setType(Type.OTHER); libraryBacking.setStorageUri(URI.create("file:///tmp")); libraryModel.setStorageBackings(Collections.singletonList(libraryBacking)); // Create a LibraryModel that represents a local library. LibraryModel libraryModel = new LibraryModel(); libraryModel.setType(LibraryModel.LibraryType.LOCAL); libraryModel.setName("AcmeLibrary"); // Access the LocalLibrary service by using the endpoint. LocalLibrary localLibraryService = serviceManager.getVapiService(LocalLibrary.class); // Call the create method of the LocalLibrary service passing as an // argument the LibraryModel instance. String libraryId = localLibraryService.create(UUID.randomUUID().toString(), libraryMod