it.geosolutions.geoserver.rest.manager
Class GeoServerRESTStoreManager

java.lang.Object
  extended by it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager
      extended by it.geosolutions.geoserver.rest.manager.GeoServerRESTStoreManager

public class GeoServerRESTStoreManager
extends GeoServerRESTAbstractManager

Manage stores. To pass connection parameters, use the encoders derived from GSAbstractDatastoreEncoder.

Author:
Carlo Cancellieri - carlo.cancellieri@geo-solutions.it

Field Summary
 
Fields inherited from class it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager
gspass, gsuser, restURL
 
Constructor Summary
GeoServerRESTStoreManager(URL restURL, String username, String password)
          Default constructor.
 
Method Summary
 boolean create(String workspace, GSAbstractStoreEncoder store)
          Create a store.
 boolean remove(String workspace, GSAbstractStoreEncoder store, boolean recurse)
          Remove a given CoverageStore in a given Workspace.
 boolean update(String workspace, GSAbstractStoreEncoder store)
          Update a store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoServerRESTStoreManager

public GeoServerRESTStoreManager(URL restURL,
                                 String username,
                                 String password)
                          throws IllegalArgumentException,
                                 MalformedURLException
Default constructor.

Parameters:
restURL - GeoServer REST API endpoint
username - GeoServer REST API authorized username
password - GeoServer REST API password for the former username
Throws:
MalformedURLException
IllegalArgumentException
Method Detail

create

public boolean create(String workspace,
                      GSAbstractStoreEncoder store)
Create a store.

Parameters:
workspace - Name of the workspace to contain the store. This will also be the prefix of any layer names contained in the store.
datastore - the set of parameters to be set to the store (including connection parameters).
Returns:
true if the store has been successfully created, false otherwise

update

public boolean update(String workspace,
                      GSAbstractStoreEncoder store)
Update a store.

Parameters:
workspace - Name of the workspace that contains the store.
datastore - the set of parameters to be set to the store (including connection parameters).
Returns:
true if the store has been successfully updated, false otherwise

remove

public boolean remove(String workspace,
                      GSAbstractStoreEncoder store,
                      boolean recurse)
               throws IllegalArgumentException,
                      MalformedURLException
Remove a given CoverageStore in a given Workspace.

Parameters:
workspace - The name of the workspace
storename - The name of the CoverageStore to remove.
recurse - if remove should be performed recursively
Returns:
true if the CoverageStore was successfully removed.
Throws:
MalformedURLException
IllegalArgumentException


Copyright © 2007-2013 GeoSolutions. All Rights Reserved.