/** * Notification that the session is about to be passivated. * * @param event session activation event */ public void sessionWillPassivate(HttpSessionEvent event) { evictPrincipal(); }
public String toString() { return getRequestPath() + ProfileLocator.PATH_SEPARATOR + getLocatorPath(); }
public void add(String name, String value) { add(name, true, false, value); }
public Map<String, ProfileLocator> getProfileLocators(RequestContext context, Principal principal) throws ProfilerException { // setup/maintain profiler context for session end notification setupProfilerContext(context); // get profile locators Map<String, ProfileLocator> locators = new HashMap<String, ProfileLocator>(); Collection<PrincipalRule> rules = getRulesForPrincipal(principal); for (PrincipalRule pr : rules) { locators.put(pr.getLocatorName(), getProfile(context, pr.getLocatorName())); } return locators; }
/** * @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext, org.apache.jetspeed.pipeline.valve.ValveContext) */ public void invoke(RequestContext request, ValveContext context) throws PipelineException { boolean created = false; try { created = createUserFolderPages(request); } catch (Exception e) { log.error("Exception occurred during creating user folder.", e); } finally { if (created) { super.invoke(request, context); } else { context.invokeNext(request); } } }
public Map<String, ProfileLocator> getDefaultProfileLocators(RequestContext context) throws ProfilerException { // get default profile locators Map<String, ProfileLocator> locators = new HashMap<String, ProfileLocator>(); Collection<PrincipalRule> rules = getRulesForPrincipal(DEFAULT_RULE_PRINCIPAL); for (PrincipalRule pr : rules) { locators.put(pr.getLocatorName(), getDefaultProfile(context, pr.getLocatorName())); } return locators; }
public void deleteProfilingRule(ProfilingRule rule) throws ProfilerException { getPersistenceBrokerTemplate().delete(rule); }
public void add(RuleCriterion criterion, boolean isControl, boolean isNavigation, String value) { elements.add(new ProfileLocatorPropertyImpl(criterion, isControl, isNavigation, value)); }
public ProfileFallbackIterator(ProfileLocatorControl locator) { this.locator = locator; last = locator.getElements().size() - 1; }
/** * @deprecated As of release 2.1, property-based class references replaced * by container managed bean factory */ public JetspeedProfilerImpl(String repositoryPath, String defaultRule, Properties properties, ProfileResolvers resolvers) throws ClassNotFoundException { this(repositoryPath, defaultRule, resolvers); initModelClasses(properties); // TODO: move this to // start() }
/** * support passing of rule creation classes */ public JetspeedProfilerImpl(String repositoryPath, String defaultRule, ProfileResolvers resolvers, Map<String,String> ruleConstructors, String ruleCriterionBean) throws ClassNotFoundException { this(repositoryPath, defaultRule, resolvers); this.ruleCriterionBean = ruleCriterionBean; initRuleClasses(ruleConstructors); }
public ProfilingRule getDefaultRule() { return getRule(this.defaultRule); }
public void init(Profiler profiler, String requestPath) { init(profiler, requestPath, null); }
public Iterator<ProfileLocatorProperty []> iterator() { return new ProfileFallbackIterator(this); }
public void storeProfilingRule(ProfilingRule rule) throws ProfilerException { getPersistenceBrokerTemplate().store(rule); }
/** * Notifies this context that it is being unbound * from a session and identifies the session. * * @param event session binding event */ public void valueUnbound(HttpSessionBindingEvent event) { evictPrincipal(); }
public void createFromLocatorPath(String path) { elements.clear(); StringTokenizer tokenizer = new StringTokenizer(path, ProfileLocator.PATH_SEPARATOR); while (tokenizer.hasMoreTokens()) { String name = tokenizer.nextToken(); if (tokenizer.hasMoreTokens()) { String value = tokenizer.nextToken(); this.add(name, true, false, value); } } }
public void add(String name, boolean isControl, boolean isNavigation, String value) { elements.add(new ProfileLocatorPropertyImpl(name, isControl, isNavigation, value)); }
public boolean hasNext() { boolean hasNext = false; List elements = locator.getElements(); if (last < 0 || last >= elements.size()) { state = RuleCriterion.FALLBACK_STOP; return false; } if (state == RuleCriterion.FALLBACK_STOP) { hasNext = false; } else if (state == RuleCriterion.FALLBACK_CONTINUE || state == RuleCriterion.FALLBACK_LOOP) { hasNext = true; } return hasNext; }
public void storePrincipalRule(PrincipalRule rule) throws ProfilerException { getPersistenceBrokerTemplate().store(rule); }