Examples of IAttributeMapper


Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

      if (WebflowModelXmlUtils.isVersion1Flow(state)) {
        if (trimString(this.attributeMapperBeanText.getText()) != null
            || this.inputAttributes.size() > 0 || this.outputAttributes.size() > 0
            || this.outputMapping.size() > 0 || this.inputMapping.size() > 0) {

          IAttributeMapper mapper = null;

          if (stateClone.getAttributeMapper() == null) {
            mapper = new AttributeMapper();
            mapper.createNew(stateClone);
            stateClone.setAttributeMapper(mapper);
          }
          else {
            mapper = stateClone.getAttributeMapper();
          }

          mapper.setBean(trimString(this.attributeMapperBeanText.getText()));

          if (mapper.getOutputMapper() == null
              && (this.outputAttributes.size() > 0 || this.outputMapping.size() > 0)) {
            OutputMapper entry = new OutputMapper();
            entry.createNew(mapper);
            for (IInputAttribute a : this.outputAttributes) {
              entry.addOutputAttribute((IOutputAttribute) a);
            }
            for (IMapping a : this.outputMapping) {
              entry.addMapping(a);
            }
            mapper.setOutputMapper(entry);
          }
          else if (this.outputAttributes.size() == 0 && this.outputMapping.size() == 0) {
            mapper.setOutputMapper(null);
          }
          else {
            mapper.getOutputMapper().removeAllOutputAttribute();
            mapper.getOutputMapper().removeAllMapping();
            for (IInputAttribute a : this.outputAttributes) {
              mapper.getOutputMapper().addOutputAttribute((IOutputAttribute) a);
            }
            for (IMapping a : this.outputMapping) {
              mapper.getOutputMapper().addMapping(a);
            }
          }

          if (mapper.getInputMapper() == null
              && (this.inputAttributes.size() > 0 || this.inputMapping.size() > 0)) {
            InputMapper entry = new InputMapper();
            entry.createNew(mapper);
            for (IInputAttribute a : this.inputAttributes) {
              entry.addInputAttribute(a);
            }
            for (IMapping a : this.inputMapping) {
              entry.addMapping(a);
            }
            mapper.setInputMapper(entry);
          }
          else if (this.inputAttributes.size() == 0 && this.inputMapping.size() == 0) {
            mapper.setInputMapper(null);
          }
          else {
            mapper.getInputMapper().removeAllInputAttribute();
            mapper.getInputMapper().removeAllMapping();
            for (IInputAttribute a : this.inputAttributes) {
              mapper.getInputMapper().addInputAttribute(a);
            }
            for (IMapping a : this.inputMapping) {
              mapper.getInputMapper().addMapping(a);
            }
          }

        }
        else {
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

  /**
   * @param attributeMapper
   */
  public void setAttributeMapper(IAttributeMapper attributeMapper) {
    IAttributeMapper oldValue = this.attributeMapper;
    if (this.attributeMapper != null) {
      getNode().removeChild(this.attributeMapper.getNode());
    }
    this.attributeMapper = attributeMapper;
    if (attributeMapper != null) {
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

  /**
   *
   */
  public void removeAttributeMapper() {
    IAttributeMapper oldValue = this.attributeMapper;
    if (this.attributeMapper != null) {
      getNode().removeChild(this.attributeMapper.getNode());
    }
    this.attributeMapper = null;
    super.firePropertyChange(REMOVE_CHILDREN, attributeMapper, oldValue);
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

  /**
   * @param child
   * @return
   */
  protected Command createAddAttributeMapperCommand(EditPart child) {
    IAttributeMapper activity = (IAttributeMapper) child.getModel();
    AddAttributeMapperCommand add = new AddAttributeMapperCommand();
    add.setParent((ISubflowState) getHost().getModel());
    add.setChild(activity);
    return add;
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

                    command.add(createDeleteActionCommand(childModel));
                    command.add(createCreateActionCommand(childModel, index));//$NON-NLS-1$
                }
                else if (child.getModel() instanceof IAttributeMapper
                        && getHost().getModel() instanceof ISubflowState) {
                    IAttributeMapper childModel = (IAttributeMapper) child
                            .getModel();
                    command.add(createDeleteAttributeMapperCommand(childModel));
                    command.add(createCreateAttributeMapperCommand(childModel,
                            index)); //$NON-NLS-1$
                }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

      if (action.getBean() != null) {
        buf.append(action.getBean());
      }
    }
    else if (element instanceof IAttributeMapper) {
      IAttributeMapper attributeMapper = (IAttributeMapper) element;
      if (attributeMapper.getBean() != null) {
        buf.append(attributeMapper.getBean());
      }
      else {
        buf.append("attribute-mapper");
      }
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IAttributeMapper

      if (action.getBean() != null) {
        buf.append(action.getBean());
      }
    }
    else if (element instanceof IAttributeMapper) {
      IAttributeMapper attributeMapper = (IAttributeMapper) element;
      if (attributeMapper.getBean() != null) {
        buf.append(attributeMapper.getBean());
      }
    }
    else {
      buf.append(super.getText(element));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.