1 package org.apache.maven.artifact; 2 3 4 19 20 public class InvalidArtifactRTException 21 extends RuntimeException  22 { 23 24 private final String groupId; 25 private final String artifactId; 26 private final String version; 27 private final String type; 28 private final String baseMessage; 29 30 public InvalidArtifactRTException( String groupId, String artifactId, String version, String type, String message ) 31 { 32 this.groupId = groupId; 33 this.artifactId = artifactId; 34 this.version = version; 35 this.type = type; 36 this.baseMessage = message; 37 } 38 39 public InvalidArtifactRTException( String groupId, String artifactId, String version, String type, String message, Throwable cause ) 40 { 41 super( cause ); 42 43 this.groupId = groupId; 44 this.artifactId = artifactId; 45 this.version = version; 46 this.type = type; 47 this.baseMessage = message; 48 } 49 50 public String getMessage() 51 { 52 return "For artifact {" + getArtifactKey() + "}: " + getBaseMessage(); 53 } 54 55 public String getBaseMessage() 56 { 57 return baseMessage; 58 } 59 60 public String getArtifactId() 61 { 62 return artifactId; 63 } 64 65 public String getGroupId() 66 { 67 return groupId; 68 } 69 70 public String getType() 71 { 72 return type; 73 } 74 75 public String getVersion() 76 { 77 return version; 78 } 79 80 public String getArtifactKey() 81 { 82 return groupId + ":" + artifactId + ":" + version + ":" + type; 83 } 84 85 } 86 | Popular Tags |