org.apache.jetspeed.profiler.rules
Interface RuleCriterionResolver

All Superinterfaces:
Serializable

public interface RuleCriterionResolver
extends Serializable

Resolves rule criterion based on a single criterion and runtime request context state. Note all resolvers should look at the criterion's value if they fail to find it

Version:
$Id: RuleCriterionResolver.java 516448 2007-03-09 16:25:47Z ate $
Author:
David Sean Taylor

Field Summary
static String COUNTRY
          first check request parameter, then check country code in the request context
static String GROUP
          first check request parameter, then check group in the request context
static String GROUP_ROLE_USER
          look for group, then role, then user
static String HARD_CODED
          look at hard-coded criterion value only
static String LANGUAGE
          first check request parameter, then check language in the request context
static String MEDIATYPE
          first check request parameter, then check media type in the request context
static String NAVIGATION
          change the current navigation path
static String PAGE
          resolve the parameter via the request path, then value
static String PATH
          resolve the parameter via the request path, then value
static String PATH_SESSION
          look in the request path first, then session
static String REQUEST
          resolve the parameter via the request parameter, then value
static String REQUEST_SESSION
          look in the request first, then session
static String ROLE
          first check request parameter, then check role in the request context
static String ROLE_FALLBACK
           
static String SESSION
          resolve the parameter via a session attribute
static String USER
          first check request parameter, then check user in the request context
static String USER_AGENT
          first check request parameter, then user agent in the request context
static String USER_ATTRIBUTE
          look in user attributes
 
Method Summary
 boolean isControl(RuleCriterion criterion)
          Gets the control classification of the resolver.
 boolean isNavigation(RuleCriterion criterion)
          Gets the navigation classification of the resolver.
 String resolve(RequestContext context, RuleCriterion criterion)
          Resolver the value for a criterion.
 

Field Detail

REQUEST

static final String REQUEST
resolve the parameter via the request parameter, then value

See Also:
Constant Field Values

SESSION

static final String SESSION
resolve the parameter via a session attribute

See Also:
Constant Field Values

REQUEST_SESSION

static final String REQUEST_SESSION
look in the request first, then session

See Also:
Constant Field Values

HARD_CODED

static final String HARD_CODED
look at hard-coded criterion value only

See Also:
Constant Field Values

GROUP_ROLE_USER

static final String GROUP_ROLE_USER
look for group, then role, then user

See Also:
Constant Field Values

USER

static final String USER
first check request parameter, then check user in the request context

See Also:
Constant Field Values

GROUP

static final String GROUP
first check request parameter, then check group in the request context

See Also:
Constant Field Values

ROLE

static final String ROLE
first check request parameter, then check role in the request context

See Also:
Constant Field Values

MEDIATYPE

static final String MEDIATYPE
first check request parameter, then check media type in the request context

See Also:
Constant Field Values

COUNTRY

static final String COUNTRY
first check request parameter, then check country code in the request context

See Also:
Constant Field Values

USER_AGENT

static final String USER_AGENT
first check request parameter, then user agent in the request context

See Also:
Constant Field Values

LANGUAGE

static final String LANGUAGE
first check request parameter, then check language in the request context

See Also:
Constant Field Values

ROLE_FALLBACK

static final String ROLE_FALLBACK
See Also:
Constant Field Values

PATH

static final String PATH
resolve the parameter via the request path, then value

See Also:
Constant Field Values

PAGE

static final String PAGE
resolve the parameter via the request path, then value

See Also:
Constant Field Values

PATH_SESSION

static final String PATH_SESSION
look in the request path first, then session

See Also:
Constant Field Values

USER_ATTRIBUTE

static final String USER_ATTRIBUTE
look in user attributes

See Also:
Constant Field Values

NAVIGATION

static final String NAVIGATION
change the current navigation path

See Also:
Constant Field Values
Method Detail

resolve

String resolve(RequestContext context,
               RuleCriterion criterion)
Resolver the value for a criterion.

Parameters:
context - The request context.
criterion - The criterion being evaluated.
Returns:
The value of the criterion or null if not found. Returns null to indicate to subclasses to continue processing.

isControl

boolean isControl(RuleCriterion criterion)
Gets the control classification of the resolver.

Returns:
The control class flag

isNavigation

boolean isNavigation(RuleCriterion criterion)
Gets the navigation classification of the resolver.

Returns:
The control class flag


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.