public interface ArealLibraryProvider<A extends LibraryStorageArea,L extends LibraryImplementation2>
LibraryImplementation should do this.| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_OPEN_AREAS
Property to fire when
getOpenAreas() might have changed. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener to
PROP_OPEN_AREAS. |
Class<A> |
areaType()
Gets the runtime type of the area used by this provider.
|
A |
createArea()
Creates or otherwise picks a storage area interactively.
|
L |
createLibrary(String type,
String name,
A area,
Map<String,List<URI>> contents)
Creates a new library.
|
LibraryProvider<L> |
getLibraries(A area)
Gets all libraries defined in a given area.
|
Set<A> |
getOpenAreas()
Looks for areas which should be somehow listed as open.
|
Class<L> |
libraryType()
Gets the runtime type of the libraries created by this provider.
|
A |
loadArea(URL location)
Loads a storage area (which may or may exist yet).
|
void |
remove(L library)
Deletes an existing library.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener to
PROP_OPEN_AREAS. |
static final String PROP_OPEN_AREAS
getOpenAreas() might have changed.void addPropertyChangeListener(PropertyChangeListener listener)
PROP_OPEN_AREAS.listener - a listener to addvoid removePropertyChangeListener(PropertyChangeListener listener)
PROP_OPEN_AREAS.listener - a listener to removeClass<A> areaType()
Class<L> libraryType()
A createArea()
A loadArea(URL location)
location - an abstract storage location which may or may not be recognized by this providerLibraryStorageArea.getLocation() matches the provided location,
or null if this type of location is not recognized by this providerSet<A> getOpenAreas()
createArea().LibraryProvider<L> getLibraries(A area)
LibraryImplementation.getName(),
though it is permitted for libraries from different areas to have the same name.
Changes in the set of libraries defined in this area should be fired through LibraryProvider.PROP_LIBRARIES.
Since IOException is not thrown either from this method or from LibraryProvider.getLibraries(),
it is expected that any problems loading library definitions will be logged and that those libraries will be skipped.area - some storage area (which might not even exist yet, in which case the set of libraries will initially be empty)L createLibrary(String type, String name, A area, Map<String,List<URI>> contents) throws IOException
type - the kind of library to make, as in LibraryTypeProvider.getLibraryType() or LibraryImplementation.getType()name - the library name, as in LibraryImplementation.getName()area - the location to define the librarycontents - initial volume contents (keys must be contained in the appropriate LibraryTypeProvider.getSupportedVolumeTypes())IOException - if an error occurs creating the library definitionvoid remove(L library) throws IOException
library - a library produced by this providerIOException - if a problem can encountered deleting the library definitionBuilt on March 10 2014. | Portions Copyright 1997-2014 Oracle. All rights reserved.