1 package net.sf.invicta.project; 2 3 import net.sf.invicta.InvictaException; 4 5 8 public class InvictaProjectException extends InvictaException { 9 10 13 public InvictaProjectException(String message) { 14 super(message); 15 } 16 17 public static InvictaProjectException componentDependencyCycle(String componentName) { 18 return new InvictaProjectException( 19 "Component dependecy cycle. Involved component: '" 20 + componentName 21 + "'"); 22 } 23 24 public static InvictaProjectException componentUndefined(String componentName) { 25 return new InvictaProjectException( 26 "Component '" + componentName + "' is not defined in the project"); 27 } 28 29 30 public static InvictaProjectException duplicateComponentDefinition(String componentName) { 31 return new InvictaProjectException( 32 "Duplicate definition of component '" + componentName + "'"); 33 } 34 35 public static InvictaProjectException duplicateProductDefinition(String componentName, String productName, String productType) { 36 return new InvictaProjectException( 37 "Duplicate product '" + productName + "' of type '" + productType + "' in component '" + componentName +"'" 38 ); 39 } 40 41 public static InvictaProjectException duplicateProjectSettings() { 42 return new InvictaProjectException( 43 "Duplicate project settings."); 44 } 45 46 public static InvictaProjectException duplicateProperty(String componentName, String propertyName) { 47 return new InvictaProjectException( 48 "Duplicate property '" + propertyName + "' in component '" + componentName +"'"); 49 } 50 51 public static InvictaProjectException createProductDependencyCycle(String componentName, String productName) { 52 return new InvictaProjectException( 53 "Product dependency cycle. Component '" + componentName + 54 "', involved product '" + productName + "'"); 55 } 56 57 public static InvictaProjectException productUndefined(String componentName, String productName) { 58 return new InvictaProjectException( 59 "Product '" + productName + "' is not defined in component '" + componentName + "'"); 60 } 61 62 public static InvictaProjectException propertyUndefined(String componentName, String componentType, String propertyName) { 63 return new InvictaProjectException( 64 "Property '" + propertyName + "' was not defined for component '" 65 + componentName + "' using type '" + componentType); 66 } 67 } 68 | Popular Tags |