public HttpBuildCache(URI root) { if (!root.getPath().endsWith("/")) { throw new IncompleteArgumentException("HTTP cache root URI must end with '/'"); } this.root = root; this.safeUri = safeUri(root); this.httpClient = HttpClients.createDefault(); }
public Set<Stock> loadStocksList(String shareList) { if (shareList == null) { throw new IncompleteArgumentException("shareList"); } SharesList sharesList = portfolioDAO.loadShareList(shareList); return sharesList.toStocksSet(); }
/** * Performs validation of extracted registry information in context of given operation. * * @param registryInformation * validateg information. * @param operation * validation group specifying operation. * @throws IncompleteArgumentException * should validated registry information be incomplete for specified operation. */ @SuppressWarnings("rawtypes") private void validateInformationCompleteness(RegistryFormData registryInformation, Class operation) throws IncompleteArgumentException { Set<ConstraintViolation<RegistryFormData>> validate = validator.validate(registryInformation, operation); if (validate.size() > 0) { throw new IllegalArgumentException("Request is missing required data."); } }