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()
ServiceManager which manages this server.getManager in interface ServiceManagerpublic DrawingStatus getDrawingStatus(Point mousePosition) throws DrawServiceException
EditingServiceDrawingStatus. 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 EditingServicemousePosition - 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()
EditingServiceList with all parameters of service. Each parameter
has name, description and types. See EditingServiceParameter.getParameters in interface EditingServiceEditingServiceParameter objects.public EditingServiceParameter next()
EditingServicenull if all
parameters have values.next in interface EditingServiceEditingServiceParameter object that represents the
next parameter.public void setValue(Object value) throws InvalidEntryException
EditingServicesetValue in interface EditingServicevalue - Object to be set to next EditingServiceParameterInvalidEntryException - If the next parameter needed does not accept this value.public void stop()
throws StopServiceException
EditingServicestop in interface EditingServiceStopServiceException - Stops service initializing necessary parameters of service.
This method is called when user cancels service.public void finishAndStore()
throws FinishServiceException
EditingServiceFeatureStore of this
service. Use this method to store the result of this service. Make sure
that service has all required values.finishAndStore in interface EditingServiceFinishServiceException - if there are some error getting values,
creating geometries or inserting/updating/removing geometries
from feature store.public Geometry finish() throws FinishServiceException
EditingServiceFeatureStore. Make sure that service has all required
values.finish in interface EditingServiceFinishServiceException - if there are some error getting values,
creating geometries.public void start()
throws StartServiceException,
InvalidEntryException
EditingServicestart in interface EditingServiceStartServiceException - if there are some error starting service.InvalidEntryException - if the entry of provider is not validpublic String getName()
EditingServicegetName in interface EditingService