public class DefaultEditingService extends Object implements EditingService
Constructor and Description |
---|
DefaultEditingService(EditingProvider provider) |
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.
|
Manager |
getManager()
Returns a reference to the
Manager which manages this server. |
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.
|
public DefaultEditingService(EditingProvider provider)
public Manager getManager()
Service
Manager
which manages this server.getManager
in interface Service
Manager
public DrawingStatus getDrawingStatus(Point mousePosition) throws DrawServiceException
EditingService
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.getDrawingStatus
in interface EditingService
mousePosition
- Mouse position to draw geometries.DrawingStatus
object with a list of geometries and
information.DrawServiceException
- if there are some error creating geometries.public List<EditingServiceParameter> getParameters()
EditingService
List
with all parameters of service. Each parameter
has name, description and types. See EditingServiceParameter
.getParameters
in interface EditingService
EditingServiceParameter
objects.public EditingServiceParameter next()
EditingService
null
if all
parameters have values.next
in interface EditingService
EditingServiceParameter
object that represents the
next parameter.public void setValue(Object value) throws InvalidEntryException
EditingService
setValue
in interface EditingService
value
- Object to be set to next EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.public void stop() throws StopServiceException
EditingService
stop
in interface EditingService
StopServiceException
- Stops service initializing necessary parameters of service.
This method is called when user cancels service.public void finishAndStore() throws FinishServiceException
EditingService
FeatureStore
of this
service. Use this method to store the result of this service. Make sure
that service has all required values.finishAndStore
in interface EditingService
FinishServiceException
- if there are some error getting values,
creating geometries or inserting/updating/removing geometries
from feature store.public Geometry finish() throws FinishServiceException
EditingService
FeatureStore
. Make sure that service has all required
values.finish
in interface EditingService
FinishServiceException
- if there are some error getting values,
creating geometries.public void start() throws StartServiceException, InvalidEntryException
EditingService
start
in interface EditingService
StartServiceException
- if there are some error starting service.InvalidEntryException
- if the entry of provider is not validpublic String getName()
EditingService
getName
in interface EditingService