@Test void buildMissingRoot() { FolderEntityBuilder builder = new FolderEntityBuilder(ID_GENERATOR); Bundle bundle = new Bundle(projectInfo); bundle.putAllFolders(createTestFolders(null)); assertThrows(EntityBuilderException.class, () -> builder.build(bundle, DEPLOYMENT, DocumentTools.INSTANCE.getDocumentBuilder().newDocument())); }
public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } @Inject  FolderEntityBuilder(IdGenerator idGenerator); }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } @Inject  FolderEntityBuilder(IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder(); }
FolderEntityBuilder implements EntityBuilder { public List<Entity> build(Bundle bundle, BundleType bundleType, Document document) { Map<String, Folder> folderMap = Optional.ofNullable(bundle.getFolders()).orElse(Collections.emptyMap()); return buildEntities(folderMap, bundleType, document, bundle.getTargetFolderPath()); } @Inject  FolderEntityBuilder(IdGenerator idGenerator); List<Entity> build(Bundle bundle, BundleType bundleType, Document document); @Override @NotNull Integer getOrder();  }