1 10 11 package org.mule.impl.internal.notifications; 12 13 import org.mule.umo.manager.UMOServerNotification; 14 15 26 public class SecurityNotification extends UMOServerNotification 27 { 28 31 private static final long serialVersionUID = 5951835321289699941L; 32 33 public static final int SECURITY_AUTHENTICATION_FAILED = SECURITY_EVENT_ACTION_START_RANGE + 1; 34 35 private static final transient String [] ACTIONS = new String []{"authentication failed"}; 36 37 public SecurityNotification(org.mule.umo.security.SecurityException message, int action) 38 { 39 super(message, action); 40 resourceIdentifier = message.toString(); 41 } 42 43 protected String getPayloadToString() 44 { 45 return source.toString(); 46 } 47 48 protected String getActionName(int action) 49 { 50 int i = action - SECURITY_EVENT_ACTION_START_RANGE; 51 if (i - 1 > ACTIONS.length) 52 { 53 return String.valueOf(action); 54 } 55 return ACTIONS[i - 1]; 56 } 57 58 public String getType() 59 { 60 return TYPE_WARNING; 61 } 62 } 63 | Popular Tags |