1 19 20 package com.sslexplorer.webforwards; 21 22 import java.nio.charset.Charset ; 23 import java.util.ArrayList ; 24 import java.util.Iterator ; 25 import java.util.List ; 26 27 import org.apache.struts.util.LabelValueBean; 28 29 import com.maverick.http.HttpAuthenticatorFactory; 30 31 public class WebForwardTypes { 32 33 public static final String DEFAULT_ENCODING = "Default"; 34 35 public static final String FORM_SUBMIT_NONE = "NONE"; 36 public static final String FORM_SUBMIT_GET = "GET"; 37 public static final String FORM_SUBMIT_POST = "POST"; 38 public static final String FORM_SUBMIT_JAVASCRIPT = "JavaScript"; 39 40 public final static List WEB_FORWARD_TYPES = new ArrayList (); 41 public final static List PREFERED_SCHEMES = new ArrayList (); 42 public final static List FORM_SUBMIT_TYPES = new ArrayList (); 43 public final static List ENCODING_TYPES = new ArrayList (); 44 45 static { 46 WEB_FORWARD_TYPES.add(new WebForwardTypeItem(WebForward.TYPE_TUNNELED_SITE, WebForward.ATTR_TUNNELED_SITE)); 47 WEB_FORWARD_TYPES.add(new WebForwardTypeItem(WebForward.TYPE_REPLACEMENT_PROXY, WebForward.ATTR_REPLACEMENT_PROXY)); 48 WEB_FORWARD_TYPES.add(new WebForwardTypeItem(WebForward.TYPE_PATH_BASED_REVERSE_PROXY, WebForward.ATTR_PATH_BASED_REVERSE_PROXY)); 49 WEB_FORWARD_TYPES.add(new WebForwardTypeItem(WebForward.TYPE_HOST_BASED_REVERSE_PROXY, WebForward.ATTR_HOST_BASED_REVERSE_PROXY)); 50 51 PREFERED_SCHEMES.add(new LabelValueBean(HttpAuthenticatorFactory.BASIC, HttpAuthenticatorFactory.BASIC)); 52 PREFERED_SCHEMES.add(new LabelValueBean(HttpAuthenticatorFactory.DIGEST, HttpAuthenticatorFactory.DIGEST)); 53 PREFERED_SCHEMES.add(new LabelValueBean(HttpAuthenticatorFactory.NTLM, HttpAuthenticatorFactory.NTLM)); 54 PREFERED_SCHEMES.add(new LabelValueBean(HttpAuthenticatorFactory.NONE, HttpAuthenticatorFactory.NONE)); 55 56 FORM_SUBMIT_TYPES.add(new LabelValueBean(FORM_SUBMIT_NONE, FORM_SUBMIT_NONE)); 57 FORM_SUBMIT_TYPES.add(new LabelValueBean(FORM_SUBMIT_POST, FORM_SUBMIT_POST)); 58 FORM_SUBMIT_TYPES.add(new LabelValueBean(FORM_SUBMIT_GET, FORM_SUBMIT_GET)); 59 FORM_SUBMIT_TYPES.add(new LabelValueBean(FORM_SUBMIT_JAVASCRIPT, FORM_SUBMIT_JAVASCRIPT)); 60 61 ENCODING_TYPES.add(new LabelValueBean(DEFAULT_ENCODING, DEFAULT_ENCODING)); 62 for(Iterator i = Charset.availableCharsets().values().iterator(); i.hasNext(); ) { 63 Charset cs = (Charset )i.next(); 64 ENCODING_TYPES.add(new LabelValueBean(cs.toString(), cs.toString())); 65 } 66 } 67 } 68
| Popular Tags
|