From the publication module, you may recover every libraries present on the server.
public void server_getLibraries( ILibraryModule libraryModule, IContext context ) throws LibraryModuleException { // recovering every libraries Collection libraries = libraryModule.getLibraries( context ); for ( Iterator iter = libraries.iterator() ; iter.hasNext() ; ) { ILibrary library = (ILibrary)iter.next(); System.out.println( library.getName() ); } }
In the publication module, you may recover one library by its name.
public void server_getLibrary( ILibraryModule libraryModule, IContext context ) throws LibraryModuleException { // recovering a library ILibrary library = libraryModule.getLibrary( context, "test-library" ); System.out.println( library.getName() ); }
In the publication module, you may create new libraries.
public void server_createLibrary( ILibraryModule libraryModule, IContext context ) throws LibraryModuleException { ILibrary library = libraryModule.createLibrary( context, "test-library" ); // position some properties library.setForbiddenExtensions( "bat, js" ); }