1 19 20 package com.sslexplorer.applications; 21 22 import com.sslexplorer.core.CoreAttributeConstants; 23 import com.sslexplorer.extensions.ExtensionDescriptor; 24 import com.sslexplorer.extensions.store.ExtensionStore; 25 import com.sslexplorer.policyframework.ResourceChangeEvent; 26 import com.sslexplorer.policyframework.ResourceDeleteEvent; 27 import com.sslexplorer.security.SessionInfo; 28 29 30 36 public class ApplicationShortcutDeleteEvent extends ResourceDeleteEvent { 37 38 46 public ApplicationShortcutDeleteEvent(Object source, int id, SessionInfo session, Throwable exception) { 47 super(source, id, session, exception); 48 } 49 50 59 public ApplicationShortcutDeleteEvent(Object source, int id, ApplicationShortcut shortcut, SessionInfo session, int state) { 60 super(source, id, shortcut, session, state); 61 if(shortcut != null) { 62 addAttribute(CoreAttributeConstants.EVENT_ATTR_APPLICATION_ID, shortcut.getApplication()); 63 try { 64 ExtensionDescriptor des = ExtensionStore.getInstance().getExtensionDescriptor(shortcut.getApplication()); 65 if(des != null) { 66 addAttribute(CoreAttributeConstants.EVENT_ATTR_APPLICATION_NAME, des.getName()); 67 } 68 } 69 catch(Exception e) { 70 } 71 } 72 } 73 74 80 public ApplicationShortcut getClientConfiguration() { 81 return ((ApplicationShortcut)getResource()); 82 } 83 84 } 85 | Popular Tags |