private void validateComponentsInToolContext(ToolContext toolContext) { if (toolContext.getViewProcessor() == null) { throw new OpenGammaRuntimeException("Missing view processor in given toolcontext"); } if (toolContext.getSecuritySource() == null) { throw new OpenGammaRuntimeException("Missing security source in given toolcontext"); } if (toolContext.getConfigMaster() == null) { throw new OpenGammaRuntimeException("Missing config master in given toolcontext"); } if (toolContext.getPositionSource() == null) { throw new OpenGammaRuntimeException("Missing position source in given toolcontext"); } }