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