1 16 package org.springframework.webflow.engine.builder; 17 18 import org.springframework.util.ClassUtils; 19 import org.springframework.util.StringUtils; 20 import org.springframework.webflow.core.FlowException; 21 import org.springframework.webflow.execution.FlowExecutionException; 22 23 37 public class FlowArtifactLookupException extends FlowException { 38 39 42 private String artifactId; 43 44 47 private Class artifactType; 48 49 54 public FlowArtifactLookupException(String artifactId, Class artifactType) { 55 this(artifactId, artifactType, null, null); 56 } 57 58 64 public FlowArtifactLookupException(String artifactId, Class artifactType, Throwable cause) { 65 this(artifactId, artifactType, null, cause); 66 } 67 68 74 public FlowArtifactLookupException(String artifactId, Class artifactType, String message) { 75 this(artifactId, artifactType, message, null); 76 } 77 78 85 public FlowArtifactLookupException(String artifactId, Class artifactType, String message, Throwable cause) { 86 super((StringUtils.hasText(message) ? message : "Unable to obtain a " + ClassUtils.getShortName(artifactType) 87 + " flow artifact with id '" + artifactId + "': make sure there is a valid [" + artifactType 88 + "] exported with this id"), cause); 89 this.artifactType = artifactType; 90 this.artifactId = artifactId; 91 } 92 93 96 public String getArtifactId() { 97 return artifactId; 98 } 99 100 103 public Class getArtifactType() { 104 return artifactType; 105 } 106 } | Popular Tags |