Examples of BadlyFormattedFlowExecutionKeyException


Examples of org.springframework.webflow.execution.repository.BadlyFormattedFlowExecutionKeyException

   * @param encodedKey the string-encoded composite flow execution key
   * @return the composite key parts as a String array (executionId = 0, snapshotId = 1)
   */
  public static String[] keyParts(String encodedKey) throws BadlyFormattedFlowExecutionKeyException {
    if (!encodedKey.startsWith(EXECUTION_ID_PREFIX)) {
      throw new BadlyFormattedFlowExecutionKeyException(encodedKey, FORMAT);
    }
    int snapshotStart = encodedKey.indexOf(SNAPSHOT_ID_PREFIX, EXECUTION_ID_PREFIX.length());
    if (snapshotStart == -1) {
      throw new BadlyFormattedFlowExecutionKeyException(encodedKey, FORMAT);
    }
    String executionId = encodedKey.substring(EXECUTION_ID_PREFIX.length(), snapshotStart);
    String snapshotId = encodedKey.substring(snapshotStart + SNAPSHOT_ID_PREFIX.length());
    return new String[] { executionId, snapshotId };
  }
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.