/** Retrieve appropriate pattern by matching patterns with supplied path. */ public String getPatternInUse(String path) { if (path == null) path = "/"; String result = findExactKey(path); if (result == null) result = findComplexKey(path); if (result == null) result = findDefaultKey(); return result; }
protected void reloadIfNecessary() throws ServletException { // TODO: Allow finer grained control of reload strategies: // - don't check file timestamp on every single request (once per N seconds). // - periodically check in background, instead of blocking request threads. if (autoReload && reloadRequired()) { synchronized (configLock) { // Double check lock for performance (works in JDK5+, with volatile items). if (reloadRequired()) { deployNewFilter(setup()); } } } }
public MetaTagBasedDecoratorSelector put(String contentPath, String... decoratorPaths) { super.put(contentPath, decoratorPaths); return this; }
public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; configProperties = getConfigProperties(filterConfig); autoReload = getAutoReload(); logger.config("Auto reloading " + (autoReload ? "enabled" : "disabled")); synchronized (configLock) { deployNewFilter(setup()); } initialized = true; }
public BasicSelector(String... mimeTypesToBuffer) { this(new PathMapper<Boolean>(), false, mimeTypesToBuffer); }
public PathBasedDecoratorSelector put(String contentPath, String... decoratorPaths) { pathMapper.put(contentPath, decoratorPaths); return this; }
protected ObjectFactory getObjectFactory() { return new ObjectFactory.Default(); }
/** Retrieve appropriate pattern by matching patterns with supplied path. */ public String getPatternInUse(String path) { if (path == null) path = "/"; String result = findExactKey(path); if (result == null) result = findComplexKey(path); if (result == null) result = findDefaultKey(); return result; }
public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; configProperties = getConfigProperties(filterConfig); autoReload = getAutoReload(); logger.config("Auto reloading " + (autoReload ? "enabled" : "disabled")); synchronized (configLock) { deployNewFilter(setup()); } initialized = true; }
protected void reloadIfNecessary() throws ServletException { // TODO: Allow finer grained control of reload strategies: // - don't check file timestamp on every single request (once per N seconds). // - periodically check in background, instead of blocking request threads. if (autoReload && reloadRequired()) { synchronized (configLock) { // Double check lock for performance (works in JDK5+, with volatile items). if (reloadRequired()) { deployNewFilter(setup()); } } } }
public BasicSelector(boolean includeErrorPages, String... mimeTypesToBuffer) { this(new PathMapper<Boolean>(), includeErrorPages, mimeTypesToBuffer); }
public MetaTagBasedDecoratorSelector put(String contentPath, String... decoratorPaths) { super.put(contentPath, decoratorPaths); return this; }
public PathBasedDecoratorSelector put(String contentPath, String... decoratorPaths) { pathMapper.put(contentPath, decoratorPaths); return this; }
protected ObjectFactory getObjectFactory() { return new ObjectFactory.Default(); }
/** Retrieve appropriate key by matching patterns with supplied path. */ public T get(String path) { if (path == null) path = "/"; String result = findExactKey(path); if (result == null) result = findComplexKey(path); if (result == null) result = findDefaultKey(); String mapped = result; if (mapped == null) return null; return mappings.get(mapped); }
public BasicSelector(boolean includeErrorPages, String... mimeTypesToBuffer) { this(new PathMapper<Boolean>(), includeErrorPages, mimeTypesToBuffer); }
/** * Add multiple decorator paths to be used for a specific content path. Use this to apply multiple * decorators to a single page. * * <p>Note: If {@link #setCustomDecoratorSelector(DecoratorSelector)} is called, * any decorator paths are ignored, as they are only used by the default * DecoratorSelector implementation.</p> */ public BUILDER addDecoratorPaths(String contentPath, String... decoratorPaths) { pathBasedDecoratorSelector.put(contentPath, decoratorPaths); return self(); }
/** * Add a path to be excluded by SiteMesh. */ public BUILDER addExcludedPath(String exclude) { excludesMapper.put(exclude, true); return self(); }
/** Retrieve appropriate key by matching patterns with supplied path. */ public T get(String path) { if (path == null) path = "/"; String result = findExactKey(path); if (result == null) result = findComplexKey(path); if (result == null) result = findDefaultKey(); String mapped = result; if (mapped == null) return null; return mappings.get(mapped); }
public BasicSelector(String... mimeTypesToBuffer) { this(new PathMapper<Boolean>(), false, mimeTypesToBuffer); }