Changeset 6782 in josm for trunk/src


Ignore:
Timestamp:
2014-01-30T00:33:07+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #9635 - remote control: new referrers argument to load_object handler

Location:
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java

    r6536 r6782  
    3535   
    3636    @Override
    37     public String[] getOptionalParams()
    38     {
    39         return new String[] {"new_layer", "addtags"};
     37    public String[] getOptionalParams() {
     38        return new String[] {"new_layer", "addtags", "relation_members", "referrers"};
    4039    }
    4140
     
    4847    public String[] getUsageExamples() {
    4948        return new String[] {"/load_object?new_layer=true&objects=w106159509",
    50             "/load_object?new_layer=true&objects=r2263653&relation_members=true"
     49            "/load_object?new_layer=true&objects=r2263653&relation_members=true",
     50            "/load_object?objects=n100000&referrers=false"
    5151        };
    5252    }
     
    6060            final boolean newLayer = isLoadInNewLayer();
    6161            final boolean relationMembers = Boolean.parseBoolean(args.get("relation_members"));
     62            final boolean referrers = args.containsKey("referrers") ? Boolean.parseBoolean(args.get("referrers")) : true;
    6263            GuiHelper.runInEDTAndWait(new Runnable() {
    6364                @Override public void run() {
    64                     DownloadPrimitiveAction.processItems(newLayer, ps, true, relationMembers);
     65                    DownloadPrimitiveAction.processItems(newLayer, ps, referrers, relationMembers);
    6566                }
    6667            });
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java

    r6536 r6782  
    6060     * @throws RequestHandlerErrorException
    6161     */
    62     public final void handle() throws RequestHandlerForbiddenException, RequestHandlerBadRequestException, RequestHandlerErrorException
    63     {
     62    public final void handle() throws RequestHandlerForbiddenException, RequestHandlerBadRequestException, RequestHandlerErrorException {
    6463        checkMandatoryParams();
    6564        validateRequest();
Note: See TracChangeset for help on using the changeset viewer.