1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.api.security; |
12 | |
|
13 | |
import org.mule.api.EncryptionStrategy; |
14 | |
import org.mule.api.MuleException; |
15 | |
import org.mule.config.i18n.CoreMessages; |
16 | |
import org.mule.config.i18n.Message; |
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
public class CryptoFailureException extends MuleException |
27 | |
{ |
28 | |
|
29 | |
|
30 | |
|
31 | |
private static final long serialVersionUID = 1336343718508294379L; |
32 | |
|
33 | |
private transient EncryptionStrategy encryptionStrategy; |
34 | |
|
35 | |
public CryptoFailureException(Message message, EncryptionStrategy strategy) |
36 | |
{ |
37 | 0 | super(message); |
38 | 0 | String s = (strategy == null ? "null" : strategy.toString()); |
39 | 0 | addInfo("Encryption", s); |
40 | 0 | this.encryptionStrategy = strategy; |
41 | 0 | } |
42 | |
|
43 | |
public CryptoFailureException(Message message, EncryptionStrategy strategy, Throwable cause) |
44 | |
{ |
45 | 0 | super(message, cause); |
46 | 0 | String s = (strategy == null ? "null" : strategy.toString()); |
47 | 0 | addInfo("Encryption", s); |
48 | 0 | this.encryptionStrategy = strategy; |
49 | 0 | } |
50 | |
|
51 | |
public CryptoFailureException(EncryptionStrategy strategy, Throwable cause) |
52 | |
{ |
53 | 0 | super(CoreMessages.cryptoFailure(), cause); |
54 | 0 | String s = (strategy == null ? "null" : strategy.toString()); |
55 | 0 | addInfo("Encryption", s); |
56 | 0 | this.encryptionStrategy = strategy; |
57 | |
|
58 | 0 | } |
59 | |
|
60 | |
public EncryptionStrategy getEncryptionStrategy() |
61 | |
{ |
62 | 0 | return encryptionStrategy; |
63 | |
} |
64 | |
} |