root / src / gr / ebs / gss / client / exceptions / InvitationUsedException.java @ 783db80b
History | View | Annotate | Download (2 kB)
1 | 01a30cd0 | Panagiotis Astithas | /*
|
---|---|---|---|
2 | 01a30cd0 | Panagiotis Astithas | * Copyright 2010 Electronic Business Systems Ltd.
|
3 | 01a30cd0 | Panagiotis Astithas | *
|
4 | 01a30cd0 | Panagiotis Astithas | * This file is part of GSS.
|
5 | 01a30cd0 | Panagiotis Astithas | *
|
6 | 01a30cd0 | Panagiotis Astithas | * GSS is free software: you can redistribute it and/or modify
|
7 | 01a30cd0 | Panagiotis Astithas | * it under the terms of the GNU General Public License as published by
|
8 | 01a30cd0 | Panagiotis Astithas | * the Free Software Foundation, either version 3 of the License, or
|
9 | 01a30cd0 | Panagiotis Astithas | * (at your option) any later version.
|
10 | 01a30cd0 | Panagiotis Astithas | *
|
11 | 01a30cd0 | Panagiotis Astithas | * GSS is distributed in the hope that it will be useful,
|
12 | 01a30cd0 | Panagiotis Astithas | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 01a30cd0 | Panagiotis Astithas | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 | 01a30cd0 | Panagiotis Astithas | * GNU General Public License for more details.
|
15 | 01a30cd0 | Panagiotis Astithas | *
|
16 | 01a30cd0 | Panagiotis Astithas | * You should have received a copy of the GNU General Public License
|
17 | 01a30cd0 | Panagiotis Astithas | * along with GSS. If not, see <http://www.gnu.org/licenses/>.
|
18 | 01a30cd0 | Panagiotis Astithas | */
|
19 | 01a30cd0 | Panagiotis Astithas | package gr.ebs.gss.client.exceptions; |
20 | 01a30cd0 | Panagiotis Astithas | |
21 | 01a30cd0 | Panagiotis Astithas | import java.io.Serializable; |
22 | 01a30cd0 | Panagiotis Astithas | |
23 | 01a30cd0 | Panagiotis Astithas | import javax.ejb.ApplicationException; |
24 | 01a30cd0 | Panagiotis Astithas | |
25 | 01a30cd0 | Panagiotis Astithas | /**
|
26 | 01a30cd0 | Panagiotis Astithas | * An exception thrown when trying to reuse an already used invitation.
|
27 | 01a30cd0 | Panagiotis Astithas | *
|
28 | 01a30cd0 | Panagiotis Astithas | * @author past
|
29 | 01a30cd0 | Panagiotis Astithas | */
|
30 | 01a30cd0 | Panagiotis Astithas | @ApplicationException(rollback=true) |
31 | 01a30cd0 | Panagiotis Astithas | public class InvitationUsedException extends Exception implements Serializable { |
32 | 01a30cd0 | Panagiotis Astithas | |
33 | 01a30cd0 | Panagiotis Astithas | /**
|
34 | 01a30cd0 | Panagiotis Astithas | * The serial version UID.
|
35 | 01a30cd0 | Panagiotis Astithas | */
|
36 | 01a30cd0 | Panagiotis Astithas | private static final long serialVersionUID = 1L; |
37 | 01a30cd0 | Panagiotis Astithas | |
38 | 01a30cd0 | Panagiotis Astithas | /**
|
39 | 01a30cd0 | Panagiotis Astithas | * The stored message that provides details about the problem.
|
40 | 01a30cd0 | Panagiotis Astithas | */
|
41 | 01a30cd0 | Panagiotis Astithas | private String message; |
42 | 01a30cd0 | Panagiotis Astithas | |
43 | 01a30cd0 | Panagiotis Astithas | /**
|
44 | 01a30cd0 | Panagiotis Astithas | * Default constructor
|
45 | 01a30cd0 | Panagiotis Astithas | */
|
46 | 01a30cd0 | Panagiotis Astithas | public InvitationUsedException() {
|
47 | 01a30cd0 | Panagiotis Astithas | super();
|
48 | 01a30cd0 | Panagiotis Astithas | } |
49 | 01a30cd0 | Panagiotis Astithas | |
50 | 01a30cd0 | Panagiotis Astithas | /**
|
51 | 01a30cd0 | Panagiotis Astithas | * Constructor from error message.
|
52 | 01a30cd0 | Panagiotis Astithas | *
|
53 | 01a30cd0 | Panagiotis Astithas | * @param newMessage The error message
|
54 | 01a30cd0 | Panagiotis Astithas | */
|
55 | 01a30cd0 | Panagiotis Astithas | public InvitationUsedException(final String newMessage) { |
56 | 01a30cd0 | Panagiotis Astithas | super(newMessage);
|
57 | 01a30cd0 | Panagiotis Astithas | message = newMessage; |
58 | 01a30cd0 | Panagiotis Astithas | } |
59 | 01a30cd0 | Panagiotis Astithas | |
60 | 01a30cd0 | Panagiotis Astithas | /**
|
61 | 01a30cd0 | Panagiotis Astithas | * Constructor from Throwable.
|
62 | 01a30cd0 | Panagiotis Astithas | *
|
63 | 01a30cd0 | Panagiotis Astithas | * @param cause The throwable that caused the exception
|
64 | 01a30cd0 | Panagiotis Astithas | */
|
65 | 01a30cd0 | Panagiotis Astithas | public InvitationUsedException(final Throwable cause) { |
66 | 01a30cd0 | Panagiotis Astithas | super(cause);
|
67 | 01a30cd0 | Panagiotis Astithas | } |
68 | 01a30cd0 | Panagiotis Astithas | |
69 | 01a30cd0 | Panagiotis Astithas | /**
|
70 | 01a30cd0 | Panagiotis Astithas | * Constructor from error message and Throwable.
|
71 | 01a30cd0 | Panagiotis Astithas | *
|
72 | 01a30cd0 | Panagiotis Astithas | * @param newMessage The error message
|
73 | 01a30cd0 | Panagiotis Astithas | * @param cause The throwable that caused the exception
|
74 | 01a30cd0 | Panagiotis Astithas | */
|
75 | 01a30cd0 | Panagiotis Astithas | public InvitationUsedException(final String newMessage, final Throwable cause) { |
76 | 01a30cd0 | Panagiotis Astithas | super(newMessage, cause);
|
77 | 01a30cd0 | Panagiotis Astithas | message = newMessage; |
78 | 01a30cd0 | Panagiotis Astithas | } |
79 | 01a30cd0 | Panagiotis Astithas | |
80 | 01a30cd0 | Panagiotis Astithas | @Override
|
81 | 01a30cd0 | Panagiotis Astithas | public String getMessage() { |
82 | 01a30cd0 | Panagiotis Astithas | return message;
|
83 | 01a30cd0 | Panagiotis Astithas | } |
84 | 01a30cd0 | Panagiotis Astithas | |
85 | 01a30cd0 | Panagiotis Astithas | } |