Package org.geomajas.gwt.client.map.workflow

Examples of org.geomajas.gwt.client.map.workflow.MapModelWorkflowContext


    FeatureTransaction featureTransaction = mapModel.getFeatureEditor().getFeatureTransaction();
    if (featureTransaction != null) {
      List<Activity> activities = new ArrayList<Activity>();
      activities.add(new ValidationActivity());
      activities.add(new CommitActivity());
      WorkflowProcessor processor = new SequenceProcessor(new MapModelWorkflowContext());
      processor.setDefaultErrorHandler(new WorkflowErrorHandler() {

        public void handleError(WorkflowContext context, Throwable throwable) {
          SC.warn(I18nProvider.getGlobal().saveEditingAborted() + throwable.getMessage());
        }
View Full Code Here


   * @param context
   *            Expects a {@link MapModelWorkflowContext}.
   */
  public WorkflowContext execute(WorkflowContext context) throws WorkflowException {
    if (context instanceof MapModelWorkflowContext) {
      MapModelWorkflowContext mmContext = (MapModelWorkflowContext) context;
      FeatureTransaction ft = mmContext.getFeatureTransaction();
      if (ft.getNewFeatures() != null) {
        for (Feature feature : ft.getNewFeatures()) {
          if (!feature.getGeometry().isValid()) {
            throw new WorkflowException(I18nProvider.getGlobal().validationActivityError());
          }
View Full Code Here

*/
public class CommitActivity implements Activity {

  public WorkflowContext execute(WorkflowContext context) throws WorkflowException {
    if (context instanceof MapModelWorkflowContext) {
      MapModelWorkflowContext mmc = (MapModelWorkflowContext) context;
      final MapModel mapModel = mmc.getMapModel();
      final FeatureTransaction ft = mmc.getFeatureTransaction();

      PersistTransactionRequest request = new PersistTransactionRequest();
      request.setFeatureTransaction(ft.toDto());
      request.setCrs(mapModel.getCrs());

View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.map.workflow.MapModelWorkflowContext

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.