本文整理了Java中org.apereo.portal.xml.XmlUtilities.getStylesheetCacheKey()
方法的一些代码示例,展示了XmlUtilities.getStylesheetCacheKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtilities.getStylesheetCacheKey()
方法的具体详情如下:
包路径:org.apereo.portal.xml.XmlUtilities
类名称:XmlUtilities
方法名:getStylesheetCacheKey
[英]Gets an appropriate cache key for the specified stylesheet resource. The key should be valid for both Transformers and Templates based on this stylesheet.
[中]为指定的样式表资源获取适当的缓存键。该键应该对基于此样式表的转换器和模板都有效。
代码示例来源:origin: Jasig/uPortal
@Override
public final CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
final Resource stylesheetResource = this.getStylesheetResource(request);
final Serializable stylesheetCacheKey;
try {
stylesheetCacheKey = this.xmlUtilities.getStylesheetCacheKey(stylesheetResource);
} catch (TransformerConfigurationException e) {
throw new RuntimeException(
"Failed to get Transformer for stylesheet: " + stylesheetResource, e);
} catch (IOException e) {
throw new RuntimeException("Failed to load stylesheet: " + stylesheetResource, e);
}
return CacheKey.build(stylesheetResource.getDescription(), stylesheetCacheKey);
}
代码示例来源:origin: org.jasig.portal/uPortal-rendering
@Override
public final CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
final Resource stylesheetResource = this.getStylesheetResource(request);
final Serializable stylesheetCacheKey;
try {
stylesheetCacheKey = this.xmlUtilities.getStylesheetCacheKey(stylesheetResource);
} catch (TransformerConfigurationException e) {
throw new RuntimeException(
"Failed to get Transformer for stylesheet: " + stylesheetResource, e);
} catch (IOException e) {
throw new RuntimeException("Failed to load stylesheet: " + stylesheetResource, e);
}
return CacheKey.build(stylesheetResource.getDescription(), stylesheetCacheKey);
}
内容来源于网络,如有侵权,请联系作者删除!