@Test public void testGetBlobPathsVarious() throws Exception { SchemaManager schemaManager = Framework.getService(SchemaManager.class); BlobsExtractor blobsExtractor = new BlobsExtractor(); List<String> paths; paths = blobsExtractor.getBlobPaths(schemaManager.getDocumentType("NoBlobDocument")); assertEquals(Collections.emptyList(), paths); paths = blobsExtractor.getBlobPaths(schemaManager.getDocumentType("SimpleBlobDocument")); assertEquals(Arrays.asList("simpleblob:blob"), paths); paths = blobsExtractor.getBlobPaths(schemaManager.getDocumentType("WithoutPrefixDocument")); assertEquals(Arrays.asList("wihtoutpref:blob"), paths); paths = blobsExtractor.getBlobPaths(schemaManager.getDocumentType("BlobInListDocument")); assertEquals(Arrays.asList("bil:files/*/file"), paths); }
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);  }