@Test public void getAllProductSuppliersCatalogs() throws Exception { final List<VoProductSupplierCatalog> supplierCatalogs = voProductSupplierService.getAllProductSuppliersCatalogs(); assertNotNull(supplierCatalogs); assertFalse(supplierCatalogs.isEmpty()); assertEquals("CAT001", supplierCatalogs.get(0).getCode()); }
@Override public List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs() throws Exception { final Collection<String> catalogCodes; if (federationFacade.isCurrentUserSystemAdmin()) { catalogCodes = new TreeSet<>(dtoProductService.findProductSupplierCatalogCodes()); } else { catalogCodes = new TreeSet<>(federationFacade.getAccessibleSupplierCatalogCodesByCurrentManager()); } return catalogCodes.stream().map(code -> { final VoProductSupplierCatalog catalog = new VoProductSupplierCatalog(); catalog.setCode(code); return catalog; }).collect(Collectors.toList()); }
VoProductSupplierServiceImpl implements VoProductSupplierService { @Override public List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs() throws Exception { final Collection<String> catalogCodes; if (federationFacade.isCurrentUserSystemAdmin()) { catalogCodes = new TreeSet<>(dtoProductService.findProductSupplierCatalogCodes()); } else { catalogCodes = new TreeSet<>(federationFacade.getAccessibleSupplierCatalogCodesByCurrentManager()); } return catalogCodes.stream().map(code -> { final VoProductSupplierCatalog catalog = new VoProductSupplierCatalog(); catalog.setCode(code); return catalog; }).collect(Collectors.toList()); } }
VoProductSupplierServiceImpl implements VoProductSupplierService { @Override public List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs() throws Exception { final Collection<String> catalogCodes; if (federationFacade.isCurrentUserSystemAdmin()) { catalogCodes = new TreeSet<>(dtoProductService.findProductSupplierCatalogCodes()); } else { catalogCodes = new TreeSet<>(federationFacade.getAccessibleSupplierCatalogCodesByCurrentManager()); } return catalogCodes.stream().map(code -> { final VoProductSupplierCatalog catalog = new VoProductSupplierCatalog(); catalog.setCode(code); return catalog; }).collect(Collectors.toList()); } VoProductSupplierServiceImpl(final DtoProductService dtoProductService,
                                        final FederationFacade federationFacade); }
VoProductSupplierServiceImpl implements VoProductSupplierService { @Override public List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs() throws Exception { final Collection<String> catalogCodes; if (federationFacade.isCurrentUserSystemAdmin()) { catalogCodes = new TreeSet<>(dtoProductService.findProductSupplierCatalogCodes()); } else { catalogCodes = new TreeSet<>(federationFacade.getAccessibleSupplierCatalogCodesByCurrentManager()); } return catalogCodes.stream().map(code -> { final VoProductSupplierCatalog catalog = new VoProductSupplierCatalog(); catalog.setCode(code); return catalog; }).collect(Collectors.toList()); } VoProductSupplierServiceImpl(final DtoProductService dtoProductService,
                                        final FederationFacade federationFacade); @Override List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs(); }
VoProductSupplierServiceImpl implements VoProductSupplierService { @Override public List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs() throws Exception { final Collection<String> catalogCodes; if (federationFacade.isCurrentUserSystemAdmin()) { catalogCodes = new TreeSet<>(dtoProductService.findProductSupplierCatalogCodes()); } else { catalogCodes = new TreeSet<>(federationFacade.getAccessibleSupplierCatalogCodesByCurrentManager()); } return catalogCodes.stream().map(code -> { final VoProductSupplierCatalog catalog = new VoProductSupplierCatalog(); catalog.setCode(code); return catalog; }).collect(Collectors.toList()); } VoProductSupplierServiceImpl(final DtoProductService dtoProductService,
                                        final FederationFacade federationFacade); @Override List<VoProductSupplierCatalog> getAllProductSuppliersCatalogs();  }