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