1 19 20 package com.sslexplorer.security.forms; 21 22 import java.util.List ; 23 24 import com.sslexplorer.policyframework.Policy; 25 import com.sslexplorer.policyframework.PolicyDatabaseFactory; 26 import com.sslexplorer.policyframework.forms.AbstractResourcesForm; 27 import com.sslexplorer.security.AuthenticationScheme; 28 import com.sslexplorer.security.AuthenticationSchemeSequenceItem; 29 import com.sslexplorer.security.SessionInfo; 30 31 36 public class AuthenticationSchemesForm extends AbstractResourcesForm { 37 40 public AuthenticationSchemesForm() { 41 super("authenticationSchemes"); 42 getPager().setSorts(false); 43 } 44 45 51 public void initialize(SessionInfo session, List <AuthenticationScheme> authenticationSchemeSequence) throws Exception { 52 super.initialize(session.getHttpSession(), ""); 53 for (AuthenticationScheme scheme : authenticationSchemeSequence) { 54 List <Policy> policies = PolicyDatabaseFactory.getInstance().getPoliciesAttachedToResource(scheme, session.getUser().getRealm()); 55 AuthenticationSchemeSequenceItem item = new AuthenticationSchemeSequenceItem(scheme, policies); 56 getModel().addItem(item); 57 } 58 checkSort(); 59 getPager().rebuild(getFilterText()); 60 } 61 62 67 public boolean isCanMoveDown(Integer index) { 68 int rowCount = getModel().getRowCount(); 69 return index != null && index + 1 < rowCount; 70 } 71 } | Popular Tags |