Class ServletPolicyList


  • public class ServletPolicyList
    extends Object
    This maintains a PolicyList in the ServletContext. As a rule, however, this is only used as the basis for the RequestPolicyList. Client code that wants to access the current list of policies should look there.
    • Constructor Detail

      • ServletPolicyList

        public ServletPolicyList()
    • Method Detail

      • getPolicies

        public static PolicyIface getPolicies​(javax.servlet.http.HttpServletRequest hreq)
        Get a copy of the current list of policies. This method may return an empty list, but it never returns null.
      • getPolicies

        public static PolicyList getPolicies​(javax.servlet.ServletContext sc)
        Get a copy of the current list of policies. This method may return an empty list, but it never returns null.
      • addPolicy

        public static void addPolicy​(javax.servlet.ServletContext sc,
                                     PolicyIface policy)
        Add the policy to the end of the list.
      • addPolicyAtFront

        public static void addPolicyAtFront​(javax.servlet.ServletContext sc,
                                            PolicyIface policy)
        Add the policy to the front of the list. It may be moved further down the list by other policies that are later added using this method.
      • replacePolicy

        public static void replacePolicy​(javax.servlet.ServletContext sc,
                                         PolicyIface policy)
        Replace the first instance of this class of policy in the list. If no instance is found, add the policy to the end of the list.