Class ServletPolicyList
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.auth.policy.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 Summary
Constructors Constructor Description ServletPolicyList()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddPolicy(javax.servlet.ServletContext sc, PolicyIface policy)Add the policy to the end of the list.static voidaddPolicyAtFront(javax.servlet.ServletContext sc, PolicyIface policy)Add the policy to the front of the list.static PolicyIfacegetPolicies(javax.servlet.http.HttpServletRequest hreq)Get a copy of the current list of policies.static PolicyListgetPolicies(javax.servlet.ServletContext sc)Get a copy of the current list of policies.static voidreplacePolicy(javax.servlet.ServletContext sc, PolicyIface policy)Replace the first instance of this class of policy in the list.
-
-
-
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.
-
-