Package org.springframework.webflow.engine.model.builder

Examples of org.springframework.webflow.engine.model.builder.FlowModelBuilderException


  public void init() throws FlowModelBuilderException {
    try {
      document = documentLoader.loadDocument(resource);
      initLastModifiedTimestamp();
    } catch (IOException e) {
      throw new FlowModelBuilderException("Could not access the XML flow definition at " + resource, e);
    } catch (ParserConfigurationException e) {
      throw new FlowModelBuilderException("Could not configure the parser to parse the XML flow definition at "
          + resource, e);
    } catch (SAXException e) {
      throw new FlowModelBuilderException("Could not parse the XML flow definition document at " + resource, e);
    }
  }
View Full Code Here


    }
  }

  public void build() throws FlowModelBuilderException {
    if (getDocumentElement() == null) {
      throw new FlowModelBuilderException(
          "The FlowModelBuilder must be initialized first -- called init() before calling build()");
    }
    flowModel = parseFlow(getDocumentElement());
    mergeFlows();
    mergeStates();
View Full Code Here

    mergeStates();
  }

  public FlowModel getFlowModel() throws FlowModelBuilderException {
    if (flowModel == null) {
      throw new FlowModelBuilderException(
          "The FlowModel must be built first -- called init() and build() before calling getFlowModel()");
    }
    return flowModel;
  }
View Full Code Here

    } else if (DomUtils.nodeNameEquals(element, "render")) {
      return parseRender(element);
    } else if (DomUtils.nodeNameEquals(element, "set")) {
      return parseSet(element);
    } else {
      throw new FlowModelBuilderException("Unknown action element encountered '" + element.getLocalName() + "'");
    }
  }
View Full Code Here

    } else if (DomUtils.nodeNameEquals(element, "subflow-state")) {
      return parseSubflowState(element);
    } else if (DomUtils.nodeNameEquals(element, "end-state")) {
      return parseEndState(element);
    } else {
      throw new FlowModelBuilderException("Unknown state element encountered '" + element.getLocalName() + "'");
    }
  }
View Full Code Here

        String parentFlowId = (String) it.next();
        if (StringUtils.hasText(parentFlowId)) {
          try {
            flowModel.merge(modelLocator.getFlowModel(parentFlowId));
          } catch (NoSuchFlowModelException e) {
            throw new FlowModelBuilderException("Unable to find flow '" + parentFlowId
                + "' to inherit from", e);
          }
        }
      }
    }
View Full Code Here

        String flowId;
        String stateId;
        AbstractStateModel parentState = null;
        int hashIndex = parent.indexOf("#");
        if (hashIndex == -1) {
          throw new FlowModelBuilderException("Invalid parent syntax '" + parent
              + "', should take form 'flowId#stateId'");
        }
        flowId = parent.substring(0, hashIndex).trim();
        stateId = parent.substring(hashIndex + 1).trim();
        try {
          parentState = modelLocator.getFlowModel(flowId).getStateById(stateId);
          if (parentState == null) {
            throw new FlowModelBuilderException("Unable to find state '" + stateId + "' in flow '" + flowId
                + "'");
          }
          childState.merge(parentState);
        } catch (NoSuchFlowModelException e) {
          throw new FlowModelBuilderException("Unable to find flow '" + flowId + "' to inherit from", e);
        } catch (ClassCastException e) {
          throw new FlowModelBuilderException("Parent state type '" + parentState.getClass().getName()
              + "' cannot be merged with state type '" + childState.getClass().getName() + "'", e);

        }
      }
    }
View Full Code Here

  public void init() throws FlowModelBuilderException {
    try {
      document = documentLoader.loadDocument(resource);
      initLastModifiedTimestamp();
    } catch (IOException e) {
      throw new FlowModelBuilderException("Could not access the XML flow definition at " + resource, e);
    } catch (ParserConfigurationException e) {
      throw new FlowModelBuilderException("Could not configure the parser to parse the XML flow definition at "
          + resource, e);
    } catch (SAXException e) {
      throw new FlowModelBuilderException("Could not parse the XML flow definition document at " + resource, e);
    }
  }
View Full Code Here

    }
  }

  public void build() throws FlowModelBuilderException {
    if (getDocumentElement() == null) {
      throw new FlowModelBuilderException(
          "The FlowModelBuilder must be initialized first -- called init() before calling build()");
    }
    flowModel = parseFlow(getDocumentElement());
    mergeFlows();
    mergeStates();
View Full Code Here

    mergeStates();
  }

  public FlowModel getFlowModel() throws FlowModelBuilderException {
    if (flowModel == null) {
      throw new FlowModelBuilderException(
          "The FlowModel must be built first -- called init() and build() before calling getFlowModel()");
    }
    return flowModel;
  }
View Full Code Here

TOP

Related Classes of org.springframework.webflow.engine.model.builder.FlowModelBuilderException

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.