org.geotoolkit.coverage.sql
Interface CoverageDatabaseListener

All Superinterfaces:
EventListener

public interface CoverageDatabaseListener
extends EventListener

A listener notified when a Layer or a Grid Coverage Reference is about to be added or removed. Whatever the listener is invoked before or after the change, and whatever the change is a add or remove operation, is described by the CoverageDatabaseEvent argument.

It is possible for this listener to be also a controller. In such cases, when a coverage is about to be added in a layer, implementations can modify the values to be added.

Listeners can veto the change when they are invoked before the change.

Since:
3.12
Version:
3.15
Author:
Martin Desruisseaux (Geomatys)
See Also:
CoverageDatabase.addListener(CoverageDatabaseListener), CoverageDatabase.removeListener(CoverageDatabaseListener)
Module:
coverage/geotk-coverage-sql (download)    View source code for this class

Method Summary
 void coverageAdding(CoverageDatabaseEvent event, NewGridCoverageReference reference)
          Invoked before or after a Grid Coverage Reference is added.
 void layerListChange(CoverageDatabaseEvent event, String name)
          Invoked before or after a Layer is added or removed.
 

Method Detail

layerListChange

void layerListChange(CoverageDatabaseEvent event,
                     String name)
                     throws DatabaseVetoException
Invoked before or after a Layer is added or removed. Implementations can veto the change if this method is invoked before the change.

Parameters:
event - The kind of event.
name - The name of the layer.
Throws:
DatabaseVetoException - if the recipient vetos against the change. This exception will be logged at the WARNING level and otherwise ignored if it is thrown after the change.

coverageAdding

void coverageAdding(CoverageDatabaseEvent event,
                    NewGridCoverageReference reference)
                    throws DatabaseVetoException
Invoked before or after a Grid Coverage Reference is added. Implementations can veto the change if this method is invoked before the change.

Implementations can modify in-place the field values of the reference argument. The changes will be honored if they are applied before the new entry is added to the database, and ignored if the changes are applied after.

Parameters:
event - The kind of event.
reference - Information about the coverage reference to be added.
Throws:
DatabaseVetoException - if the recipient vetos against the change. This exception will be logged at the WARNING level and otherwise ignored if it is thrown after the change.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.