1 10 11 package org.mule.umo.security; 12 13 import org.mule.MuleException; 14 import org.mule.config.i18n.Message; 15 import org.mule.config.i18n.Messages; 16 import org.mule.umo.UMOEncryptionStrategy; 17 18 29 public class CryptoFailureException extends MuleException 30 { 31 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(new Message(Messages.CRYPTO_FAILURE), 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 } 68 | Popular Tags |