Skip to contents

Geoserver REST API Workspace Manager

Geoserver REST API Workspace Manager

Format

R6Class object.

Value

Object of R6Class with methods for managing the workspaces of a GeoServer instance.

Author

Emmanuel Blondel <emmanuel.blondel1@gmail.com>

Super class

geosapi::GSManager -> GSWorkspaceManager

Methods

Inherited methods


Method getWorkspaces()

Get the list of available workspace. Returns an object of class list containing items of class GSWorkspace

Usage

GSWorkspaceManager$getWorkspaces()

Arguments

a

list of GSWorkspace


Method getWorkspaceNames()

Get the list of available workspace names. Returns an vector of class character

Usage

GSWorkspaceManager$getWorkspaceNames()

Returns

a list of workspace names


Method getWorkspace()

Get a GSWorkspace object given a workspace name.

Usage

GSWorkspaceManager$getWorkspace(ws)

Arguments

ws

workspace name

Returns

an object of class GSWorkspace


Method createWorkspace()

Creates a GeoServer workspace given a name, and an optional URI. If the URI is not specified, GeoServer will automatically create an associated Namespace with the URI built from the workspace name. If the URI is specified, the method invokes the method createNamespace(ns, uri) of the GSNamespaceManager. Returns TRUE if the workspace has been successfully created, FALSE otherwise

Usage

GSWorkspaceManager$createWorkspace(name, uri)

Arguments

name

name

uri

uri

Returns

TRUE if created, FALSE otherwise


Method updateWorkspace()

Updates a GeoServer workspace given a name, and an optional URI. If the URI is not specified, GeoServer will automatically update the associated Namespace with the URI built from the workspace name. If the URI is specified, the method invokes the method updateNamespace(ns, uri) of the GSNamespaceManager. Returns TRUE if the workspace has been successfully updated, FALSE otherwise

Usage

GSWorkspaceManager$updateWorkspace(name, uri)

Arguments

name

name

uri

uri

Returns

TRUE if created, FALSE otherwise


Method deleteWorkspace()

Deletes a GeoServer workspace given a name.

Usage

GSWorkspaceManager$deleteWorkspace(name, recurse = FALSE)

Arguments

name

name

recurse

recurse

Returns

TRUE if the workspace has been successfully deleted, FALSE otherwise


Method getWorkspaceSettings()

Updates workspace settings

Usage

GSWorkspaceManager$getWorkspaceSettings(ws)

Arguments

ws

workspace name

Returns

an object of class GSWorkspaceSettings


Method createWorkspaceSettings()

Creates workspace settings

Usage

GSWorkspaceManager$createWorkspaceSettings(ws, workspaceSettings)

Arguments

ws

workspace name

workspaceSettings

object of class GSWorkspaceSettings

Returns

TRUE if created, FALSE otherwise


Method updateWorkspaceSettings()

Updates workspace settings

Usage

GSWorkspaceManager$updateWorkspaceSettings(ws, workspaceSettings)

Arguments

ws

workspace name

workspaceSettings

object of class GSWorkspaceSettings

Returns

TRUE if updated, FALSE otherwise


Method deleteWorkspaceSettings()

Deletes workspace settings

Usage

GSWorkspaceManager$deleteWorkspaceSettings(ws)

Arguments

ws

workspace name

Returns

TRUE if deleted, FALSE otherwise


Method clone()

The objects of this class are cloneable with this method.

Usage

GSWorkspaceManager$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# \dontrun{
   GSWorkspaceManager$new("http://localhost:8080/geoserver", "admin", "geoserver")
#> Error in curl::curl_fetch_memory(url, handle = handle): Failed to connect to localhost port 8080 after 0 ms: Connection refused
# }