Java 类org.springframework.ui.context.ThemeSource 实例源码

项目:lams    文件:ResourceBundleThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parent) {
    this.parentThemeSource = parent;

    // Update existing Theme objects.
    // Usually there shouldn't be any at the time of this call.
    synchronized (this.themeCache) {
        for (Theme theme : this.themeCache.values()) {
            initParent(theme);
        }
    }
}
项目:spring4-understanding    文件:ResourceBundleThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parent) {
    this.parentThemeSource = parent;

    // Update existing Theme objects.
    // Usually there shouldn't be any at the time of this call.
    synchronized (this.themeCache) {
        for (Theme theme : this.themeCache.values()) {
            initParent(theme);
        }
    }
}
项目:spring4-understanding    文件:RequestContextUtils.java   
/**
 * Retrieves the current theme from the given request, using the ThemeResolver
 * and ThemeSource bound to the request by the DispatcherServlet.
 * @param request current HTTP request
 * @return the current theme, or {@code null} if not found
 * @see #getThemeResolver
 */
public static Theme getTheme(HttpServletRequest request) {
    ThemeResolver themeResolver = getThemeResolver(request);
    ThemeSource themeSource = getThemeSource(request);
    if (themeResolver != null && themeSource != null) {
        String themeName = themeResolver.resolveThemeName(request);
        return themeSource.getTheme(themeName);
    }
    else {
        return null;
    }
}
项目:spring4-understanding    文件:DispatcherServlet.java   
/**
 * Return this servlet's ThemeSource, if any; else return {@code null}.
 * <p>Default is to return the WebApplicationContext as ThemeSource,
 * provided that it implements the ThemeSource interface.
 * @return the ThemeSource, if any
 * @see #getWebApplicationContext()
 */
public final ThemeSource getThemeSource() {
    if (getWebApplicationContext() instanceof ThemeSource) {
        return (ThemeSource) getWebApplicationContext();
    }
    else {
        return null;
    }
}
项目:my-spring-cache-redis    文件:ResourceBundleThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parent) {
    this.parentThemeSource = parent;

    // Update existing Theme objects.
    // Usually there shouldn't be any at the time of this call.
    synchronized (this.themeCache) {
        for (Theme theme : this.themeCache.values()) {
            initParent(theme);
        }
    }
}
项目:spring    文件:ResourceBundleThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parent) {
    this.parentThemeSource = parent;

    // Update existing Theme objects.
    // Usually there shouldn't be any at the time of this call.
    synchronized (this.themeCache) {
        for (Theme theme : this.themeCache.values()) {
            initParent(theme);
        }
    }
}
项目:class-guard    文件:ResourceBundleThemeSource.java   
public void setParentThemeSource(ThemeSource parent) {
    this.parentThemeSource = parent;

    // Update existing Theme objects.
    // Usually there shouldn't be any at the time of this call.
    synchronized (this.themeCache) {
        for (Theme theme : this.themeCache.values()) {
            initParent(theme);
        }
    }
}
项目:class-guard    文件:RequestContextUtils.java   
/**
 * Retrieves the current theme from the given request, using the ThemeResolver
 * and ThemeSource bound to the request by the DispatcherServlet.
 * @param request current HTTP request
 * @return the current theme, or {@code null} if not found
 * @see #getThemeResolver
 */
public static Theme getTheme(HttpServletRequest request) {
    ThemeResolver themeResolver = getThemeResolver(request);
    ThemeSource themeSource = getThemeSource(request);
    if (themeResolver != null && themeSource != null) {
        String themeName = themeResolver.resolveThemeName(request);
        return themeSource.getTheme(themeName);
    }
    else {
        return null;
    }
}
项目:class-guard    文件:DispatcherServlet.java   
/**
 * Return this servlet's ThemeSource, if any; else return {@code null}.
 * <p>Default is to return the WebApplicationContext as ThemeSource,
 * provided that it implements the ThemeSource interface.
 * @return the ThemeSource, if any
 * @see #getWebApplicationContext()
 */
public final ThemeSource getThemeSource() {
    if (getWebApplicationContext() instanceof ThemeSource) {
        return (ThemeSource) getWebApplicationContext();
    }
    else {
        return null;
    }
}
项目:lams    文件:ResourceBundleThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return this.parentThemeSource;
}
项目:lams    文件:DelegatingThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parentThemeSource) {
    this.parentThemeSource = parentThemeSource;
}
项目:lams    文件:DelegatingThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return parentThemeSource;
}
项目:spring4-understanding    文件:ResourceBundleThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return this.parentThemeSource;
}
项目:spring4-understanding    文件:DelegatingThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parentThemeSource) {
    this.parentThemeSource = parentThemeSource;
}
项目:spring4-understanding    文件:DelegatingThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return parentThemeSource;
}
项目:my-spring-cache-redis    文件:ResourceBundleThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return this.parentThemeSource;
}
项目:my-spring-cache-redis    文件:DelegatingThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parentThemeSource) {
    this.parentThemeSource = parentThemeSource;
}
项目:my-spring-cache-redis    文件:DelegatingThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return parentThemeSource;
}
项目:spring    文件:ResourceBundleThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return this.parentThemeSource;
}
项目:spring    文件:DelegatingThemeSource.java   
@Override
public void setParentThemeSource(ThemeSource parentThemeSource) {
    this.parentThemeSource = parentThemeSource;
}
项目:spring    文件:DelegatingThemeSource.java   
@Override
public ThemeSource getParentThemeSource() {
    return parentThemeSource;
}
项目:class-guard    文件:ResourceBundleThemeSource.java   
public ThemeSource getParentThemeSource() {
    return this.parentThemeSource;
}
项目:class-guard    文件:DelegatingThemeSource.java   
public void setParentThemeSource(ThemeSource parentThemeSource) {
    this.parentThemeSource = parentThemeSource;
}
项目:class-guard    文件:DelegatingThemeSource.java   
public ThemeSource getParentThemeSource() {
    return parentThemeSource;
}
项目:spring4-understanding    文件:RequestContextUtils.java   
/**
 * Return the ThemeSource that has been bound to the request by the
 * DispatcherServlet.
 * @param request current HTTP request
 * @return the current ThemeSource
 */
public static ThemeSource getThemeSource(HttpServletRequest request) {
    return (ThemeSource) request.getAttribute(DispatcherServlet.THEME_SOURCE_ATTRIBUTE);
}
项目:class-guard    文件:RequestContextUtils.java   
/**
 * Return the ThemeSource that has been bound to the request by the
 * DispatcherServlet.
 * @param request current HTTP request
 * @return the current ThemeSource
 */
public static ThemeSource getThemeSource(HttpServletRequest request) {
    return (ThemeSource) request.getAttribute(DispatcherServlet.THEME_SOURCE_ATTRIBUTE);
}