org.apache.jetspeed.profiler.rules
Interface ProfilingRule

All Superinterfaces:
Serializable

public interface ProfilingRule
extends Serializable

A ProfilingRule defines a list of criteria used when evaluating a request to determine the location of a specific resource. Profiling rules are used by the Profiler Service to generically locate portal resources based on the decoupled criteria for known portlet request data. A rule consists of an ordered list of criteria which should be applied in the given order of the SortedMap provided by this rule. Following this order, fallback searches may be applied to find resources using a less-specific algorithm until the least specific resource criterion is considered. When all criteria are exhausted, the rule will fail.

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

Field Summary
static String CCPP_PROPERTY
          Composite Capabilities and Preference Profile as defined http://www.w3.org/TR/NOTE-CCPP/
static String REQUEST_ATTRIBUTE
          Request attributes as defined in the Portlet spec 1.0 PLT.11.1.3
static String REQUEST_PARAMETER
          Request parameters as defined in the Portlet spec 1.0 PLT.11.1.1
static String SESSION_ATTRIBUTE
          Session Attribute
static String STANDARD
          Standard rule criteria used by Jetspeed traditionally such as media type, language, username, role
static String STANDARD_COUNTRY
           
static String STANDARD_GROUP
           
static String STANDARD_GROUP_ROLE_USER
           
static String STANDARD_LANGUAGE
           
static String STANDARD_MEDIATYPE
           
static String STANDARD_PAGE
          Standard properties used traditionally in Jetspeed
static String STANDARD_ROLE
           
static String STANDARD_ROLE_FALLBACK
           
static String STANDARD_USER
           
static String USER_ATTRIBUTE
          User attributes as defined in the Portlet spec 1.0 PLT.17
 
Method Summary
 ProfileLocator apply(RequestContext context, Profiler service)
          Applying the profiling rule generates a generic profile locator.
 String getClassname()
          Get the implementing classname of this rule from the database.
 String getId()
          Gets the unique identifier for this rule
 RuleCriterionResolver getResolver(String name)
          Given a criterion name, look up a value resolver
 ProfileResolvers getResolvers()
           
 Collection getRuleCriteria()
          Returns a sorted map (ordered) of rule criteria.
 String getTitle()
          Gets the title used for with the rule for displaying descriptive text.
 void setClassname(String classname)
          Sets the implementing classname of this rule from the database.
 void setId(String id)
          Sets the unique identifier for this rule
 void setResolvers(ProfileResolvers resolvers)
           
 void setTitle(String title)
          Set the title used for with the rule for displaying descriptive text.
 

Field Detail

STANDARD

static final String STANDARD
Standard rule criteria used by Jetspeed traditionally such as media type, language, username, role

See Also:
Constant Field Values

REQUEST_PARAMETER

static final String REQUEST_PARAMETER
Request parameters as defined in the Portlet spec 1.0 PLT.11.1.1

See Also:
Constant Field Values

REQUEST_ATTRIBUTE

static final String REQUEST_ATTRIBUTE
Request attributes as defined in the Portlet spec 1.0 PLT.11.1.3

See Also:
Constant Field Values

SESSION_ATTRIBUTE

static final String SESSION_ATTRIBUTE
Session Attribute

See Also:
Constant Field Values

USER_ATTRIBUTE

static final String USER_ATTRIBUTE
User attributes as defined in the Portlet spec 1.0 PLT.17

See Also:
Constant Field Values

CCPP_PROPERTY

static final String CCPP_PROPERTY
Composite Capabilities and Preference Profile as defined http://www.w3.org/TR/NOTE-CCPP/

See Also:
Constant Field Values

STANDARD_PAGE

static final String STANDARD_PAGE
Standard properties used traditionally in Jetspeed

See Also:
Constant Field Values

STANDARD_GROUP_ROLE_USER

static final String STANDARD_GROUP_ROLE_USER
See Also:
Constant Field Values

STANDARD_USER

static final String STANDARD_USER
See Also:
Constant Field Values

STANDARD_GROUP

static final String STANDARD_GROUP
See Also:
Constant Field Values

STANDARD_ROLE

static final String STANDARD_ROLE
See Also:
Constant Field Values

STANDARD_MEDIATYPE

static final String STANDARD_MEDIATYPE
See Also:
Constant Field Values

STANDARD_COUNTRY

static final String STANDARD_COUNTRY
See Also:
Constant Field Values

STANDARD_LANGUAGE

static final String STANDARD_LANGUAGE
See Also:
Constant Field Values

STANDARD_ROLE_FALLBACK

static final String STANDARD_ROLE_FALLBACK
See Also:
Constant Field Values
Method Detail

getResolver

RuleCriterionResolver getResolver(String name)
Given a criterion name, look up a value resolver

Parameters:
name - The name of the criterion
Returns:

apply

ProfileLocator apply(RequestContext context,
                     Profiler service)
Applying the profiling rule generates a generic profile locator. With this locator we can then locate a profiling resource.

Parameters:
context -
service -
Returns:

getRuleCriteria

Collection getRuleCriteria()
Returns a sorted map (ordered) of rule criteria. Each criteria consists of a normalized property/attribute/parameter associated with a request type.

Returns:
a sorted map of rule criteria.

getId

String getId()
Gets the unique identifier for this rule

Returns:
The unique identifier

setId

void setId(String id)
Sets the unique identifier for this rule

Parameters:
id - The unique identifier

getTitle

String getTitle()
Gets the title used for with the rule for displaying descriptive text.

Returns:
The title of this rule.

setTitle

void setTitle(String title)
Set the title used for with the rule for displaying descriptive text.

Parameters:
title - The title of this rule.

getClassname

String getClassname()
Get the implementing classname of this rule from the database. The class must exist in the hiearchy and in fact refers to itself when instantiated.

Returns:
The classname of this instance.

setClassname

void setClassname(String classname)
Sets the implementing classname of this rule from the database. The class must exist in the hiearchy and in fact refers to itself when instantiated.

Parameters:
classname - The classname of this instance.

getResolvers

ProfileResolvers getResolvers()

setResolvers

void setResolvers(ProfileResolvers resolvers)


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