org.gvsig.tools.library
Interface Library

All Known Implementing Classes:
AbstractLibrary, ToolsLibrary, XMLPersistenceLibrary

public interface Library

Library initialization and registration.

Author:
Cèsar Ordiñana

Nested Class Summary
static interface Library.TYPE
          Constant definitions for library types.
 
Method Summary
 void doRegistration()
           
 Class getLibrary()
          Returns the Library class this library is related to.
 int getPriority()
          Returns a priority number to range this implementation in case multiple ones are within the libraries initialization.
 Set getRequireds()
          Returns a Set of required libraries and their types.
 String getType()
          Returns the type of the Library.
 void initialize()
          Performs all the initializations of the library, only related to himself: register implementation classes through the Locator, start services, etc.
 boolean isRequired(Class libClass)
          Returns if a given library class is required.
 boolean isRequired(Library lib)
          Returns if a given library is required.
 void postInitialize()
          Performs all the initializations or validations related to the library dependencies, as getting references to objects through other libraries Locators.
 

Method Detail

initialize

void initialize()
                throws LibraryException
Performs all the initializations of the library, only related to himself: register implementation classes through the Locator, start services, etc.

Throws:
LibraryException - if there is an error while performing the initialization of the library

postInitialize

void postInitialize()
                    throws LibraryException
Performs all the initializations or validations related to the library dependencies, as getting references to objects through other libraries Locators.

Throws:
LibraryException - if there is an error while loading an implementation of the library

getLibrary

Class getLibrary()
Returns the Library class this library is related to.

Returns:
the Library class this library is related to

getType

String getType()
Returns the type of the Library.

Returns:
See Also:
TYPE.

getRequireds

Set getRequireds()
Returns a Set of required libraries and their types.

Returns:
a Set of required libraries

isRequired

boolean isRequired(Library lib)
Returns if a given library is required.

Parameters:
lib - the library to check if it is required
Returns:
if is required

isRequired

boolean isRequired(Class libClass)
Returns if a given library class is required.

Parameters:
libClass - the library Class to check if it is required
Returns:
if is required

getPriority

int getPriority()
Returns a priority number to range this implementation in case multiple ones are within the libraries initialization.

Returns:
a priority number, 0 by default.

doRegistration

void doRegistration()


Copyright © 2004-2011 gvSIG. All Rights Reserved.