1 28 29 package com.caucho.server.security; 30 31 import javax.servlet.ServletContext ; 32 import javax.servlet.ServletException ; 33 import javax.servlet.http.HttpServletRequest ; 34 import javax.servlet.http.HttpServletResponse ; 35 import java.io.IOException ; 36 37 abstract public class AbstractConstraint { 38 41 public boolean needsAuthentication() 42 { 43 return false; 44 } 45 46 49 public boolean isPrivateCache() 50 { 51 return true; 52 } 53 54 68 abstract public boolean isAuthorized(HttpServletRequest request, 69 HttpServletResponse response, 70 ServletContext application) 71 throws ServletException , IOException ; 72 73 76 protected AbstractConstraint []toArray() 77 { 78 return new AbstractConstraint[] { this }; 79 } 80 } 81 | Popular Tags |