Package nl.knaw.dans.layerstore
Interface LayerManager
- All Known Implementing Classes:
LayerManagerImpl
public interface LayerManager
Manages
Layers. Implementations of this interface should create new layers only through the `newTopLayer` method.-
Method Summary
Modifier and TypeMethodDescriptionvoidRequest for the archiving of the given layer.getLayer(long id) Returns the layer with the given id.Returns the current top layer.Lists all layer IDs that are currently managed.Closes the current top layer (if present) and creates a new top layer.
-
Method Details
-
newTopLayer
Closes the current top layer (if present) and creates a new top layer. The old top layer will be scheduled for archiving.- Throws:
IOException
-
getTopLayer
Layer getTopLayer()Returns the current top layer.- Returns:
- the current top layer
-
getLayer
Returns the layer with the given id.- Parameters:
id- the id of the layer- Returns:
- the layer
-
archive
Request for the archiving of the given layer. The operation may be performed asynchronously, so the caller should check the layer's status to determine when the archiving is complete.- Parameters:
layer- the layer to archive
-
listLayerIds
Lists all layer IDs that are currently managed.- Returns:
- a list of layer IDs
- Throws:
IOException- if an I/O error occurs
-