* @param context the evaluation context
*
* @return an applicable policy, if one exists, or an error
*/
public PolicyFinderResult findPolicy(EvaluationCtx context) {
AbstractPolicy selectedPolicy = null;
Iterator it = policies.iterator();
// iterate through all the policies we currently have loaded
while (it.hasNext()) {
AbstractPolicy policy = (AbstractPolicy)(it.next());
MatchResult match = policy.match(context);
int result = match.getResult();
// if target matching was indeterminate, then return the error
if (result == MatchResult.INDETERMINATE)
return new PolicyFinderResult(match.getStatus());