protected final UnknownResourceException unknownResource(Object resourceId, String resourceType) { String errorMessage = String.format("Could not find %s resource for %s",resourceType,resourceId); this.logger.error(errorMessage); return new UnknownResourceException(errorMessage); }
protected final UnknownResourceException unknownResource(final Object resourceId, final String resourceType) { final String errorMessage = String.format("Could not find %s resource for %s",resourceType,resourceId); this.logger.error(errorMessage); return new UnknownResourceException(errorMessage); }
/** * {@inheritDoc} * @throws UnknownResourceException if the resource is not known. */ @Override public DataSet get(ResourceSnapshot resource) throws UnknownResourceException { DataSet dataSet = this.resources.get(resource.name()); if(dataSet==null) { throw new UnknownResourceException("Unknown resource '"+resource.name()+"'"); } return dataSet; }