org.netbeans.modules.project.libraries/1 1.13.22

org.netbeans.spi.project.libraries
Interface LibraryTypeProvider

All Superinterfaces:
Lookup.Provider

public interface LibraryTypeProvider
extends Lookup.Provider

SPI interface for provider of library type. The LibraryTypeProvider is responsible for creating new libraries of given type and for supplying the customizers of library's volumes.


Method Summary
 LibraryImplementation createLibrary()
          Creates a new empty library implementation.
 Customizer getCustomizer(String volumeType)
          Returns customizer for given volume's type.
 String getDisplayName()
          Returns the UI name of the LibraryType.
 String getLibraryType()
          Get a unique identifier for the library type.
 String[] getSupportedVolumeTypes()
          Get identifiers for the volume types supported by the libraries created by this provider.
 void libraryCreated(LibraryImplementation libraryImpl)
          This method is called by the libraries framework when the library was created and fully initialized (all its properties have to be read).
 void libraryDeleted(LibraryImplementation libraryImpl)
          This method is called by the libraries framework when the library was deleted.
 
Methods inherited from interface org.openide.util.Lookup.Provider
getLookup
 

Method Detail

getDisplayName

String getDisplayName()
Returns the UI name of the LibraryType. This name is used in the UI while the libraryType is used as a system identifier.

Returns:
String the display name

getLibraryType

String getLibraryType()
Get a unique identifier for the library type. For example, j2se.

Returns:
the unique library type identifier, never null

getSupportedVolumeTypes

String[] getSupportedVolumeTypes()
Get identifiers for the volume types supported by the libraries created by this provider. For example, classpath, javadoc, or src.

Returns:
support volume type identifiers, never null, may be an empty array.

createLibrary

LibraryImplementation createLibrary()
Creates a new empty library implementation.

Returns:
the created library model, never null

libraryDeleted

void libraryDeleted(LibraryImplementation libraryImpl)
This method is called by the libraries framework when the library was deleted. If the LibraryTypeProvider implementation requires clean of additional settings (e.g. remove properties in the build.properties) it should be done in this method.

Parameters:
libraryImpl -

libraryCreated

void libraryCreated(LibraryImplementation libraryImpl)
This method is called by the libraries framework when the library was created and fully initialized (all its properties have to be read). If the LibraryTypeProvider implementation requires initialization of additional settings (e.g. adding properties into the build.properties) it should be done in this method.


getCustomizer

Customizer getCustomizer(String volumeType)
Returns customizer for given volume's type. The object of the LibraryImplementation type is passed to the customizer's setObject method. The customized object describes the library created by this provider, but the customizer cannot assume that the customized object is of the same type as the object created by createLibrary().

Parameters:
volumeType - a type of volume listed in getSupportedVolumeTypes()
Returns:
a customizer (must extend JComponent)

org.netbeans.modules.project.libraries/1 1.13.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.