Class EditUtil

java.lang.Object
org.tailormap.api.util.EditUtil

@Component public class EditUtil extends Object
  • Constructor Details

  • Method Details

    • checkEditAuthorisation

      public void checkEditAuthorisation() throws org.springframework.web.server.ResponseStatusException
      Check if the current user is authenticated, throws exception if not. As we do not have editing authorisation any known, authenticated user can edit.
      Throws:
      org.springframework.web.server.ResponseStatusException
    • getEditableFeatureType

      public TMFeatureType getEditableFeatureType(Application application, AppTreeLayerNode appTreeLayerNode, GeoService service, GeoServiceLayer layer) throws org.springframework.web.server.ResponseStatusException
      Get editable feature type, throws exception if not found or not editable. Will throw a ResponseStatusException if the layer does not have an editable featuretype.
      Parameters:
      application - the application that has the editable layer
      appTreeLayerNode - the layer to edit
      service - the service that has the layer
      layer - the layer to edit
      Returns:
      the editable feature type
      Throws:
      org.springframework.web.server.ResponseStatusException