org.apache.jetspeed.profiler.rules
Interface RuleCriterionResolver

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
FallbackCriterionResolver

public interface RuleCriterionResolver
extends java.io.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 java.lang.String COUNTRY
          first check request parameter, then check country code in the request context
static java.lang.String GROUP
          first check request parameter, then check group in the request context
static java.lang.String GROUP_ROLE_USER
          look for group, then role, then user
static java.lang.String HARD_CODED
          look at hard-coded criterion value only
static java.lang.String LANGUAGE
          first check request parameter, then check language in the request context
static java.lang.String MEDIATYPE
          first check request parameter, then check media type in the request context
static java.lang.String NAVIGATION
          change the current navigation path
static java.lang.String PAGE
          resolve the parameter via the request path, then value
static java.lang.String PATH
          resolve the parameter via the request path, then value
static java.lang.String PATH_SESSION
          look in the request path first, then session
static java.lang.String REQUEST
          resolve the parameter via the request parameter, then value
static java.lang.String REQUEST_SESSION
          look in the request first, then session
static java.lang.String ROLE
          first check request parameter, then check role in the request context
static java.lang.String ROLE_FALLBACK
           
static java.lang.String SESSION
          resolve the parameter via a session attribute
static java.lang.String USER
          first check request parameter, then check user in the request context
static java.lang.String USER_AGENT
          first check request parameter, then user agent in the request context
static java.lang.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.
 java.lang.String resolve(RequestContext context, RuleCriterion criterion)
          Resolver the value for a criterion.
 

Field Detail

REQUEST

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

See Also:
Constant Field Values

SESSION

static final java.lang.String SESSION
resolve the parameter via a session attribute

See Also:
Constant Field Values

REQUEST_SESSION

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

See Also:
Constant Field Values

HARD_CODED

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

See Also:
Constant Field Values

GROUP_ROLE_USER

static final java.lang.String GROUP_ROLE_USER
look for group, then role, then user

See Also:
Constant Field Values

USER

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

See Also:
Constant Field Values

GROUP

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

See Also:
Constant Field Values

ROLE

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

See Also:
Constant Field Values

MEDIATYPE

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

See Also:
Constant Field Values

COUNTRY

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

See Also:
Constant Field Values

USER_AGENT

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

See Also:
Constant Field Values

LANGUAGE

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

See Also:
Constant Field Values

ROLE_FALLBACK

static final java.lang.String ROLE_FALLBACK
See Also:
Constant Field Values

PATH

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

See Also:
Constant Field Values

PAGE

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

See Also:
Constant Field Values

PATH_SESSION

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

See Also:
Constant Field Values

USER_ATTRIBUTE

static final java.lang.String USER_ATTRIBUTE
look in user attributes

See Also:
Constant Field Values

NAVIGATION

static final java.lang.String NAVIGATION
change the current navigation path

See Also:
Constant Field Values
Method Detail

resolve

java.lang.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-2011 The Apache Software Foundation. All Rights Reserved.