org.netbeans.spi.project.libraries
Interface LibraryImplementation


public interface LibraryImplementation

Base SPI interface for library. This SPI class is used as a model by the libraries framework. The LibraryTypeProvider implementor should rather use org.netbeans.spi.project.libraries.support.LibrariesSupport.createLibraryImplementation factory method to create default LibraryImplementation than to implement this interface.


Field Summary
static String PROP_CONTENT
           
static String PROP_DESCRIPTION
           
static String PROP_NAME
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds PropertyChangeListener
 List getContent(String volumeType)
          Returns List of resources contained in the given volume.
 String getDescription()
          Get a description of the library.
 String getLocalizingBundle()
          Returns the resource name of the bundle which is used for localizing the name and description.
 String getName()
          Returns name of the library
 String getType()
          Returns type of library, the LibraryTypeProvider creates libraries of given unique type.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes PropertyChangeListener
 void setContent(String volumeType, List path)
          Sets content of given volume
 void setDescription(String text)
          Sets the description of the library, called by LibrariesStorage while reading the library The description is more detailed information about the library.
 void setLocalizingBundle(String resourceName)
          Sets the localizing bundle.
 void setName(String name)
          Sets the name of the library, called by LibrariesStorage while reading the library
 

Field Detail

PROP_NAME

public static final String PROP_NAME
See Also:
Constant Field Values

PROP_DESCRIPTION

public static final String PROP_DESCRIPTION
See Also:
Constant Field Values

PROP_CONTENT

public static final String PROP_CONTENT
See Also:
Constant Field Values
Method Detail

getType

public String getType()
Returns type of library, the LibraryTypeProvider creates libraries of given unique type.

Returns:
String unique identifier, never returns null.

getName

public String getName()
Returns name of the library

Returns:
String unique name of the library, never returns null.

getDescription

public String getDescription()
Get a description of the library. The description provides more detailed information about the library.

Returns:
String the description or null if the description is not available

getLocalizingBundle

public String getLocalizingBundle()
Returns the resource name of the bundle which is used for localizing the name and description. The bundle is located using the system ClassLoader.

Returns:
String, the resource name of the bundle. If null in case when the name and description is not localized.

getContent

public List getContent(String volumeType)
                throws IllegalArgumentException
Returns List of resources contained in the given volume. The returned list is unmodifiable. To change the content of the given volume use setContent method.

Parameters:
volumeType - the type of volume for which the content should be returned.
Returns:
List <URL> never returns null
Throws:
IllegalArgumentException - if the library does not support given type of volume

setName

public void setName(String name)
Sets the name of the library, called by LibrariesStorage while reading the library

Parameters:
name - - the unique name of the library, can't be null.

setDescription

public void setDescription(String text)
Sets the description of the library, called by LibrariesStorage while reading the library The description is more detailed information about the library.

Parameters:
text - - the description of the library, may be null.

setLocalizingBundle

public void setLocalizingBundle(String resourceName)
Sets the localizing bundle. The bundle is used for localizing the name and description. The bundle is located using the system ClassLoader. Called by LibrariesStorage while reading the library.

Parameters:
resourceName - of the bundle without extension, may be null.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds PropertyChangeListener

Parameters:
l - - the PropertyChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes PropertyChangeListener

Parameters:
l - - - the PropertyChangeListener

setContent

public void setContent(String volumeType,
                       List path)
                throws IllegalArgumentException
Sets content of given volume

Parameters:
volumeType - the type of volume for which the content should be set
path - the List<URL> the list of resoruces
Throws:
IllegalArgumentException - if the library does not support given volumeType

 

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