public HistoricalTimeSeriesResolutionResult resolve(final ExternalIdBundle identifierBundle, final LocalDate identifierValidityDate,
final String dataSource, final String dataProvider, final String dataField, final String resolutionKey) {
ArgumentChecker.notNull(identifierBundle, "identifierBundle");
ArgumentChecker.notNull(dataField, "dataField");
try {
final FudgeDeserializer fdc = new FudgeDeserializer(getFudgeContext());
final UriBuilder uri = UriBuilder.fromUri(getBaseUri()).path("resolve");
for (ExternalId id : identifierBundle) {
uri.segment("id", id.toString());
}
if (identifierValidityDate != null) {
uri.segment("identifierValidityDate", identifierValidityDate.toString());
}
if (dataSource != null) {
uri.segment("dataSource", dataSource);
}
if (dataProvider != null) {
uri.segment("dataProvider", dataProvider);
}
if (dataField != null) {
uri.segment("dataField", dataField);
}
if (resolutionKey != null) {
uri.segment("resolutionKey", resolutionKey);
}
final URI req = uri.build();
final FudgeMsg response = accessRemote(req).get(FudgeMsg.class);
final String adjustment = response.getString("adjustment");
return new HistoricalTimeSeriesResolutionResult(
fdc.fieldValueToObject(ManageableHistoricalTimeSeriesInfo.class, response.getByName("info")),
(adjustment != null) ? new Adjuster(req, identifierBundle, adjustment) : null);
} catch (UniformInterfaceException404NotFound e) {
return null;
}
}