public interface EditingService extends Service
This service is used to interact with Editing providers. Each instance of
this has linked an Editing provider. At this moment services delegate all
functionality to providers. To get an instance of this use
EditingManager#getEditingService(String, org.gvsig.fmap.dal.feature.FeatureStore)
Modifier and Type | Method and Description |
---|---|
Geometry |
finish()
Finalizes service.
|
void |
finishAndStore()
Finalizes service and stores the result to
FeatureStore of this
service. |
DrawingStatus |
getDrawingStatus(Point mousePosition)
Gets state of drawing.
|
String |
getName()
Gets service name.
|
List<EditingServiceParameter> |
getParameters()
Gets a
List with all parameters of service. |
EditingServiceParameter |
next()
Gets next parameter needed by service.
|
void |
setValue(Object value)
Sets value to service.
|
void |
start()
Starts service.
|
void |
stop()
Stops service.
|
getManager
DrawingStatus getDrawingStatus(Point mousePosition) throws DrawServiceException
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.mousePosition
- Mouse position to draw geometries.DrawingStatus
object with a list of geometries and
information.DrawServiceException
- if there are some error creating geometries.List<EditingServiceParameter> getParameters()
List
with all parameters of service. Each parameter
has name, description and types. See EditingServiceParameter
.EditingServiceParameter
objects.EditingServiceParameter next()
null
if all
parameters have values.EditingServiceParameter
object that represents the
next parameter.void setValue(Object value) throws InvalidEntryException
value
- Object to be set to next EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.void stop() throws StopServiceException
StopServiceException
- Stops service initializing necessary parameters of service.
This method is called when user cancels service.Geometry finish() throws FinishServiceException
FeatureStore
. Make sure that service has all required
values.FinishServiceException
- if there are some error getting values,
creating geometries.void finishAndStore() throws FinishServiceException
FeatureStore
of this
service. Use this method to store the result of this service. Make sure
that service has all required values.FinishServiceException
- if there are some error getting values,
creating geometries or inserting/updating/removing geometries
from feature store.void start() throws StartServiceException, InvalidEntryException
StartServiceException
- if there are some error starting service.InvalidEntryException
- if the entry of provider is not validString getName()