private CatalogItem getInternalItemFromSource(SourceConfig sourceConfig, List<String> path) { final StoragePlugin plugin = getStoragePlugin(sourceConfig.getName()); if (!(plugin instanceof FileSystemPlugin)) { throw new IllegalArgumentException(String.format("Can not get internal item from non-filesystem source [%s] of type [%s]", sourceConfig.getName(), plugin.getClass().getName())); } SchemaEntity entity = ((FileSystemPlugin) plugin).get(path, context.getUserPrincipal().getName()); return convertSchemaEntityToCatalogItem(entity, path.subList(0, path.size() - 1)); }