@Test public void testGetBlobPaths() throws Exception { SchemaManager schemaManager = Framework.getService(SchemaManager.class); List<String> blobPaths = new BlobsExtractor().getBlobPaths(schemaManager.getDocumentType("ComplexDoc")); assertEquals( new HashSet<>( Arrays.asList("file:content", "cmpf:aListcontent")), new HashSet<>(blobPaths)); }
public List<String> getBlobPaths(DocumentType documentType) { String docType = documentType.getName(); List<String> paths = docBlobPaths.get(docType); if (paths == null) { paths = new ArrayList<>(); for (Schema schema : documentType.getSchemas()) { findBlobPaths(schema, null, schema, paths); } docBlobPaths.put(docType, paths); } return paths; }
BlobsExtractor { public List<String> getBlobPaths(DocumentType documentType) { String docType = documentType.getName(); List<String> paths = docBlobPaths.get(docType); if (paths == null) { paths = new ArrayList<>(); for (Schema schema : documentType.getSchemas()) { findBlobPaths(schema, null, schema, paths); } docBlobPaths.put(docType, paths); } return paths; } }
BlobsExtractor { public List<String> getBlobPaths(DocumentType documentType) { String docType = documentType.getName(); List<String> paths = docBlobPaths.get(docType); if (paths == null) { paths = new ArrayList<>(); for (Schema schema : documentType.getSchemas()) { findBlobPaths(schema, null, schema, paths); } docBlobPaths.put(docType, paths); } return paths; }  }
BlobsExtractor { public List<String> getBlobPaths(DocumentType documentType) { String docType = documentType.getName(); List<String> paths = docBlobPaths.get(docType); if (paths == null) { paths = new ArrayList<>(); for (Schema schema : documentType.getSchemas()) { findBlobPaths(schema, null, schema, paths); } docBlobPaths.put(docType, paths); } return paths; }  void setExtractorProperties(Set<String> includedPaths, Set<String> excludedPaths, boolean allBlobs); List<Blob> getBlobs(DocumentModel doc); List<Property> getBlobsProperties(DocumentModel doc); List<String> getBlobPaths(DocumentType documentType); }
BlobsExtractor { public List<String> getBlobPaths(DocumentType documentType) { String docType = documentType.getName(); List<String> paths = docBlobPaths.get(docType); if (paths == null) { paths = new ArrayList<>(); for (Schema schema : documentType.getSchemas()) { findBlobPaths(schema, null, schema, paths); } docBlobPaths.put(docType, paths); } return paths; }  void setExtractorProperties(Set<String> includedPaths, Set<String> excludedPaths, boolean allBlobs); List<Blob> getBlobs(DocumentModel doc); List<Property> getBlobsProperties(DocumentModel doc); List<String> getBlobPaths(DocumentType documentType);  }