KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > invicta > project > InvictaProjectException


1 package net.sf.invicta.project;
2
3 import net.sf.invicta.InvictaException;
4  
5 /**
6  *
7  */

8 public class InvictaProjectException extends InvictaException {
9
10     /**
11      * @param message
12      */

13     public InvictaProjectException(String JavaDoc message) {
14         super(message);
15     }
16
17     public static InvictaProjectException componentDependencyCycle(String JavaDoc componentName) {
18         return new InvictaProjectException(
19             "Component dependecy cycle. Involved component: '"
20                 + componentName
21                 + "'");
22     }
23
24     public static InvictaProjectException componentUndefined(String JavaDoc componentName) {
25         return new InvictaProjectException(
26             "Component '" + componentName + "' is not defined in the project");
27     }
28     
29     
30     public static InvictaProjectException duplicateComponentDefinition(String JavaDoc componentName) {
31         return new InvictaProjectException(
32             "Duplicate definition of component '" + componentName + "'");
33     }
34     
35     public static InvictaProjectException duplicateProductDefinition(String JavaDoc componentName, String JavaDoc productName, String JavaDoc 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 JavaDoc componentName, String JavaDoc propertyName) {
47         return new InvictaProjectException(
48             "Duplicate property '" + propertyName + "' in component '" + componentName +"'");
49     }
50     
51     public static InvictaProjectException createProductDependencyCycle(String JavaDoc componentName, String JavaDoc productName) {
52         return new InvictaProjectException(
53             "Product dependency cycle. Component '" + componentName +
54                            "', involved product '" + productName + "'");
55     }
56     
57     public static InvictaProjectException productUndefined(String JavaDoc componentName, String JavaDoc productName) {
58         return new InvictaProjectException(
59             "Product '" + productName + "' is not defined in component '" + componentName + "'");
60     }
61     
62     public static InvictaProjectException propertyUndefined(String JavaDoc componentName, String JavaDoc componentType, String JavaDoc propertyName) {
63         return new InvictaProjectException(
64             "Property '" + propertyName + "' was not defined for component '"
65                         + componentName + "' using type '" + componentType);
66     }
67 }
68     
Popular Tags