@QueryParam("entitle_date") String entitleDateStr,
@QueryParam("from_pool") List<String> fromPools) {
// Check that only one query param was set:
if (poolIdString != null && productIds != null && productIds.length > 0) {
throw new BadRequestException(
i18n.tr("Cannot bind by multiple parameters."));
}
if (poolIdString == null && quantity != null) {
throw new BadRequestException(
i18n.tr("Cannot specify a quantity when auto-binding."));
}
// doesn't make sense to bind by pool and a date.
if (poolIdString != null && entitleDateStr != null) {
throw new BadRequestException(
i18n.tr("Cannot bind by multiple parameters."));
}
if (fromPools != null && !fromPools.isEmpty() && poolIdString != null) {
throw new BadRequestException(
i18n.tr("Cannot bind by multiple parameters."));
}
// TODO: really should do this in a before we get to this call
// so the method takes in a real Date object and not just a String.