PAPIAttributes papiAttributes)
throws PAPIException {
MarinerPageContext pageContext =
ContextInternals.getMarinerPageContext(context);
SelectAttributes attributes = (SelectAttributes) papiAttributes;
Precept precept = Precept.MATCH_FIRST;
Value expr = BooleanValue.TRUE;
if (attributes.getPrecept() != null) {
precept = Precept.literal(attributes.getPrecept());
if (precept == null) {
throw new PAPIException(exceptionLocalizer.format(
"unrecognized-precept-value",
attributes.getPrecept()));
}
}
if (attributes.getExpr() != null) {
ExpressionContext expressionContext =
ContextInternals.getEnvironmentContext(context).
getExpressionContext();
try {
expr = expressionContext.getFactory().
createExpressionParser().
parse(attributes.getExpr()).evaluate(expressionContext);
} catch (ExpressionException e) {
throw new PAPIException(e);
}
}