1 package com.sslexplorer.table; 2 3 import com.sslexplorer.core.MenuItem; 4 import com.sslexplorer.policyframework.Permission; 5 import com.sslexplorer.policyframework.ResourceType; 6 import com.sslexplorer.security.SessionInfo; 7 8 9 27 public class TableItemAction extends MenuItem { 28 29 31 private boolean important; 32 33 41 public TableItemAction(String id, String messageResourcesKey, int weight, boolean important) { 42 this(id, messageResourcesKey, weight, null, important); 43 } 44 45 54 public TableItemAction(String id, String messageResourcesKey, int weight, String target, boolean important) { 55 this(id, messageResourcesKey, weight, target, important, SessionInfo.ALL_CONTEXTS); 56 } 57 58 67 public TableItemAction(String id, String messageResourcesKey, int weight, boolean important, int navigationContext) { 68 this(id, messageResourcesKey, weight, null, important, navigationContext); 69 } 70 71 81 public TableItemAction(String id, String messageResourcesKey, int weight, String target, boolean important, int navigationContext) { 82 super(id, messageResourcesKey, "", weight, true, target, navigationContext); 83 init(important); 84 } 85 86 98 public TableItemAction(String id, String messageResourcesKey, int weight, String target, boolean important, 99 int navigationContext, ResourceType resourceTypeOfPermissionsRequired, Permission[] permissionsRequired) { 100 super(id, messageResourcesKey, "", weight, true, target, navigationContext, resourceTypeOfPermissionsRequired, permissionsRequired); 101 init(important); 102 } 103 104 111 public boolean isImportant() { 112 return important; 113 } 114 115 void init(boolean important) { 116 this.important = important; 117 } 118 119 126 public String getOnClick(AvailableTableItemAction availableItem) { 127 return ""; 128 } 129 130 137 public boolean isEnabled(AvailableTableItemAction availableItem) { 138 return true; 139 } 140 141 148 public String getPath(AvailableTableItemAction availableItem) { 149 return "#"; 150 } 151 152 158 public String getAdditionalAttributeName() { 159 return ""; 160 } 161 162 168 public String getAdditionalAttributeValue(AvailableTableItemAction availableItem) { 169 return ""; 170 } 171 172 178 public String getToolTipContentLocation(AvailableTableItemAction availableItem) { 179 return ""; 180 } 181 182 187 public int getToolTipWidth(AvailableTableItemAction availableItem) { 188 191 return 140; 192 } 193 194 } 195 | Popular Tags |