use of jenkins.plugins.nodejs.tools.NodeJSInstallation.DescriptorImpl in project nodejs-plugin by jenkinsci.
the class NodeJSPlugin method setInstallations.
/**
* Set the NodeJS installation.
*
* @param installations an array of {@link NodeJSInstallation}
* @deprecated You should not set manually system NodeJS installation, in
* case use the standard
* {@link Jenkins#getDescriptorByType(Class)
* #setInstallations(NodeJSInstallation[])}
*/
@Deprecated
public void setInstallations(@NonNull NodeJSInstallation[] installations) {
DescriptorImpl descriptor = Jenkins.getActiveInstance().getDescriptorByType(NodeJSInstallation.DescriptorImpl.class);
if (descriptor != null) {
descriptor.setInstallations(installations != null ? installations : new NodeJSInstallation[0]);
descriptor.save();
}
}
Aggregations