@Test public void testCreateParameters_UnmatchedRegexp() throws Exception { StringMetadataParameter p = new StringMetadataParameter(new String[] { "abc" }, new String[] {}); AdaptrisMessage msg = createMessage(); Map existing = new HashMap(); Map map = p.createParameters(msg, existing); assertNotNull(map); assertTrue(map == existing); assertEquals(0, map.size()); }
@Override public Map createParameters(AdaptrisMessage msg, Map existingParams) { MetadataCollection metadataToInclude = metadataFilter.filter(msg); if (metadataToInclude.size() == 0) { return existingParams; } Map params = existingParams == null ? new HashMap() : new HashMap(existingParams); for (MetadataElement e : metadataToInclude) { params.put(e.getKey(), e.getValue()); } log.trace("Stylesheet parameters: {}", params); return params; }
StringMetadataParameter implements XmlTransformParameter { @Override public Map createParameters(AdaptrisMessage msg, Map existingParams) { MetadataCollection metadataToInclude = metadataFilter.filter(msg); if (metadataToInclude.size() == 0) { return existingParams; } Map params = existingParams == null ? new HashMap() : new HashMap(existingParams); for (MetadataElement e : metadataToInclude) { params.put(e.getKey(), e.getValue()); } log.trace("Stylesheet parameters: {}", params); return params; } }
StringMetadataParameter implements XmlTransformParameter { @Override public Map createParameters(AdaptrisMessage msg, Map existingParams) { MetadataCollection metadataToInclude = metadataFilter.filter(msg); if (metadataToInclude.size() == 0) { return existingParams; } Map params = existingParams == null ? new HashMap() : new HashMap(existingParams); for (MetadataElement e : metadataToInclude) { params.put(e.getKey(), e.getValue()); } log.trace("Stylesheet parameters: {}", params); return params; } StringMetadataParameter();  StringMetadataParameter(String[] include, String[] exclude); }
StringMetadataParameter implements XmlTransformParameter { @Override public Map createParameters(AdaptrisMessage msg, Map existingParams) { MetadataCollection metadataToInclude = metadataFilter.filter(msg); if (metadataToInclude.size() == 0) { return existingParams; } Map params = existingParams == null ? new HashMap() : new HashMap(existingParams); for (MetadataElement e : metadataToInclude) { params.put(e.getKey(), e.getValue()); } log.trace("Stylesheet parameters: {}", params); return params; } StringMetadataParameter();  StringMetadataParameter(String[] include, String[] exclude); @Override Map createParameters(AdaptrisMessage msg, Map existingParams); RegexMetadataFilter getMetadataFilter(); void setMetadataFilter(RegexMetadataFilter rmf); }
StringMetadataParameter implements XmlTransformParameter { @Override public Map createParameters(AdaptrisMessage msg, Map existingParams) { MetadataCollection metadataToInclude = metadataFilter.filter(msg); if (metadataToInclude.size() == 0) { return existingParams; } Map params = existingParams == null ? new HashMap() : new HashMap(existingParams); for (MetadataElement e : metadataToInclude) { params.put(e.getKey(), e.getValue()); } log.trace("Stylesheet parameters: {}", params); return params; } StringMetadataParameter();  StringMetadataParameter(String[] include, String[] exclude); @Override Map createParameters(AdaptrisMessage msg, Map existingParams); RegexMetadataFilter getMetadataFilter(); void setMetadataFilter(RegexMetadataFilter rmf);  }