test_class.declarator: tmpDir
test_class.modifier: private
test_class.original_string: private File tmpDir;
test_class.type: File
test_class.var_name: tmpDir
test_class.declarator: conf
test_class.modifier: private
test_class.original_string: private ZeppelinConfiguration conf;
test_class.type: ZeppelinConfiguration
test_class.var_name: conf
test_class.declarator: hvf
test_class.modifier: private
test_class.original_string: private HeliumVisualizationFactory hvf;
test_class.type: HeliumVisualizationFactory
test_class.var_name: hvf
test_class.file: smart-zeppelin/zeppelin-zengine/src/test/java/org/apache/zeppelin/helium/HeliumVisualizationFactoryTest.java
test_class.identifier: HeliumVisualizationFactoryTest
test_case.body: @Test
    public void testInstallNpm() throws InstallationException {
      assertFalse(new File(tmpDir, "vis/node/npm").isFile());
      assertFalse(new File(tmpDir, "vis/node/node").isFile());
  
      hvf.installNodeAndNpm();
  
      assertTrue(new File(tmpDir, "vis/node/npm").isFile());
      assertTrue(new File(tmpDir, "vis/node/node").isFile());
    }
test_case.class_method_signature: HeliumVisualizationFactoryTest.testInstallNpm()
test_case.full_signature: @Test public void testInstallNpm()
test_case.identifier: testInstallNpm
test_case.invocations: assertFalse isFile assertFalse isFile installNodeAndNpm assertTrue isFile assertTrue isFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInstallNpm()
focal_class.declarator: logger = LoggerFactory.getLogger(HeliumVisualizationFactory.class)
focal_class.original_string: Logger logger = LoggerFactory.getLogger(HeliumVisualizationFactory.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: NODE_VERSION = "v6.9.1"
focal_class.modifier: private final
focal_class.original_string: private final String NODE_VERSION = "v6.9.1";
focal_class.type: String
focal_class.var_name: NODE_VERSION
focal_class.declarator: NPM_VERSION = "3.10.8"
focal_class.modifier: private final
focal_class.original_string: private final String NPM_VERSION = "3.10.8";
focal_class.type: String
focal_class.var_name: NPM_VERSION
focal_class.declarator: FETCH_RETRY_COUNT = 2
focal_class.modifier: private final
focal_class.original_string: private final int FETCH_RETRY_COUNT = 2;
focal_class.type: int
focal_class.var_name: FETCH_RETRY_COUNT
focal_class.declarator: FETCH_RETRY_FACTOR_COUNT = 1
focal_class.modifier: private final
focal_class.original_string: private final int FETCH_RETRY_FACTOR_COUNT = 1;
focal_class.type: int
focal_class.var_name: FETCH_RETRY_FACTOR_COUNT
focal_class.declarator: FETCH_RETRY_MIN_TIMEOUT = 5000
focal_class.modifier: private final
focal_class.original_string: private final int FETCH_RETRY_MIN_TIMEOUT = 5000;
focal_class.type: int
focal_class.var_name: FETCH_RETRY_MIN_TIMEOUT
focal_class.declarator: frontEndPluginFactory
focal_class.modifier: private final
focal_class.original_string: private final FrontendPluginFactory frontEndPluginFactory;
focal_class.type: FrontendPluginFactory
focal_class.var_name: frontEndPluginFactory
focal_class.declarator: workingDirectory
focal_class.modifier: private final
focal_class.original_string: private final File workingDirectory;
focal_class.type: File
focal_class.var_name: workingDirectory
focal_class.declarator: conf
focal_class.modifier: private
focal_class.original_string: private ZeppelinConfiguration conf;
focal_class.type: ZeppelinConfiguration
focal_class.var_name: conf
focal_class.declarator: tabledataModulePath
focal_class.modifier: private
focal_class.original_string: private File tabledataModulePath;
focal_class.type: File
focal_class.var_name: tabledataModulePath
focal_class.declarator: visualizationModulePath
focal_class.modifier: private
focal_class.original_string: private File visualizationModulePath;
focal_class.type: File
focal_class.var_name: visualizationModulePath
focal_class.declarator: defaultNodeRegistryUrl
focal_class.modifier: private
focal_class.original_string: private String defaultNodeRegistryUrl;
focal_class.type: String
focal_class.var_name: defaultNodeRegistryUrl
focal_class.declarator: defaultNpmRegistryUrl
focal_class.modifier: private
focal_class.original_string: private String defaultNpmRegistryUrl;
focal_class.type: String
focal_class.var_name: defaultNpmRegistryUrl
focal_class.declarator: gson
focal_class.modifier: private
focal_class.original_string: private Gson gson;
focal_class.type: Gson
focal_class.var_name: gson
focal_class.declarator: nodeAndNpmInstalled = false
focal_class.modifier: private
focal_class.original_string: private boolean nodeAndNpmInstalled = false;
focal_class.type: boolean
focal_class.var_name: nodeAndNpmInstalled
focal_class.declarator: bundleCacheKey = ""
focal_class.original_string: String bundleCacheKey = "";
focal_class.type: String
focal_class.var_name: bundleCacheKey
focal_class.declarator: currentBundle
focal_class.original_string: File currentBundle;
focal_class.type: File
focal_class.var_name: currentBundle
focal_class.declarator: out  = new ByteArrayOutputStream()
focal_class.original_string: ByteArrayOutputStream out  = new ByteArrayOutputStream();
focal_class.type: ByteArrayOutputStream
focal_class.var_name: out
focal_class.file: smart-zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java
focal_class.identifier: HeliumVisualizationFactory
focal_class.class_method_signature: HeliumVisualizationFactory.HeliumVisualizationFactory(
        ZeppelinConfiguration conf,
        File moduleDownloadPath,
        File tabledataModulePath,
        File visualizationModulePath)
focal_class.full_signature: public  HeliumVisualizationFactory(
        ZeppelinConfiguration conf,
        File moduleDownloadPath,
        File tabledataModulePath,
        File visualizationModulePath)
focal_class.identifier: HeliumVisualizationFactory
focal_class.modifiers: public
focal_class.parameters: (
        ZeppelinConfiguration conf,
        File moduleDownloadPath,
        File tabledataModulePath,
        File visualizationModulePath)
focal_class.signature:  HeliumVisualizationFactory(
        ZeppelinConfiguration conf,
        File moduleDownloadPath,
        File tabledataModulePath,
        File visualizationModulePath)
focal_class.class_method_signature: HeliumVisualizationFactory.HeliumVisualizationFactory(
        ZeppelinConfiguration conf,
        File moduleDownloadPath)
focal_class.full_signature: public  HeliumVisualizationFactory(
        ZeppelinConfiguration conf,
        File moduleDownloadPath)
focal_class.identifier: HeliumVisualizationFactory
focal_class.modifiers: public
focal_class.parameters: (
        ZeppelinConfiguration conf,
        File moduleDownloadPath)
focal_class.signature:  HeliumVisualizationFactory(
        ZeppelinConfiguration conf,
        File moduleDownloadPath)
focal_class.class_method_signature: HeliumVisualizationFactory.installNodeAndNpm()
focal_class.full_signature:  void installNodeAndNpm()
focal_class.identifier: installNodeAndNpm
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void installNodeAndNpm()
focal_class.class_method_signature: HeliumVisualizationFactory.getProxyConfig(boolean isSecure)
focal_class.full_signature: private ProxyConfig getProxyConfig(boolean isSecure)
focal_class.identifier: getProxyConfig
focal_class.modifiers: private
focal_class.parameters: (boolean isSecure)
focal_class.return: ProxyConfig
focal_class.signature: ProxyConfig getProxyConfig(boolean isSecure)
focal_class.class_method_signature: HeliumVisualizationFactory.generateProxy(String proxyId, URI uri)
focal_class.full_signature: private ProxyConfig.Proxy generateProxy(String proxyId, URI uri)
focal_class.identifier: generateProxy
focal_class.modifiers: private
focal_class.parameters: (String proxyId, URI uri)
focal_class.return: ProxyConfig.Proxy
focal_class.signature: ProxyConfig.Proxy generateProxy(String proxyId, URI uri)
focal_class.class_method_signature: HeliumVisualizationFactory.isSecure(String url)
focal_class.full_signature: private boolean isSecure(String url)
focal_class.identifier: isSecure
focal_class.modifiers: private
focal_class.parameters: (String url)
focal_class.return: boolean
focal_class.signature: boolean isSecure(String url)
focal_class.class_method_signature: HeliumVisualizationFactory.bundle(List<HeliumPackage> pkgs)
focal_class.full_signature: public File bundle(List<HeliumPackage> pkgs)
focal_class.identifier: bundle
focal_class.modifiers: public
focal_class.parameters: (List<HeliumPackage> pkgs)
focal_class.return: File
focal_class.signature: File bundle(List<HeliumPackage> pkgs)
focal_class.class_method_signature: HeliumVisualizationFactory.bundle(List<HeliumPackage> pkgs, boolean forceRefresh)
focal_class.full_signature: public synchronized File bundle(List<HeliumPackage> pkgs, boolean forceRefresh)
focal_class.identifier: bundle
focal_class.modifiers: public synchronized
focal_class.parameters: (List<HeliumPackage> pkgs, boolean forceRefresh)
focal_class.return: File
focal_class.signature: File bundle(List<HeliumPackage> pkgs, boolean forceRefresh)
focal_class.class_method_signature: HeliumVisualizationFactory.getWebpackResultFromOutput(String output)
focal_class.full_signature: private WebpackResult getWebpackResultFromOutput(String output)
focal_class.identifier: getWebpackResultFromOutput
focal_class.modifiers: private
focal_class.parameters: (String output)
focal_class.return: WebpackResult
focal_class.signature: WebpackResult getWebpackResultFromOutput(String output)
focal_class.class_method_signature: HeliumVisualizationFactory.getCurrentBundle()
focal_class.full_signature: public File getCurrentBundle()
focal_class.identifier: getCurrentBundle
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: File
focal_class.signature: File getCurrentBundle()
focal_class.class_method_signature: HeliumVisualizationFactory.isLocalPackage(HeliumPackage pkg)
focal_class.full_signature: private boolean isLocalPackage(HeliumPackage pkg)
focal_class.identifier: isLocalPackage
focal_class.modifiers: private
focal_class.parameters: (HeliumPackage pkg)
focal_class.return: boolean
focal_class.signature: boolean isLocalPackage(HeliumPackage pkg)
focal_class.class_method_signature: HeliumVisualizationFactory.getNpmModuleNameAndVersion(HeliumPackage pkg)
focal_class.full_signature: private String[] getNpmModuleNameAndVersion(HeliumPackage pkg)
focal_class.identifier: getNpmModuleNameAndVersion
focal_class.modifiers: private
focal_class.parameters: (HeliumPackage pkg)
focal_class.return: String[]
focal_class.signature: String[] getNpmModuleNameAndVersion(HeliumPackage pkg)
focal_class.class_method_signature: HeliumVisualizationFactory.install(HeliumPackage pkg)
focal_class.full_signature: synchronized void install(HeliumPackage pkg)
focal_class.identifier: install
focal_class.modifiers: synchronized
focal_class.parameters: (HeliumPackage pkg)
focal_class.return: void
focal_class.signature: void install(HeliumPackage pkg)
focal_class.class_method_signature: HeliumVisualizationFactory.npmCommand(String args)
focal_class.full_signature: private void npmCommand(String args)
focal_class.identifier: npmCommand
focal_class.modifiers: private
focal_class.parameters: (String args)
focal_class.return: void
focal_class.signature: void npmCommand(String args)
focal_class.class_method_signature: HeliumVisualizationFactory.npmCommand(String args, Map<String, String> env)
focal_class.full_signature: private void npmCommand(String args, Map<String, String> env)
focal_class.identifier: npmCommand
focal_class.modifiers: private
focal_class.parameters: (String args, Map<String, String> env)
focal_class.return: void
focal_class.signature: void npmCommand(String args, Map<String, String> env)
focal_class.class_method_signature: HeliumVisualizationFactory.configureLogger()
focal_class.full_signature: private void configureLogger()
focal_class.identifier: configureLogger
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void configureLogger()
focal_method.body: void installNodeAndNpm() {
      if (nodeAndNpmInstalled) {
        return;
      }
      try {
        NPMInstaller npmInstaller = frontEndPluginFactory
            .getNPMInstaller(getProxyConfig(isSecure(defaultNpmRegistryUrl)));
        npmInstaller.setNpmVersion(NPM_VERSION);
        npmInstaller.install();
  
        NodeInstaller nodeInstaller = frontEndPluginFactory
            .getNodeInstaller(getProxyConfig(isSecure(defaultNodeRegistryUrl)));
        nodeInstaller.setNodeVersion(NODE_VERSION);
        nodeInstaller.install();
        configureLogger();
        nodeAndNpmInstalled = true;
      } catch (InstallationException e) {
        logger.error(e.getMessage(), e);
      }
    }
focal_method.class_method_signature: HeliumVisualizationFactory.installNodeAndNpm()
focal_method.full_signature:  void installNodeAndNpm()
focal_method.identifier: installNodeAndNpm
focal_method.invocations: getNPMInstaller getProxyConfig isSecure setNpmVersion install getNodeInstaller getProxyConfig isSecure setNodeVersion install configureLogger error getMessage
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void installNodeAndNpm()