1 19 20 package com.sslexplorer.setup; 21 22 import java.util.ArrayList ; 23 import java.util.List ; 24 25 import org.apache.struts.util.LabelValueBean; 26 27 import com.sslexplorer.security.ClientRestriction; 28 29 public class ClientRestrictionItem { 30 31 final static List ALLOW_DENY_LIST = new ArrayList (); 32 static { 33 ALLOW_DENY_LIST.add(new LabelValueBean("Allow all", "true")); 34 ALLOW_DENY_LIST.add(new LabelValueBean("Deny all", "false")); 35 } 36 37 private ClientRestriction clientRestriction; 38 private int index; 39 40 public ClientRestrictionItem(int index, ClientRestriction clientRestriction) { 41 this.clientRestriction = clientRestriction; 42 this.index = index; 43 } 44 45 public String getIndexString() { 46 return String.valueOf(index); 47 } 48 49 public int getIndex() { 50 return index; 51 } 52 53 public void setIndex(int index) { 54 this.index = index; 55 } 56 57 public ClientRestriction getClientRestriction() { 58 return clientRestriction; 59 } 60 61 public void setAllowDeny(String allowDeny) { 62 clientRestriction.setAllow(Boolean.valueOf(allowDeny).booleanValue()); 63 } 64 65 public List getAllowDenyList() { 66 return ALLOW_DENY_LIST; 67 } 68 69 public String getAllowDeny() { 70 return String.valueOf(clientRestriction.getAllow()); 71 } 72 73 } 74
| Popular Tags
|