|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
org.apache.jetspeed.profiler.impl.JetspeedProfilerImpl
public class JetspeedProfilerImpl
JetspeedTransactionalProfiler
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_RULE
The default rule. |
static java.security.Principal |
DEFAULT_RULE_PRINCIPAL
This is the princapl that is used if there are no principal to rule associations for the current principal |
protected static org.apache.commons.logging.Log |
log
Commons logging |
Fields inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport |
---|
repositoryPath |
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
JetspeedProfilerImpl(java.lang.String repositoryPath,
ProfileResolvers resolvers)
|
|
JetspeedProfilerImpl(java.lang.String repositoryPath,
java.lang.String defaultRule,
ProfileResolvers resolvers)
Create a JetspeedProfiler with properties. |
|
JetspeedProfilerImpl(java.lang.String repositoryPath,
java.lang.String defaultRule,
ProfileResolvers resolvers,
java.util.Map ruleConstructors,
java.lang.String ruleCriterionBean)
support passing of rule creation classes |
|
JetspeedProfilerImpl(java.lang.String repositoryPath,
java.lang.String defaultRule,
java.util.Properties properties,
ProfileResolvers resolvers)
Deprecated. As of release 2.1, property-based class references replaced by container managed bean factory |
Method Summary | |
---|---|
ProfileLocator |
createLocator(RequestContext context)
Creates a new ProfileLocator object that can be managed by the current Profiler implementation |
PrincipalRule |
createPrincipalRule()
Factory for PrincipalRule, the container to connect profiling rule and (user) prinicpal |
ProfilingRule |
createProfilingRule(boolean standard)
Factory for Profiling Rule. |
RuleCriterion |
createRuleCriterion()
Factory for Rule Criterion |
void |
deletePrincipalRule(PrincipalRule rule)
|
void |
deleteProfilingRule(ProfilingRule rule)
|
ProfileLocator |
getDefaultProfile(RequestContext context,
java.lang.String locatorName)
getDefaultProfile |
java.util.Map |
getDefaultProfileLocators(RequestContext context)
getDefaultProfileLocators |
ProfilingRule |
getDefaultRule()
Lookup the portal's default profiling rule. |
java.lang.String[] |
getLocatorNamesForPrincipal(java.security.Principal principal)
For a given principal, find all supported locators and return a string array of locator names. |
ProfileLocator |
getProfile(RequestContext context,
ProfilingRule rule)
Get the Profile object using the request parameters and the rule. |
ProfileLocator |
getProfile(RequestContext context,
java.lang.String locatorName)
Get the Profile object using the request parameters. |
java.util.Map |
getProfileLocators(RequestContext context,
java.security.Principal principal)
Gets all supported locators for a principal. |
ProfilingRule |
getRule(java.lang.String id)
Given a rule id, get the rule |
ProfilingRule |
getRuleForPrincipal(java.security.Principal principal,
java.lang.String locatorName)
For a given principal, lookup the associated profiling rule to that principal name. |
java.util.Collection |
getRules()
|
java.util.Collection |
getRulesForPrincipal(java.security.Principal principal)
For a given principal, find all supported locators and return a collection of principal rules. |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
|
void |
setDefaultRule(java.lang.String defaultRule)
Resets the default rule for this portal |
void |
setRuleForPrincipal(java.security.Principal principal,
ProfilingRule rule,
java.lang.String locatorName)
For a given principal, associate a profiling rule to that principal name. |
void |
storePrincipalRule(PrincipalRule rule)
|
void |
storeProfilingRule(ProfilingRule rule)
|
Methods inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport |
---|
init |
Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport |
---|
checkDaoConfig, closePersistenceBrokerIfNecessary, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_RULE
protected static final org.apache.commons.logging.Log log
public static final java.security.Principal DEFAULT_RULE_PRINCIPAL
Constructor Detail |
---|
public JetspeedProfilerImpl(java.lang.String repositoryPath, ProfileResolvers resolvers)
public JetspeedProfilerImpl(java.lang.String repositoryPath, java.lang.String defaultRule, ProfileResolvers resolvers) throws java.lang.ClassNotFoundException
properties
- Properties for this component described above
java.lang.ClassNotFoundException
- if any the implementation classes defined within the
properties
argument could not be found.public JetspeedProfilerImpl(java.lang.String repositoryPath, java.lang.String defaultRule, java.util.Properties properties, ProfileResolvers resolvers) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public JetspeedProfilerImpl(java.lang.String repositoryPath, java.lang.String defaultRule, ProfileResolvers resolvers, java.util.Map ruleConstructors, java.lang.String ruleCriterionBean) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
Method Detail |
---|
public void setDefaultRule(java.lang.String defaultRule)
Profiler
setDefaultRule
in interface Profiler
defaultRule
- The default rule to set.public ProfileLocator getProfile(RequestContext context, java.lang.String locatorName) throws ProfilerException
Profiler
getProfile
in interface Profiler
context
- The request contextlocatorName
- The name of the profile locator to find i.e. "page", "docset", ...
ProfilerException
public ProfileLocator getDefaultProfile(RequestContext context, java.lang.String locatorName) throws ProfilerException
Profiler
getDefaultProfile
Intstead of using the princpal found within the request, the DEFAULT_RULE_PRINCIPAL is used.
getDefaultProfile
in interface Profiler
context
- The request contextlocatorName
- The name of the profile locator to find i.e. "page", "docset", ...
ProfilerException
public ProfileLocator getProfile(RequestContext context, ProfilingRule rule) throws ProfilerException
Profiler
getProfile
in interface Profiler
context
- The request context
ProfilerException
public ProfilingRule getRuleForPrincipal(java.security.Principal principal, java.lang.String locatorName)
Profiler
getRuleForPrincipal
in interface Profiler
principal
- Lookup the profiling rule based on this principal.locatorName
- the unique name of a locator for this principal/rule/locator
public void setRuleForPrincipal(java.security.Principal principal, ProfilingRule rule, java.lang.String locatorName)
Profiler
setRuleForPrincipal
in interface Profiler
principal
- Lookup the profiling rule based on this principal.locatorName
- the unique name of a locator for this principal/rule/locatorpublic ProfilingRule getDefaultRule()
Profiler
getDefaultRule
in interface Profiler
public java.util.Collection getRules()
getRules
in interface Profiler
public ProfilingRule getRule(java.lang.String id)
Profiler
getRule
in interface Profiler
public java.lang.String[] getLocatorNamesForPrincipal(java.security.Principal principal)
Profiler
getLocatorNamesForPrincipal
in interface Profiler
principal
- The given principal.
public java.util.Collection getRulesForPrincipal(java.security.Principal principal)
Profiler
getRulesForPrincipal
in interface Profiler
principal
- The given principal.
public java.util.Map getProfileLocators(RequestContext context, java.security.Principal principal) throws ProfilerException
Profiler
getProfileLocators
in interface Profiler
ProfilerException
public java.util.Map getDefaultProfileLocators(RequestContext context) throws ProfilerException
Profiler
getDefaultProfileLocators
Gets all the supported locators for the DEFAULT_RULE_PRINCIPAL
getDefaultProfileLocators
in interface Profiler
ProfilerException
public void storeProfilingRule(ProfilingRule rule) throws ProfilerException
storeProfilingRule
in interface Profiler
ProfilerException
public void deleteProfilingRule(ProfilingRule rule) throws ProfilerException
deleteProfilingRule
in interface Profiler
ProfilerException
public void storePrincipalRule(PrincipalRule rule) throws ProfilerException
storePrincipalRule
in interface Profiler
ProfilerException
public void deletePrincipalRule(PrincipalRule rule) throws ProfilerException
deletePrincipalRule
in interface Profiler
ProfilerException
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
public ProfilingRule createProfilingRule(boolean standard) throws java.lang.ClassNotFoundException
Profiler
createProfilingRule
in interface Profiler
standard
- true if standard rule is requested, false if fallback
java.lang.ClassNotFoundException
- if the beanfactory couldn't instantiate the beanpublic ProfileLocator createLocator(RequestContext context)
Profiler
createLocator
in interface Profiler
context
- The request context
public PrincipalRule createPrincipalRule() throws java.lang.ClassNotFoundException
Profiler
Replaces the previous Class.forName and .instantiate logic with the Spring based factory.
createPrincipalRule
in interface Profiler
java.lang.ClassNotFoundException
- if the beanfactory couldn't instantiate the beanpublic RuleCriterion createRuleCriterion() throws java.lang.ClassNotFoundException
Profiler
createRuleCriterion
in interface Profiler
java.lang.ClassNotFoundException
- if the beanfactory couldn't instantiate the bean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |