gpt4 book ai didi

org.apereo.portal.xml.XmlUtilities.getStylesheetCacheKey()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 09:03:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apereo.portal.xml.XmlUtilities.getStylesheetCacheKey()方法的一些代码示例,展示了XmlUtilities.getStylesheetCacheKey()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlUtilities.getStylesheetCacheKey()方法的具体详情如下:
包路径:org.apereo.portal.xml.XmlUtilities
类名称:XmlUtilities
方法名:getStylesheetCacheKey

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);
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com