1 28 29 package com.caucho.server.security; 30 31 import com.caucho.server.dispatch.ServletConfigException; 32 import com.caucho.util.L10N; 33 34 import javax.servlet.ServletException ; 35 36 39 public class UserDataConstraint { 40 static L10N L = new L10N(UserDataConstraint.class); 41 42 private String _transportGuarantee; 43 44 public void setDescription(String description) 45 { 46 } 47 48 51 public void setTransportGuarantee(String guarantee) 52 throws ServletException 53 { 54 if (guarantee.equals("INTEGRAL")) 55 _transportGuarantee = guarantee; 56 else if (guarantee.equals("CONFIDENTIAL")) 57 _transportGuarantee = guarantee; 58 else if (guarantee.equals("NONE")) 59 _transportGuarantee = null; 60 else 61 throw new ServletConfigException(L.l("`{0}' is an unknown transport-guarantee. transport-guarantee must be 'INTEGRAL' or 'CONFIDENTIAL'.", 62 guarantee)); 63 } 64 65 68 public String getTransportGuarantee() 69 { 70 return _transportGuarantee; 71 } 72 } 73 74 75 | Popular Tags |