The 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 Listing All Content Libraries.

...
import com.vmware.content.Library;
import com.vmware.vcloud.suite.samples.common.ServiceManager;
 
// Access the Library Service.
   Library libraryService = serviceManager.getVapiService(Library.class);

// List all content libraries.
   List<String> allLibraries = libraryService.list();
   System.out.println("List of all library identifiers: /n");
   for (String cl : allLibraries) {
         System.out.println(cl);
   }