]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/UnsupportedException.java
Update service versions
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / UnsupportedException.java
1 package org.argeo.slc;
2
3 /** Exception for unsupported features or actions. */
4 public class UnsupportedException extends SlcException {
5 static final long serialVersionUID = 1l;
6
7 /** Action not supported. */
8 public UnsupportedException() {
9 this("Action not supported");
10 }
11
12 /** Constructor with a message. */
13 public UnsupportedException(String message) {
14 super(message);
15 }
16
17 /**
18 * Constructor generating a message.
19 *
20 * @param nature
21 * the nature of the unsupported object
22 * @param obj
23 * the object itself (its class name will be used in message)
24 */
25 public UnsupportedException(String nature, Object obj) {
26 super("Unsupported " + nature + ": "
27 + (obj != null ? obj.getClass() : "[object is null]"));
28 }
29
30 /**
31 * Constructor generating a message.
32 *
33 * @param nature
34 * the nature of the unsupported object
35 * @param clss
36 * the class itself (will be used in message)
37 */
38 public UnsupportedException(String nature, Class<?> clss) {
39 super("Unsupported " + nature + ": " + clss);
40 }
41
42 /**
43 * Constructor generating a message.
44 *
45 * @param nature
46 * the nature of the unsupported object
47 * @param value
48 * the problematic value itself
49 */
50 public UnsupportedException(String nature, String value) {
51 super("Unsupported " + nature + ": " + value);
52 }
53
54 }