org.deegree.commons.config
Class AbstractBasicResourceManager
java.lang.Object
org.deegree.commons.config.AbstractBasicResourceManager
- All Implemented Interfaces:
- ResourceManager
- Direct Known Subclasses:
- AbstractResourceManager, BatchedMTStoreManager, ConnectionManager, CRSManager, FunctionManager, ObservationStoreManager, ProxyUtils, RenderableStoreManager, SecurityConfiguration, SQLDialectManager, SQLFunctionManager
public abstract class AbstractBasicResourceManager
- extends Object
- implements ResourceManager
Provides some basic functionality for implementing ResourceManagers.
- Version:
- $Revision: 30338 $, $Date: 2011-04-04 15:00:13 +0200 (Mon, 04 Apr 2011) $
- Author:
- Markus Schneider, last edited by: $Author: mschneider $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workspace
protected DeegreeWorkspace workspace
dir
protected File dir
idToState
protected Map<String,ResourceState> idToState
AbstractBasicResourceManager
public AbstractBasicResourceManager()
init
protected void init(DeegreeWorkspace workspace,
File resourceDir)
getProvider
protected abstract ResourceProvider getProvider(File file)
remove
protected abstract void remove(String id)
getStates
public ResourceState[] getStates()
- Description copied from interface:
ResourceManager
- Returns the state of all resources.
- Specified by:
getStates in interface ResourceManager
- Returns:
- the states, never
null
getState
public ResourceState getState(String id)
- Description copied from interface:
ResourceManager
- Returns the state of the resource.
- Specified by:
getState in interface ResourceManager
- Parameters:
id - resource identifier, must not be null
- Returns:
- the state or
null (if the specified resource does not exist)
createResource
public ResourceState createResource(String id,
InputStream is)
throws IllegalArgumentException
- Description copied from interface:
ResourceManager
- Creates a new
Resource (which is initially in state ResourceState.StateType.deactivated).
- Specified by:
createResource in interface ResourceManager
- Parameters:
id - resource identifier, must not be nullis - provides the configuration file content, must not be null
- Returns:
- resource state after creation (
ResourceState.StateType.deactivated), never null
- Throws:
IllegalArgumentException - if a resource with the specified identifier already exists
deleteResource
public ResourceState deleteResource(String id)
- Description copied from interface:
ResourceManager
- Removes the specified resource and deletes the corresponding configuration file.
- Specified by:
deleteResource in interface ResourceManager
- Parameters:
id - resource identifier, must not be null
- Returns:
- resource state after deletion, usually
null (if not, deletion failed)
Copyright © 2011. All Rights Reserved.