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.DefaultMuleException;
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 DefaultMuleException
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 super(message);
38 String s = (strategy == null ? "null" : strategy.toString());
39 addInfo("Encryption", s);
40 this.encryptionStrategy = strategy;
41 }
42
43 public CryptoFailureException(Message message, EncryptionStrategy strategy, Throwable cause)
44 {
45 super(message, cause);
46 String s = (strategy == null ? "null" : strategy.toString());
47 addInfo("Encryption", s);
48 this.encryptionStrategy = strategy;
49 }
50
51 public CryptoFailureException(EncryptionStrategy strategy, Throwable cause)
52 {
53 super(CoreMessages.cryptoFailure(), cause);
54 String s = (strategy == null ? "null" : strategy.toString());
55 addInfo("Encryption", s);
56 this.encryptionStrategy = strategy;
57
58 }
59
60 public EncryptionStrategy getEncryptionStrategy()
61 {
62 return encryptionStrategy;
63 }
64 }