Skip to content

Instantly share code, notes, and snippets.

@Vineeth-Mohan
Created May 24, 2012 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vineeth-Mohan/2781148 to your computer and use it in GitHub Desktop.
Save Vineeth-Mohan/2781148 to your computer and use it in GitHub Desktop.
package com.opengamma.examples;
import com.opengamma.component.ComponentKey;
import com.opengamma.component.ComponentRepository;
import com.opengamma.component.factory.web.WebsiteBasicsComponentFactory;
import com.opengamma.engine.view.ViewDefinition;
import com.opengamma.engine.view.ViewDefinitionRepository;
import com.opengamma.engine.view.ViewProcessor;
import com.opengamma.engine.view.client.ViewClient;
import com.opengamma.livedata.UserPrincipal;
public class CustomBasicsComponentFactory extends WebsiteBasicsComponentFactory {
public static ViewDefinitionRepository _viewDefinitionRepository;
public static ViewProcessor _viewProcessor;
protected void initValueRequirementNames(ComponentRepository repo) {
super.initValueRequirementNames(repo);
_viewProcessor = (ViewProcessor) repo.getInstance(ViewProcessor.class, "main");
_viewDefinitionRepository = _viewProcessor.getViewDefinitionRepository();
repo.getRestComponents().publishResource(new ReportsResource());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment