javax.servlet.http.HttpServletRequestWrapper.getLocales()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(126)

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

HttpServletRequestWrapper.getLocales介绍

暂无

代码示例

代码示例来源:origin: cloudfoundry/uaa

@Override
public Enumeration<Locale> getLocales() {
  return super.getLocales();
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public Enumeration getLocales()
{
  Enumeration locales = super.getLocales();
  return locales;
}

代码示例来源:origin: com.github.wuic/wuic-servlet

/**
 * {@inheritDoc}
 */
@Override
public Enumeration<Locale> getLocales() {
  // Synchronized access
  synchronized (mutex) {
    return super.getLocales();
  }
}

代码示例来源:origin: appfuse/appfuse

/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
public Enumeration<Locale> getLocales() {
  if (null != preferredLocale) {
    List<Locale> l = Collections.list(super.getLocales());
    if (l.contains(preferredLocale)) {
      l.remove(preferredLocale);
    }
    l.add(0, preferredLocale);
    return Collections.enumeration(l);
  } else {
    return super.getLocales();
  }
}

代码示例来源:origin: org.jasig.portal/uPortal-rendering

@Override
public Enumeration getLocales() {
  this.checkState();
  return super.getLocales();
}

代码示例来源:origin: org.onehippo.cms7.hst.components/hst-core

@SuppressWarnings("unchecked")
@Override
public Enumeration getLocales() {
  Enumeration localesEnum = requestContext.getLocales();
  
  if (localesEnum == null) {
    localesEnum = super.getLocales();
  }
  
  return localesEnum;
}

代码示例来源:origin: Jasig/uPortal

@Override
public Enumeration getLocales() {
  this.checkState();
  return super.getLocales();
}

代码示例来源:origin: org.apache.wink/wink-server

@SuppressWarnings("unchecked")
@Override
public Enumeration getLocales() {
  return getCorrectRequest().getLocales();
}

代码示例来源:origin: org.apache.juneau/juneau-server

@Override /* ServletRequest */
public Enumeration<Locale> getLocales() {
  String h = getOverriddenHeader("Accept-Language");
  if (h != null) {
    MediaRange[] mr = MediaRange.parse(h);
    if (mr.length > 0) {
      List<Locale> l = new ArrayList<Locale>(mr.length);
      for (MediaRange r : mr)
        l.add(toLocale(r.getType()));
      return enumeration(l);
    }
  }
  return super.getLocales();
}

代码示例来源:origin: org.apache.juneau/juneau-rest-server

@Override /* ServletRequest */
public Enumeration<Locale> getLocales() {
  String h = headers.getString("Accept-Language");
  if (h != null) {
    MediaTypeRange[] mr = MediaTypeRange.parse(h);
    if (mr.length > 0) {
      List<Locale> l = new ArrayList<>(mr.length);
      for (MediaTypeRange r : mr)
        l.add(toLocale(r.getMediaType().getType()));
      return enumeration(l);
    }
  }
  return super.getLocales();
}

代码示例来源:origin: apache/juneau

@Override /* ServletRequest */
public Enumeration<Locale> getLocales() {
  String h = headers.getString("Accept-Language");
  if (h != null) {
    MediaTypeRange[] mr = MediaTypeRange.parse(h);
    if (mr.length > 0) {
      List<Locale> l = new ArrayList<>(mr.length);
      for (MediaTypeRange r : mr)
        l.add(toLocale(r.getMediaType().getType()));
      return enumeration(l);
    }
  }
  return super.getLocales();
}

代码示例来源:origin: apache/juneau

@Override /* ServletRequest */
public Enumeration<Locale> getLocales() {
  String h = headers.getString("Accept-Language");
  if (h != null) {
    MediaTypeRange[] mr = MediaTypeRange.parse(h);
    if (mr.length > 0) {
      List<Locale> l = new ArrayList<>(mr.length);
      for (MediaTypeRange r : mr)
        l.add(toLocale(r.getMediaType().getType()));
      return enumeration(l);
    }
  }
  return super.getLocales();
}

相关文章

HttpServletRequestWrapper类方法