public void setMetaDataPath(List<String> paths) { if (paths == null) { setMetaDataLocations(null); return; } try { List<VirtualFile> locations = new ArrayList<VirtualFile>(); for (String path : paths) { if (path == null) throw new IllegalArgumentException("Null path in paths: " + paths); VirtualFile child = root.getChild(path); if (child != null) locations.add(child); else log.debug("Meta data path does not exist: root=" + root.getPathName() + " path=" + path); } setMetaDataLocations(locations); } catch (IOException e) { log.warn("Exception while applying paths: root=" + root.getPathName() + " paths=" + paths); } }
public void setMetaDataPath(List<MetaDataEntry> paths) { if (paths == null) { setMetaDataLocations(null); return; } Map<VirtualFile, MetaDataType> locations = new LinkedHashMap<VirtualFile, MetaDataType>(); for (MetaDataEntry entry : paths) { if (entry == null) throw new IllegalArgumentException("Null entry in paths: " + paths); String path = entry.getPath(); VirtualFile child = root.getChild(path); if (child != null) locations.put(child, entry.getType()); else log.debugf("Meta data path does not exist: root=%1s path=%2s", root.getPathName(), path); } setMetaDataLocationsMap(locations); }