Class GeoServerRESTStoreManager
- java.lang.Object
-
- it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager
-
- it.geosolutions.geoserver.rest.manager.GeoServerRESTStoreManager
-
public class GeoServerRESTStoreManager extends GeoServerRESTAbstractManager
Manage stores. To pass connection parameters, use the encoders derived fromGSAbstractDatastoreEncoder.- Version:
- $Id: $
- Author:
- Carlo Cancellieri - carlo.cancellieri@geo-solutions.it
-
-
Field Summary
-
Fields inherited from class it.geosolutions.geoserver.rest.manager.GeoServerRESTAbstractManager
gsBaseUrl, gspass, gsuser
-
-
Constructor Summary
Constructors Constructor Description GeoServerRESTStoreManager(java.net.URL restURL, java.lang.String username, java.lang.String password)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancreate(java.lang.String workspace, GSAbstractStoreEncoder store)Create a store.booleanremove(java.lang.String workspace, GSAbstractStoreEncoder store, boolean recurse)Remove a given CoverageStore in a given Workspace.booleanupdate(java.lang.String workspace, GSAbstractStoreEncoder store)Update a store.booleanupdate(java.lang.String workspace, java.lang.String storeName, GSAbstractStoreEncoder store)Update a store.
-
-
-
Constructor Detail
-
GeoServerRESTStoreManager
public GeoServerRESTStoreManager(java.net.URL restURL, java.lang.String username, java.lang.String password) throws java.lang.IllegalArgumentExceptionDefault constructor.- Parameters:
restURL- GeoServer REST API endpointusername- GeoServer REST API authorized usernamepassword- GeoServer REST API password for the former username- Throws:
java.lang.IllegalArgumentException- if any.
-
-
Method Detail
-
create
public boolean create(java.lang.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.store- 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(java.lang.String workspace, GSAbstractStoreEncoder store)Update a store.- Parameters:
workspace- Name of the workspace that contains the store.store- the set of parameters to be set to the store (including connection parameters).- Returns:
- true if the store has been successfully updated, false otherwise
-
update
public boolean update(java.lang.String workspace, java.lang.String storeName, GSAbstractStoreEncoder store)Update a store.- Parameters:
workspace- Name of the workspace that contains the store.store- the set of parameters to be set to the store (including connection parameters).storeName- aStringobject.- Returns:
- true if the store has been successfully updated, false otherwise
-
remove
public boolean remove(java.lang.String workspace, GSAbstractStoreEncoder store, boolean recurse) throws java.lang.IllegalArgumentExceptionRemove a given CoverageStore in a given Workspace.- Parameters:
workspace- The name of the workspacestore- the set of parameters of the storerecurse- if remove should be performed recursively- Returns:
- true if the CoverageStore was successfully removed.
- Throws:
java.lang.IllegalArgumentException- if any.
-
-