public Enumeration getKeys() { try { ResultMetaData rmd = this.row.getResultIterator().getMetaData(); int count = rmd.getColumnCount(); List names = new ArrayList(rmd.getColumnCount()); for (int i = 1; i <= count; i++) { names.add(rmd.getColumnReader(i).getName()); } return new IteratorEnumeration(names.iterator()); } catch (SQLException ex) { return null; } }
private void setSqlTypes() { @SuppressWarnings("unchecked") Enumeration<String> keys = new IteratorEnumeration(configuration.keySet().iterator()); while (keys.hasMoreElements()) { String key = keys.nextElement(); Matcher matcher = EXTRACT_CONFIG_PATTERN.matcher(key); if (!matcher.matches()) { continue; } matcher.reset(); matcher.find(); if (!matcher.group(1).equals("sqltype")) { continue; } String itemType = matcher.group(2).toUpperCase() + "ITEM"; String value = (String) configuration.get(key); logger.debug("JDBC::updateConfig: set sqlTypes: itemType={} value={}", itemType, value); dBDAO.sqlTypes.put(itemType, value); } }
@Override public Enumeration getParameterNames() { HashSet<String> paramListLocal = new HashSet<String>(); paramListLocal.addAll(this.paramList); for (NVP p : this.queryString) { if (! paramListLocal.contains(p.getName())) { paramListLocal.add(p.getName()); } } return new IteratorEnumeration(paramListLocal.iterator()); }
public Enumeration getKeys() { if (this.cookieMap == null) { this.initCookie(); } return new IteratorEnumeration(this.cookieMap.keySet().iterator()); }
public ResourceBundle getResourceBundle(String languageIso639_2) { String propertiesFilename = "WEB-INF/conf/imcms_" + languageIso639_2 + ".properties"; final Properties languageProperties = PropertyManager.getPropertiesFrom(propertiesFilename); return new ResourceBundle() { protected Object handleGetObject(String key) { return languageProperties.getProperty(key); } public Enumeration<String> getKeys() { return new IteratorEnumeration(languageProperties.keySet().iterator()); } }; }
/** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public synchronized Enumeration<String> getKeys() { HashSet<String> set = new HashSet<String>(INITIAL_CAPACITY); addAllElements(set, messageBundle.getKeys()); if (parent != null) { addAllElements(set, parent.getKeys()); } return new IteratorEnumeration(set.iterator()); }
@Override @SuppressWarnings("unchecked") public Enumeration<String> getAttributeNames() { return new IteratorEnumeration(attributes.keySet().iterator()); }
@Override @SuppressWarnings("unchecked") public Enumeration<String> getInitParameterNames() { return new IteratorEnumeration( initParameters.keySet().iterator() ); }
@SuppressWarnings("unchecked") public Enumeration getInitParameterNames() { return new IteratorEnumeration(params.keySet().iterator()); }
/** * Initialize the filter. * * @param filterConfig filter configuration. * @throws ServletException thrown if the filter could not be initialized. */ @Override public void init(FilterConfig filterConfig) throws ServletException { LOG.info("AtlasAuthenticationFilter initialization started"); final FilterConfig globalConf = filterConfig; final Map<String, String> params = new HashMap<>(); try { configuration = ApplicationProperties.get(); } catch (Exception e) { throw new ServletException(e); } if (configuration != null) { headerProperties = ConfigurationConverter.getProperties(configuration.subset("atlas.headers")); } FilterConfig filterConfig1 = new FilterConfig() { @Override public ServletContext getServletContext() { if (globalConf != null) { return globalConf.getServletContext(); } else { return nullContext; } } @SuppressWarnings("unchecked") @Override public Enumeration<String> getInitParameterNames() { return new IteratorEnumeration(params.keySet().iterator()); } @Override public String getInitParameter(String param) { return params.get(param); } @Override public String getFilterName() { return "AtlasAuthenticationFilter"; } }; super.init(filterConfig1); optionsServlet = new HttpServlet() { }; optionsServlet.init(); }
@Override public Enumeration getHeaders(String headerName) { return new IteratorEnumeration(headers.values().iterator()); }
@Override public Enumeration children() { return new IteratorEnumeration(children.iterator()); }
@SuppressWarnings("unchecked") @Override public Enumeration<String> getAttributeNames() { return new IteratorEnumeration(this.parameters.keySet().iterator()); }
@SuppressWarnings("unchecked") @Override public Enumeration getParameterNames() { Iterator<String> paramNamesIt = simpleParams.keySet().iterator(); return new IteratorEnumeration(paramNamesIt); }