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

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, or null if the volume is not customizable.
 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. Generally will use LibrariesSupport#createLibraryImplementation. This method is not used by LibraryManager#createLibrary except in the case of LibraryManager#getDefault.

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. This method is not used by LibraryManager#createLibrary except in the case of LibraryManager#getDefault.

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. This method is not used by LibraryManager#createLibrary except in the case of LibraryManager#getDefault.


getCustomizer

Customizer getCustomizer(String volumeType)
Returns customizer for given volume's type, or null if the volume is not customizable. The LibraryCustomizerContext instance 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) or null if such customizer doesn't exist.

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

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.