public class LoadAndZoomHandler extends RequestHandler
load_and_zoom and zoom requests.RequestHandler.PermissionCache, RequestHandler.RawURLParseRequestHandler, RequestHandler.RequestHandlerBadRequestException, RequestHandler.RequestHandlerErrorException, RequestHandler.RequestHandlerException, RequestHandler.RequestHandlerForbiddenException| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
command
The remote control command name used to load data and zoom.
|
static java.lang.String |
command2
The remote control command name used to zoom.
|
private static java.lang.String |
CURRENT_SELECTION |
private boolean |
isKeepingCurrentSelection |
private double |
maxlat |
private double |
maxlon |
private double |
minlat |
private double |
minlon |
private java.util.Set<SimplePrimitiveId> |
toSelect |
args, content, contentType, globalConfirmationDefault, globalConfirmationKey, loadInNewLayerDefault, loadInNewLayerKey, myCommand, PERMISSIONS, request, sender, SPLITTER_COMMA, SPLITTER_SEMIC| Constructor and Description |
|---|
LoadAndZoomHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getMandatoryParams() |
java.lang.String[] |
getOptionalParams() |
java.lang.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.
|
java.lang.String |
getUsage() |
java.lang.String[] |
getUsageExamples() |
java.lang.String[] |
getUsageExamples(java.lang.String cmd)
Returns usage examples for the given command.
|
protected void |
handleRequest()
Handle a specific command sent as remote control.
|
protected void |
validateRequest()
Validates the request before attempting to perform it.
|
protected void |
zoom(java.util.Collection<OsmPrimitive> primitives,
Bounds bbox) |
checkMandatoryParams, checkPermission, getContent, getContentType, getDownloadParams, getRequestParameter, handle, parseArgs, setCommand, setSender, setUrl, splitArg, validateDownloadParamspublic static final java.lang.String command
public static final java.lang.String command2
private static final java.lang.String CURRENT_SELECTION
private double minlat
private double maxlat
private double minlon
private double maxlon
private final java.util.Set<SimplePrimitiveId> toSelect
private boolean isKeepingCurrentSelection
public LoadAndZoomHandler()
public java.lang.String getPermissionMessage()
RequestHandlergetPermissionMessage in class RequestHandlerpublic java.lang.String[] getMandatoryParams()
getMandatoryParams in class RequestHandlerpublic java.lang.String[] getOptionalParams()
getOptionalParams in class RequestHandlerpublic java.lang.String getUsage()
getUsage in class RequestHandlerpublic java.lang.String[] getUsageExamples()
getUsageExamples in class RequestHandlerpublic java.lang.String[] getUsageExamples(java.lang.String cmd)
RequestHandlergetUsageExamples in class RequestHandlercmd - The command askedprotected void handleRequest() throws RequestHandler.RequestHandlerErrorException
RequestHandlerhandleRequest in class RequestHandlerRequestHandler.RequestHandlerErrorException - if an error occurs while processing requestprotected void zoom(java.util.Collection<OsmPrimitive> primitives, Bounds bbox)
public PermissionPrefWithDefault getPermissionPref()
RequestHandlergetPermissionPref in class RequestHandlerprotected void validateRequest() throws RequestHandler.RequestHandlerBadRequestException
RequestHandlervalidateRequest in class RequestHandlerRequestHandler.RequestHandlerBadRequestException - if request is invalid