本文整理了Java中javax.servlet.http.HttpServletRequestWrapper.getAttributeNames()
方法的一些代码示例,展示了HttpServletRequestWrapper.getAttributeNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServletRequestWrapper.getAttributeNames()
方法的具体详情如下:
包路径:javax.servlet.http.HttpServletRequestWrapper
类名称:HttpServletRequestWrapper
方法名:getAttributeNames
暂无
代码示例来源:origin: cloudfoundry/uaa
@Override
public Enumeration<String> getAttributeNames() {
return super.getAttributeNames();
}
代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel
@Override
public Enumeration<String> getAttributeNames() {
Enumeration<String> superEnumeration = super.getAttributeNames();
if (_attributes.isEmpty()) {
return superEnumeration;
}
Set<String> names = new HashSet<>();
while (superEnumeration.hasMoreElements()) {
names.add(superEnumeration.nextElement());
}
names.addAll(_attributes.keySet());
return Collections.enumeration(names);
}
代码示例来源:origin: paoding-code/paoding-rose
/**
* 返回这个窗口的私有属性名加portal主控请求对象共同属性的属性名
*/
@SuppressWarnings("unchecked")
public Enumeration getAttributeNames() {
HashSet<String> keys;
synchronized (mutex) {
keys = new HashSet<String>(window.getAttributes().keySet());
Enumeration<String> names = super.getAttributeNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
if (deleteAttributes == null || !deleteAttributes.contains(name)) {
keys.add(name);
}
}
}
return new Enumerator(keys);
}
代码示例来源:origin: com.atlassian.jira/jira-core
@Override
public Enumeration getAttributeNames()
{
Enumeration attributeNames = super.getAttributeNames();
return attributeNames;
}
代码示例来源:origin: com.github.wuic/wuic-servlet
/**
* {@inheritDoc}
*/
@Override
public Enumeration<String> getAttributeNames() {
// Synchronized access
synchronized (mutex) {
return super.getAttributeNames();
}
}
代码示例来源:origin: com.bbossgroups.pdp/pdp-cms
public Enumeration<String> getAttributeNames()
{
if(this.attributes == null)
return super.getAttributeNames();
else
{
return attributes.keys();
}
}
public Object getAttribute(String name)
代码示例来源:origin: org.thymeleaf.extras/thymeleaf-extras-tiles2
@Override
@SuppressWarnings("rawtypes")
public Enumeration getAttributeNames() {
final Enumeration attributeNamesEnum = super.getAttributeNames();
final List<String> attributeNames = new ArrayList<String>();
while (attributeNamesEnum.hasMoreElements()) {
attributeNames.add((String)attributeNamesEnum.nextElement());
}
attributeNames.addAll(this.localVariables.keySet());
return Collections.enumeration(attributeNames);
}
代码示例来源:origin: Jasig/uPortal
@Override
public Enumeration getAttributeNames() {
this.checkState();
return super.getAttributeNames();
}
代码示例来源:origin: thymeleaf/thymeleaf-extras-tiles2
@Override
@SuppressWarnings("rawtypes")
public Enumeration getAttributeNames() {
final Enumeration attributeNamesEnum = super.getAttributeNames();
final List<String> attributeNames = new ArrayList<String>();
while (attributeNamesEnum.hasMoreElements()) {
attributeNames.add((String)attributeNamesEnum.nextElement());
}
attributeNames.addAll(this.localVariables.keySet());
return Collections.enumeration(attributeNames);
}
代码示例来源:origin: org.jasig.portal/uPortal-rendering
@Override
public Enumeration getAttributeNames() {
this.checkState();
return super.getAttributeNames();
}
代码示例来源:origin: org.apache.wink/wink-server
@SuppressWarnings("unchecked")
@Override
public Enumeration getAttributeNames() {
return getCorrectRequest().getAttributeNames();
}
代码示例来源:origin: com.bbossgroups.pdp/pdp-cms
private void initAttributes()
{
this.attributes = new Hashtable<String,Object>();
Enumeration<String> names = super.getAttributeNames();
while(names.hasMoreElements())
{
String name = names.nextElement();
this.attributes.put(name, super.getAttribute(name));
}
}
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
public Enumeration getAttributeNames()
{
Set s = new HashSet();
s.addAll(m_attributes.keySet());
for (Enumeration e = super.getAttributeNames(); e.hasMoreElements();)
{
String name = (String) e.nextElement();
s.add(name);
}
return new IteratorEnumeration(s.iterator());
}
代码示例来源:origin: com.stormpath.sdk/stormpath-sdk-servlet
@Override
public Enumeration<String> getAttributeNames() {
final Enumeration<String> enumeration = super.getAttributeNames();
Map<String, ?> config = getConfig();
if (config == null) { //spring environments
config = new HashMap<String, Object>();
}
final Set<String> keys = config.keySet();
final Iterator<String> configIterator = keys.iterator();
return new Enumeration<String>() {
@Override
public boolean hasMoreElements() {
return enumeration.hasMoreElements() || configIterator.hasNext();
}
@Override
public String nextElement() {
if (enumeration.hasMoreElements()) {
return enumeration.nextElement();
}
return configIterator.next();
}
};
}
代码示例来源:origin: stormpath/stormpath-sdk-java
@Override
public Enumeration<String> getAttributeNames() {
final Enumeration<String> enumeration = super.getAttributeNames();
Map<String, ?> config = getConfig();
if (config == null) { //spring environments
config = new HashMap<String, Object>();
}
final Set<String> keys = config.keySet();
final Iterator<String> configIterator = keys.iterator();
return new Enumeration<String>() {
@Override
public boolean hasMoreElements() {
return enumeration.hasMoreElements() || configIterator.hasNext();
}
@Override
public String nextElement() {
if (enumeration.hasMoreElements()) {
return enumeration.nextElement();
}
return configIterator.next();
}
};
}
代码示例来源:origin: org.onehippo.cms7.hst.components/hst-core
public Map<String, Object> getAttributeMap(String referencePath) {
String namespace = getReferenceNamespacePath(referencePath);
String prefix = getFullNamespacePrefix(namespace);
int prefixLen = prefix.length();
Map<String, Object> attributesMap = this.namespaceAttributesMap.get(prefix);
if (attributesMap == null) {
attributesMap = new HashMap<String, Object>();
for (Enumeration attributeNames = super.getAttributeNames(); attributeNames.hasMoreElements(); ) {
String encodedAttributeName = (String) attributeNames.nextElement();
if (encodedAttributeName.startsWith(prefix)) {
String attributeName = encodedAttributeName.substring(prefixLen);
Object attributeValue = super.getAttribute(encodedAttributeName);
attributesMap.put(attributeName, attributeValue);
}
}
this.namespaceAttributesMap.put(prefix, attributesMap);
}
return attributesMap;
}
代码示例来源:origin: org.onehippo.ecm.hst.components/hst-core
public Map<String, Object> getAttributeMap(String referencePath) {
String namespace = getReferenceNamespacePath(referencePath);
String prefix = getFullNamespacePrefix(namespace);
int prefixLen = prefix.length();
Map<String, Object> attributesMap = this.namespaceAttributesMap.get(prefix);
if (attributesMap == null) {
attributesMap = new HashMap<String, Object>();
for (Enumeration attributeNames = super.getAttributeNames(); attributeNames.hasMoreElements(); ) {
String encodedAttributeName = (String) attributeNames.nextElement();
if (encodedAttributeName.startsWith(prefix)) {
String attributeName = encodedAttributeName.substring(prefixLen);
Object attributeValue = super.getAttribute(encodedAttributeName);
attributesMap.put(attributeName, attributeValue);
}
}
this.namespaceAttributesMap.put(prefix, attributesMap);
}
return attributesMap;
}
代码示例来源:origin: org.onehippo.ecm.hst.components/hst-core
@Override
public Enumeration getAttributeNames() {
List servletRequestAttrs = EnumerationUtils.toList(super.getAttributeNames());
Set localRequestAttrs = this.getAttributeMap().keySet();
Collection composite = new CompositeCollection(new Collection [] { servletRequestAttrs, localRequestAttrs });
return Collections.enumeration(composite);
}
代码示例来源:origin: org.onehippo.cms7.hst.components/hst-core
@SuppressWarnings("unchecked")
@Override
public Enumeration getAttributeNames() {
List servletRequestAttrs = EnumerationUtils.toList(super.getAttributeNames());
Set<String> localRequestAttrs = this.getAttributeMap().keySet();
Collection composite = new CompositeCollection(new Collection [] { servletRequestAttrs, localRequestAttrs });
return Collections.enumeration(composite);
}
代码示例来源:origin: org.jasig.portal/uportal3-impl
/**
* @see javax.servlet.ServletRequest#getAttributeNames()
*/
public Enumeration getAttributeNames() {
final Iterator<String> attrNameItr = this.attributeValueMap.keySet().iterator();
final Enumeration superAttrNameEnum = super.getAttributeNames();
final Iterator superAttrNameItr = new EnumerationIterator(superAttrNameEnum);
final Iterator[] allAttrNameItrs = new Iterator[] {attrNameItr, superAttrNameItr};
final Iterator allAttrNameItr = new IteratorChain(allAttrNameItrs);
final Iterator filteredAttrNameItr = new UniqueFilterIterator(allAttrNameItr);
return new IteratorEnumeration(filteredAttrNameItr);
}
内容来源于网络,如有侵权,请联系作者删除!