@Test public void collectMetadataProperty() { }
protected final void collectMetadataProperty(final String fieldLabel, String propertyName, final Map<String, List<String>> metadata) { if (StringUtils.isNotBlank(fieldLabel) && StringUtils.isNotBlank(propertyName)) { propertyName = getRelativePropertyName(propertyName, metadata); if (metadata.containsKey(propertyName)) { final List<String> tmp = metadata.get(propertyName); if (!tmp.contains(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } else { final ArrayList<String> tmp = new ArrayList<>(); if (StringUtils.isNotBlank(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } } }
MetadataSchemaPropertiesImpl implements MetadataProperties { protected final void collectMetadataProperty(final String fieldLabel, String propertyName, final Map<String, List<String>> metadata) { if (StringUtils.isNotBlank(fieldLabel) && StringUtils.isNotBlank(propertyName)) { propertyName = getRelativePropertyName(propertyName, metadata); if (metadata.containsKey(propertyName)) { final List<String> tmp = metadata.get(propertyName); if (!tmp.contains(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } else { final ArrayList<String> tmp = new ArrayList<>(); if (StringUtils.isNotBlank(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } } } }
MetadataSchemaPropertiesImpl implements MetadataProperties { protected final void collectMetadataProperty(final String fieldLabel, String propertyName, final Map<String, List<String>> metadata) { if (StringUtils.isNotBlank(fieldLabel) && StringUtils.isNotBlank(propertyName)) { propertyName = getRelativePropertyName(propertyName, metadata); if (metadata.containsKey(propertyName)) { final List<String> tmp = metadata.get(propertyName); if (!tmp.contains(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } else { final ArrayList<String> tmp = new ArrayList<>(); if (StringUtils.isNotBlank(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } } }  }
MetadataSchemaPropertiesImpl implements MetadataProperties { protected final void collectMetadataProperty(final String fieldLabel, String propertyName, final Map<String, List<String>> metadata) { if (StringUtils.isNotBlank(fieldLabel) && StringUtils.isNotBlank(propertyName)) { propertyName = getRelativePropertyName(propertyName, metadata); if (metadata.containsKey(propertyName)) { final List<String> tmp = metadata.get(propertyName); if (!tmp.contains(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } else { final ArrayList<String> tmp = new ArrayList<>(); if (StringUtils.isNotBlank(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } } }  @Override Map<String, List<String>> getMetadataProperties(final SlingHttpServletRequest request); @Override Map<String, List<String>> getMetadataProperties(final SlingHttpServletRequest request, final List<String> metadataFieldResourceTypes); }
MetadataSchemaPropertiesImpl implements MetadataProperties { protected final void collectMetadataProperty(final String fieldLabel, String propertyName, final Map<String, List<String>> metadata) { if (StringUtils.isNotBlank(fieldLabel) && StringUtils.isNotBlank(propertyName)) { propertyName = getRelativePropertyName(propertyName, metadata); if (metadata.containsKey(propertyName)) { final List<String> tmp = metadata.get(propertyName); if (!tmp.contains(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } else { final ArrayList<String> tmp = new ArrayList<>(); if (StringUtils.isNotBlank(fieldLabel)) { tmp.add(fieldLabel); } metadata.put(propertyName, tmp); } } }  @Override Map<String, List<String>> getMetadataProperties(final SlingHttpServletRequest request); @Override Map<String, List<String>> getMetadataProperties(final SlingHttpServletRequest request, final List<String> metadataFieldResourceTypes);  }