Interface EditingProvider

All Superinterfaces:
org.gvsig.tools.service.spi.Provider
All Known Implementing Classes:
AbstractEditingProvider

public interface EditingProvider extends org.gvsig.tools.service.spi.Provider
EditingProvider provides functionalities to services.
Version:
$Id$
Author:
gvSIG team.
  • Method Details

    • next

      Gets next parameter needed by provider. The parameter has information about its name, description and types. Returns null if all parameters have values.
      Returns:
      An EditingServiceParameter object that represents the next parameter.
    • getDrawingStatus

      DrawingStatus getDrawingStatus(org.gvsig.fmap.geom.primitive.Point mousePosition) throws DrawServiceException
      Gets state of drawing. If this provider has sufficient values with mouse position to create geometries returns a DrawingStatus. List of geometries of drawing status object can be different from final geometries. Use this method to get a draft status information while user is drawing.
      Parameters:
      mousePosition - Mouse position to draw geometries.
      Returns:
      A DrawingStatus object with a list of geometries and information.
      Throws:
      DrawServiceException - if there are some error creating geometries.
    • stop

      void stop() throws StopServiceException
      Stops provider. Use this method to stop and clean values of provider.
      Throws:
      StopServiceException - Stops provider initializing necessary parameters of provider. This method is called when user cancels provider.
    • getParameters

      List<EditingServiceParameter> getParameters()
      Gets a List with all parameters of provider. Each parameter has name, description and types. See EditingServiceParameter.
      Returns:
      A list of EditingServiceParameter objects.
    • setValue

      void setValue(Object value) throws InvalidEntryException
      Sets value to provider. The value will be put in the next parameter need by this provider.
      Parameters:
      value - Object to be set to next EditingServiceParameter
      Throws:
      InvalidEntryException - If the next parameter needed does not accept this value.
    • setValue

      void setValue(EditingServiceParameter parameter, Object value) throws InvalidEntryException
      Sets value into a paremeter of the provider.The value will be put in the parameter of this provider.
      Parameters:
      parameter - EditingServiceParameter
      value - Object to be set to EditingServiceParameter
      Throws:
      InvalidEntryException - If the next parameter needed does not accept this value.
    • isEnabled

      boolean isEnabled(EditingServiceParameter parameter)
      Return true if the parameter is enabled
      Parameters:
      parameter -
      Returns:
    • finish

      org.gvsig.fmap.geom.Geometry finish() throws FinishServiceException
      Finalizes provider. Use this method to get the result of provider without store it to FeatureStore. Make sure that provider has all required values.
      Returns:
      Geometry created or modified from added values.
      Throws:
      FinishServiceException - if there are some error getting values, creating geometries.
    • finishAndStore

      void finishAndStore() throws FinishServiceException
      Finalizes provider and stores the result to FeatureStore of this provider. Use this method to store the result of this service. Make sure that service has all required values.
      Throws:
      FinishServiceException - if there are some error getting values, creating geometries or inserting/updating/removing geometries from feature store.
    • start

      Starts provider. Use this method before add values.
      Throws:
      StartServiceException - if there are some error starting service.
      InvalidEntryException - if the entry of provider is not valid
    • getName

      String getName()
      Gets provider name.
      Returns:
      Name of provider.
    • activate

      void activate()
      Activete the provider
    • getValue

      Object getValue(EditingServiceParameter parameter)
      Return parameter's value
      Parameters:
      parameter -
      Returns:
    • getValue

      Return parameter's value of type
      Parameters:
      parameter -
      type -
      Returns:
    • setDefaultFeatureValues

      void setDefaultFeatureValues(org.gvsig.fmap.dal.feature.EditableFeature feature)
    • getDefaultFeatureValues

      org.gvsig.fmap.dal.feature.EditableFeature getDefaultFeatureValues()
    • setShowPreviewSymbol

      void setShowPreviewSymbol(boolean showPreviewSymbol)
    • isShowPreviewSymbol

      boolean isShowPreviewSymbol()
    • restart

      Restarts provider.
      Throws:
      StartServiceException - if there are some error starting service.
      InvalidEntryException - if the entry of provider is not valid
      StopServiceException
    • initDefaultValues

      void initDefaultValues()
    • mustRestartAtFinish

      boolean mustRestartAtFinish()