public class AddWayHandler extends RequestHandler
/add_way?way=lat1,lon2;lat2,lon2.RequestHandler.RequestHandlerBadRequestException, RequestHandler.RequestHandlerErrorException, RequestHandler.RequestHandlerException, RequestHandler.RequestHandlerForbiddenException| Modifier and Type | Field and Description |
|---|---|
(package private) Map<LatLon,Node> |
addedNodes
The place to remeber already added nodes (they are reused if needed @since 5845
|
private List<LatLon> |
allCoordinates |
static String |
command
The remote control command name used to add a way.
|
args, content, contentType, globalConfirmationDefault, globalConfirmationKey, loadInNewLayerDefault, loadInNewLayerKey, myCommand, request, sender| Constructor and Description |
|---|
AddWayHandler() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addWay() |
(package private) Node |
findOrCreateNode(LatLon ll,
List<Command> commands)
Find the node with almost the same ccords in dataset or in already added nodes
|
String[] |
getMandatoryParams() |
String[] |
getOptionalParams() |
String |
getPermissionMessage()
Get a specific message to ask the user for permission for the operation
requested via remote control.
|
PermissionPrefWithDefault |
getPermissionPref()
Get a PermissionPref object containing the name of a special permission
preference to individually allow the requested operation and an error
message to be displayed when a disabled operation is requested.
|
String[] |
getUsageExamples() |
protected void |
handleRequest()
Handle a specific command sent as remote control.
|
protected void |
validateRequest()
Validates the request before attempting to perform it.
|
checkMandatoryParams, checkPermission, decodeParam, getContent, getContentType, getUsageExamples, handle, isLoadInNewLayer, parseArgs, setCommand, setSender, setUrlpublic static final String command
private final List<LatLon> allCoordinates
Map<LatLon,Node> addedNodes
public AddWayHandler()
public String[] getMandatoryParams()
getMandatoryParams in class RequestHandlerpublic String[] getOptionalParams()
getOptionalParams in class RequestHandlerpublic String[] getUsageExamples()
getUsageExamples in class RequestHandlerprotected void handleRequest() throws RequestHandler.RequestHandlerErrorException, RequestHandler.RequestHandlerBadRequestException
RequestHandlerhandleRequest in class RequestHandlerRequestHandler.RequestHandlerErrorExceptionRequestHandler.RequestHandlerBadRequestExceptionpublic String getPermissionMessage()
RequestHandlergetPermissionMessage in class RequestHandlerpublic PermissionPrefWithDefault getPermissionPref()
RequestHandlergetPermissionPref in class RequestHandlerprotected void validateRequest() throws RequestHandler.RequestHandlerBadRequestException
RequestHandlervalidateRequest in class RequestHandlerRequestHandler.RequestHandlerBadRequestExceptionNode findOrCreateNode(LatLon ll, List<Command> commands)
private void addWay()