Class GeoserverWorkspace


  • public class GeoserverWorkspace
    extends Object
    • Method Detail

      • createWorkspace

        public void createWorkspace()
                             throws IOException
        Creates a workspace by creating a namespace which auto-creates a bare workspace.
        Parameters:
        workspaceName -
        Throws:
        Exception
        IOException
      • createNamespace

        public void createNamespace​(String namespace)
                             throws IOException
        Create a new namespace. This will automatically create a workspace too.
        Parameters:
        namespace -
        nsUri -
        Throws:
        Exception
        IOException
      • setTransactional

        public void setTransactional​(boolean transactional,
                                     String workspace)
                              throws IOException
        Change transaction operation enabled in wfs settings. Can be BASIC := read access, TRANSACTIONAL := write access, COMPLETE := read+write access Workspace must be enabled to do this!
        Parameters:
        transactional -
        Throws:
        IOException
      • getDatasources

        public List<String> getDatasources​(String workspace)
                                    throws IOException
        Returns all datasource names, that exist on this workspace
        Parameters:
        geoserverRestUrl -
        workspace -
        Returns:
        Throws:
        Exception
        IOException
      • getWorkspaceFeatureTypes

        public List<GeoserverFeatureType> getWorkspaceFeatureTypes​(String workspace,
                                                                   boolean includeDiffLayers)
                                                            throws IOException
        Retrieves all feature types/ layers per workspace.
        Parameters:
        workspace -
        Returns:
        list of feature types on this workspace
        Throws:
        IOException
      • createWFSService

        public void createWFSService()
                              throws IOException
        Creates a WFS service which is disabled by default.
        Parameters:
        workspace -
        Throws:
        IOException
      • main

        public static void main​(String[] args)
                         throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException