public interface EditingService extends Service, Observable
EditingManager#getEditingService(String, org.gvsig.fmap.dal.feature.FeatureStore)
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIVATE_NOTIFICATION |
static java.lang.String |
FINISH_AND_STORE_NOTIFICATION |
static java.lang.String |
FINISH_NOTIFICATION |
static java.lang.String |
NEXT_NOTIFICATION |
static java.lang.String |
PARAMETER_CHANGED1_NOTIFICATION |
static java.lang.String |
PARAMETER_CHANGED2_NOTIFICATION |
static java.lang.String |
RESTART_NOTIFICATION |
static java.lang.String |
START_NOTIFICATION |
static java.lang.String |
STOP_NOTIFICATION |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate service
|
Geometry |
finish()
Finalizes service.
|
void |
finishAndStore()
Finalizes service and stores the result to
FeatureStore of this
service. |
EditableFeature |
getDefaultFeatureValues() |
java.lang.String |
getDescription() |
DrawingStatus |
getDrawingStatus(Point mousePosition)
Gets state of drawing.
|
IVectorLegend |
getLegend() |
java.lang.String |
getName()
Gets service name.
|
java.util.List<EditingServiceParameter> |
getParameters()
Gets a
List with all parameters of service. |
FeatureStore |
getStore() |
java.lang.Object |
getValue(EditingServiceParameter parameter)
Return the parameter's value
|
java.lang.Object |
getValue(EditingServiceParameter parameter,
EditingServiceParameter.TYPE type) |
boolean |
isEnabled(EditingServiceParameter parameter)
Return true if the parameter is enabled
|
boolean |
mustRestartAtFinish() |
EditingServiceParameter |
next()
Gets next parameter needed by service.
|
void |
restart() |
void |
setDefaultFeatureValues(EditableFeature feature) |
void |
setShowPreviewSymbol(boolean showPreviewSymbol) |
void |
setValue(EditingServiceParameter parameter,
java.lang.Object value)
Sets value into a paremeter of the service.The value will be put in the parameter of this service.
|
void |
setValue(java.lang.Object value)
Sets value to service.
|
void |
start()
Starts service.
|
void |
stop()
Stops service.
|
getManager
addObserver, deleteObserver, deleteObservers
static final java.lang.String PARAMETER_CHANGED2_NOTIFICATION
static final java.lang.String ACTIVATE_NOTIFICATION
static final java.lang.String NEXT_NOTIFICATION
static final java.lang.String PARAMETER_CHANGED1_NOTIFICATION
static final java.lang.String STOP_NOTIFICATION
static final java.lang.String FINISH_AND_STORE_NOTIFICATION
static final java.lang.String FINISH_NOTIFICATION
static final java.lang.String START_NOTIFICATION
static final java.lang.String RESTART_NOTIFICATION
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.java.util.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(java.lang.Object value) throws InvalidEntryException
value
- Object to be set to next EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.void setValue(EditingServiceParameter parameter, java.lang.Object value) throws InvalidEntryException
parameter
- EditingServiceParameter
value
- Object to be set to EditingServiceParameter
InvalidEntryException
- If the next parameter needed does not accept this value.boolean isEnabled(EditingServiceParameter parameter)
parameter
- 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 validjava.lang.String getName()
void activate()
java.lang.Object getValue(EditingServiceParameter parameter)
parameter
- java.lang.Object getValue(EditingServiceParameter parameter, EditingServiceParameter.TYPE type)
void setDefaultFeatureValues(EditableFeature feature)
EditableFeature getDefaultFeatureValues()
FeatureStore getStore()
IVectorLegend getLegend()
java.lang.String getDescription()
void setShowPreviewSymbol(boolean showPreviewSymbol)
void restart() throws StartServiceException, InvalidEntryException, StopServiceException
boolean mustRestartAtFinish()