Class GeoServerRESTStoreManager

    • Constructor Detail

      • GeoServerRESTStoreManager

        public GeoServerRESTStoreManager​(java.net.URL restURL,
                                         java.lang.String username,
                                         java.lang.String password)
                                  throws java.lang.IllegalArgumentException
        Default constructor.
        Parameters:
        restURL - GeoServer REST API endpoint
        username - GeoServer REST API authorized username
        password - 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 - a String object.
        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.IllegalArgumentException
        Remove a given CoverageStore in a given Workspace.
        Parameters:
        workspace - The name of the workspace
        store - the set of parameters of the store
        recurse - if remove should be performed recursively
        Returns:
        true if the CoverageStore was successfully removed.
        Throws:
        java.lang.IllegalArgumentException - if any.