KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > properties > itemactions > RemoveProfileAction


1 /**
2  *
3  */

4 package com.sslexplorer.properties.itemactions;
5
6 import com.sslexplorer.policyframework.ResourceItem;
7 import com.sslexplorer.policyframework.itemactions.RemoveResourceAction;
8 import com.sslexplorer.security.SessionInfo;
9 import com.sslexplorer.table.AvailableTableItemAction;
10
11 public final class RemoveProfileAction extends RemoveResourceAction {
12     public RemoveProfileAction() {
13         super(SessionInfo.ALL_CONTEXTS, "properties");
14     }
15
16     public boolean isEnabled(AvailableTableItemAction availableItem) {
17         return super.isEnabled(availableItem)
18                 && ((ResourceItem) availableItem.getRowItem()).getResource()
19                         .getResourceId() != 0;
20     }
21 }
Popular Tags