01: /*
02: * Copyright 2006 Day Management AG, Switzerland. All rights reserved.
03: */
04: package javax.jcr.nodetype;
05:
06: import javax.jcr.RepositoryException;
07:
08: /**
09: * Exception thrown when an action would violate
10: * a constraint on repository structure. For example, when an attempt is made
11: * to persistently add an item to a node that would violate that node's node type.
12: *
13: */
14: public class ConstraintViolationException extends RepositoryException {
15: /**
16: * Constructs a new instance of this class with <code>null</code> as its
17: * detail message.
18: */
19: public ConstraintViolationException() {
20: super ();
21: }
22:
23: /**
24: * Constructs a new instance of this class with the specified detail
25: * message.
26: *
27: * @param message the detail message. The detail message is saved for
28: * later retrieval by the {@link #getMessage()} method.
29: */
30: public ConstraintViolationException(String message) {
31: super (message);
32: }
33:
34: /**
35: * Constructs a new instance of this class with the specified detail
36: * message and root cause.
37: *
38: * @param message the detail message. The detail message is saved for
39: * later retrieval by the {@link #getMessage()} method.
40: * @param rootCause root failure cause
41: */
42: public ConstraintViolationException(String message,
43: Throwable rootCause) {
44: super (message, rootCause);
45: }
46:
47: /**
48: * Constructs a new instance of this class with the specified root cause.
49: *
50: * @param rootCause root failure cause
51: */
52: public ConstraintViolationException(Throwable rootCause) {
53: super(rootCause);
54: }
55: }
|