| org.apache.jetspeed.profiler.Profiler
All known Subclasses: org.apache.jetspeed.profiler.impl.JetspeedProfilerImpl,
Profiler | public interface Profiler (Code) | | ProfilerService
Jetspeed-2 Profiler service.
Locates portal resources given a set of request parameters, properties, and attributes
The Profiler is invoked during the request processing pipeline.
It requires that the request context is already populated with the portal request and response,
and capability and user information. The request context parameters, properties and attributes
make up the profile criterion which the profiler uses to locate portal resources:
1. page
2. navigations
3. document lists
In all cases, a fallback algorithm should be applied to fallback
to default portal resources.
author: David Sean Taylor version: $Id: Profiler.java 516881 2007-03-11 10:34:21Z ate $ |
Method Summary | |
ProfileLocator | createLocator(RequestContext context) | public PrincipalRule | createPrincipalRule() Factory for PrincipalRule, the container to connect profiling rule and
(user) prinicpal
Replaces the previous Class.forName and .instantiate logic with the
Spring based factory. | public ProfilingRule | createProfilingRule(boolean standard) Factory for Profiling Rule. | public RuleCriterion | createRuleCriterion() | void | deletePrincipalRule(PrincipalRule rule) | void | deleteProfilingRule(ProfilingRule rule) | ProfileLocator | getDefaultProfile(RequestContext context, String locatorName)
getDefaultProfile
Intstead of using the princpal found within the request, the DEFAULT_RULE_PRINCIPAL is used.
Parameters: context - The request context Parameters: locatorName - The name of the profile locator to find i.e. | Map | getDefaultProfileLocators(RequestContext context) | ProfilingRule | getDefaultRule() Lookup the portal's default profiling rule. | String[] | getLocatorNamesForPrincipal(Principal principal) For a given principal, find all supported locators and return a string
array of locator names.
Parameters: principal - The given principal. | ProfileLocator | getProfile(RequestContext context, String locatorName) Get the Profile object using the request parameters.
Parameters: context - The request context Parameters: locatorName - The name of the profile locator to find i.e. | ProfileLocator | getProfile(RequestContext context, ProfilingRule rule) Get the Profile object using the request parameters and the rule. | Map | getProfileLocators(RequestContext context, Principal principal) Gets all supported locators for a principal. | ProfilingRule | getRule(String id) | ProfilingRule | getRuleForPrincipal(Principal principal, String locatorName) For a given principal, lookup the associated profiling rule to that principal name.
Parameters: principal - Lookup the profiling rule based on this principal. | Collection | getRules() | Collection | getRulesForPrincipal(Principal principal) For a given principal, find all supported locators and return a
collection of principal rules.
Parameters: principal - The given principal. | public void | setDefaultRule(String defaultRule) | void | setRuleForPrincipal(Principal principal, ProfilingRule rule, String locatorName) For a given principal, associate a profiling rule to that principal name. | void | storePrincipalRule(PrincipalRule rule) | void | storeProfilingRule(ProfilingRule rule) |
createLocator | ProfileLocator createLocator(RequestContext context)(Code) | | Creates a new ProfileLocator object that can be managed by
the current Profiler implementation
Parameters: context - The request context A new ProfileLocator object |
createPrincipalRule | public PrincipalRule createPrincipalRule() throws ClassNotFoundException(Code) | | Factory for PrincipalRule, the container to connect profiling rule and
(user) prinicpal
Replaces the previous Class.forName and .instantiate logic with the
Spring based factory.
New instance of a principal rule throws: ClassNotFoundException - if the beanfactory couldn't instantiate the bean |
createProfilingRule | public ProfilingRule createProfilingRule(boolean standard) throws ClassNotFoundException(Code) | | Factory for Profiling Rule. The boolean argument specifies whether to
obtain a new instance of a standard profiling rule or of a fallback rule.
Parameters: standard - true if standard rule is requested, false if fallback New instance of a (standard or fallback) Profiling Rule throws: ClassNotFoundException - if the beanfactory couldn't instantiate the bean |
getDefaultProfile | ProfileLocator getDefaultProfile(RequestContext context, String locatorName) throws ProfilerException(Code) | |
getDefaultProfile
Intstead of using the princpal found within the request, the DEFAULT_RULE_PRINCIPAL is used.
Parameters: context - The request context Parameters: locatorName - The name of the profile locator to find i.e. "page", "docset", ... a new Profile Locator object or null if failed to find a appropriate locator. |
getDefaultRule | ProfilingRule getDefaultRule()(Code) | | Lookup the portal's default profiling rule.
The portal's default profiling rule. |
getLocatorNamesForPrincipal | String[] getLocatorNamesForPrincipal(Principal principal)(Code) | | For a given principal, find all supported locators and return a string
array of locator names.
Parameters: principal - The given principal. array of String locator names |
getProfile | ProfileLocator getProfile(RequestContext context, String locatorName) throws ProfilerException(Code) | | Get the Profile object using the request parameters.
Parameters: context - The request context Parameters: locatorName - The name of the profile locator to find i.e. "page", "docset", ... a new Profile Locator object or null if failed to find a appropriate locator. |
getRuleForPrincipal | ProfilingRule getRuleForPrincipal(Principal principal, String locatorName)(Code) | | For a given principal, lookup the associated profiling rule to that principal name.
Parameters: principal - Lookup the profiling rule based on this principal. Parameters: locatorName - the unique name of a locator for this principal/rule/locator The rule found or null if not found |
getRulesForPrincipal | Collection getRulesForPrincipal(Principal principal)(Code) | | For a given principal, find all supported locators and return a
collection of principal rules.
Parameters: principal - The given principal. collection of PrincipalRules |
setDefaultRule | public void setDefaultRule(String defaultRule)(Code) | | Resets the default rule for this portal
Parameters: defaultRule - The default rule to set. |
setRuleForPrincipal | void setRuleForPrincipal(Principal principal, ProfilingRule rule, String locatorName)(Code) | | For a given principal, associate a profiling rule to that principal name.
TODO: this API should be secured and require admin role
Parameters: principal - Lookup the profiling rule based on this principal. Parameters: locatorName - the unique name of a locator for this principal/rule/locator Parameters: The - rule used to find profiles for this user |
|
|