Package org.geomajas.command.dto

Examples of org.geomajas.command.dto.PersistTransactionResponse


    PersistTransactionRequest request = new PersistTransactionRequest();
    request.setCrs(CRS);
    FeatureTransaction featureTransaction = new FeatureTransaction();
    featureTransaction.setLayerId(LAYER_ID);
    request.setFeatureTransaction(featureTransaction);
    PersistTransactionResponse response = (PersistTransactionResponse) dispatcher.execute(
        PersistTransactionRequest.COMMAND, request, null, "en");
    if (response.isError()) {
      response.getErrors().get(0).printStackTrace();
    }
    Assert.assertFalse(response.isError());
    Assert.assertNotNull(response.getFeatureTransaction());
  }
View Full Code Here


    Geometry circle =
        dtoConverter.toDto(geoService.createCircle(factory.createPoint(new Coordinate(0, 0)), 10, 10));
    feature.setGeometry(circle);
    featureTransaction.setNewFeatures(new Feature[] {feature});
    request.setFeatureTransaction(featureTransaction);
    PersistTransactionResponse response = (PersistTransactionResponse) dispatcher.execute(
        PersistTransactionRequest.COMMAND, request, null, "en");
    if (response.isError()) {
      response.getErrors().get(0).printStackTrace();
    }
    Assert.assertFalse(response.isError());
    Assert.assertNotNull(response.getFeatureTransaction());
    Feature[] newFeatures = response.getFeatureTransaction().getNewFeatures();
    Assert.assertEquals(1, newFeatures.length);
    Assert.assertNotNull(newFeatures[0].getId());
  }
View Full Code Here

      GwtCommandDispatcher.getInstance().execute(command, new CommandCallback() {

        public void execute(CommandResponse response) {
          if (response instanceof PersistTransactionResponse) {
            PersistTransactionResponse ptr = (PersistTransactionResponse) response;
            mapModel.applyFeatureTransaction(new FeatureTransaction(ft.getLayer(), ptr
                .getFeatureTransaction()));
          }
        }
      });
    }
View Full Code Here

  @Autowired
  private VectorLayerService layerService;

  public PersistTransactionResponse getEmptyCommandResponse() {
    return new PersistTransactionResponse();
  }
View Full Code Here

TOP

Related Classes of org.geomajas.command.dto.PersistTransactionResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.