1 19 20 package com.sslexplorer.security.itemactions; 21 22 import com.sslexplorer.policyframework.Permission; 23 import com.sslexplorer.policyframework.PolicyConstants; 24 import com.sslexplorer.security.AuthenticationSchemeSequenceItem; 25 import com.sslexplorer.security.SessionInfo; 26 import com.sslexplorer.table.AvailableTableItemAction; 27 import com.sslexplorer.table.TableItemAction; 28 29 31 public class MoveAuthenticationSchemeDownAction extends TableItemAction { 32 33 36 public MoveAuthenticationSchemeDownAction() { 37 super("moveDown", "security", 600, "", true, SessionInfo.MANAGEMENT_CONSOLE_CONTEXT, 38 PolicyConstants.AUTHENTICATION_SCHEMES_RESOURCE_TYPE, new Permission[] { PolicyConstants.PERM_EDIT_AND_ASSIGN }); 39 } 40 41 @Override 42 public String getPath(AvailableTableItemAction availableItem) { 43 AuthenticationSchemeSequenceItem item = (AuthenticationSchemeSequenceItem)availableItem.getRowItem(); 44 return "/showAuthenticationSchemes.do?actionTarget=moveDown&selectedResource=" + item.getResource().getResourceId(); 45 } 46 47 @Override 48 public boolean isEnabled(AvailableTableItemAction availableItem) { 49 AuthenticationSchemeSequenceItem item = (AuthenticationSchemeSequenceItem)availableItem.getRowItem(); 50 return item.isCanMoveDown(); 51 } 52 } 53 | Popular Tags |