1 19 20 package com.sslexplorer.webforwards; 21 22 import java.util.Calendar ; 23 import java.util.Iterator ; 24 25 import com.sslexplorer.boot.PropertyList; 26 import com.sslexplorer.core.CoreEvent; 27 import com.sslexplorer.policyframework.LaunchSession; 28 29 32 public class ReplacementProxyWebForward extends AbstractAuthenticatingWebForward { 33 34 private PropertyList restrictToHosts; 35 private String encoding; 36 37 53 public ReplacementProxyWebForward(int realmID, int id, String destinationURL, String shortName, String description, String category, 54 String authenticationUsername, String authenticationPassword, String preferredAuthenticationMethod, 55 String encoding, PropertyList restrictToHosts, String formType, String formParameters, 56 Calendar dateCreated, Calendar dateAmended) { 57 super(realmID, id, WebForward.TYPE_REPLACEMENT_PROXY, destinationURL, shortName, description, category, authenticationUsername, 58 authenticationPassword, preferredAuthenticationMethod, formType, formParameters, 59 dateCreated, dateAmended); 60 this.restrictToHosts = restrictToHosts; 61 this.encoding = encoding; 62 } 63 64 public PropertyList getRestrictToHosts() { 65 return restrictToHosts; 66 } 67 68 public void setRestrictToHosts(PropertyList restrictToHosts) { 69 this.restrictToHosts = restrictToHosts; 70 } 71 72 public String getEncoding() { 73 return encoding; 74 } 75 76 public void setEncoding(String encoding) { 77 this.encoding = encoding; 78 } 79 80 public void addRestrictToHostsToEvent(CoreEvent evt, String key){ 81 int counter = 1; 82 Iterator itr = this.restrictToHosts.iterator(); 83 while (itr.hasNext()) { 84 String element = (String ) itr.next(); 85 evt.addAttribute(key+" "+counter, element); 86 counter++; 87 } 88 } 89 90 public String getLaunchUri(LaunchSession launchSession) { 91 return "launchReplacementProxy.do?" + LaunchSession.LAUNCH_ID + "=" + launchSession.getId(); 92 } 93 94 } 95 | Popular Tags |