[Sunxacml-commit] sunxacml/com/sun/xacml/attr AttributeSelector.java,1.6,1.7
Brought to you by:
farrukh_najmi,
sethp
From: Seth P. <se...@us...> - 2004-05-06 21:10:57
|
Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26623/com/sun/xacml/attr Modified Files: AttributeSelector.java Log Message: updated to use the new, correct EvaluationCtx interface Index: AttributeSelector.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr/AttributeSelector.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AttributeSelector.java 17 Mar 2004 18:03:38 -0000 1.6 --- AttributeSelector.java 6 May 2004 21:10:35 -0000 1.7 *************** *** 46,51 **** import com.sun.xacml.ctx.Status; - import com.sun.xacml.finder.AttributeFinder; - import java.io.OutputStream; import java.io.PrintStream; --- 46,49 ---- *************** *** 61,69 **** /** * Supports the standard selector functionality in XACML, which uses XPath ! * expressions to resolve values from the Request or elsewhere. Unlike ! * the designator class, which does the Request search and then passes off ! * control to the <code>AttributeFinder</code>, all selector queries are ! * done by <code>AttributeFinderModule</code>s so that it's easy to plugin ! * different XPath implementations. * * @since 1.0 --- 59,65 ---- /** * Supports the standard selector functionality in XACML, which uses XPath ! * expressions to resolve values from the Request or elsewhere. All selector ! * queries are done by <code>AttributeFinderModule</code>s so that it's easy ! * to plugin different XPath implementations. * * @since 1.0 *************** *** 237,250 **** */ public EvaluationResult evaluate(EvaluationCtx context) { ! AttributeFinder finder = context.getAttributeFinder(); ! ! if (finder == null) { ! // if we're not using a finder, then we can't find anything ! return new EvaluationResult(BagAttribute.createEmptyBag(type)); ! } ! ! // call the finder ! EvaluationResult result = finder.findAttribute(contextPath, type, ! context, xpathVersion); // see if we got anything --- 233,239 ---- */ public EvaluationResult evaluate(EvaluationCtx context) { ! // query the context ! EvaluationResult result = context.getAttribute(contextPath, type, ! xpathVersion); // see if we got anything |