throw new OpenGammaRuntimeException("Missing position source in given toolcontext");
}
}
private Map<String, Collection<String>> scanValueRequirementBySecType(UniqueId portfolioId, ToolContext toolContext) {
AvailableOutputsProvider availableOutputsProvider = toolContext.getAvaliableOutputsProvider();
if (availableOutputsProvider == null) {
throw new OpenGammaRuntimeException("AvailableOutputsProvider missing from ToolContext");
}
final SetMultimap<String, String> valueNamesBySecurityType = TreeMultimap.create();
AvailableOutputs portfolioOutputs = availableOutputsProvider.getPortfolioOutputs(portfolioId, null);
Set<String> securityTypes = portfolioOutputs.getSecurityTypes();
for (String securityType : securityTypes) {
Set<AvailableOutput> positionOutputs = portfolioOutputs.getPositionOutputs(securityType);
for (AvailableOutput availableOutput : positionOutputs) {
valueNamesBySecurityType.put(securityType, availableOutput.getValueName());