hudson.plugins.nodejs
Class NodeJsCommandInterpreter

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by hudson.tasks.CommandInterpreter
              extended by hudson.plugins.nodejs.NodeJsCommandInterpreter
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep

public class NodeJsCommandInterpreter
extends hudson.tasks.CommandInterpreter

This class executes a JavaScript file using node. The file should contain NodeJS script specified in the job configuration.

Author:
cliffano

Nested Class Summary
static class NodeJsCommandInterpreter.NodeJsDescriptor
          Provides builder details for the job configuration page.
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static NodeJsCommandInterpreter.NodeJsDescriptor DESCRIPTOR
           
 
Fields inherited from class hudson.tasks.CommandInterpreter
command
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
NodeJsCommandInterpreter(java.lang.String command)
          Constructs a NodeJsCommandInterpreter with specified command.
 
Method Summary
 java.lang.String[] buildCommandLine(hudson.FilePath filePath)
          Builds the command line.
 java.lang.String getContents()
           
 hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()
           
 java.lang.String getFileExtension()
           
 
Methods inherited from class hudson.tasks.CommandInterpreter
getCommand, perform, perform
 
Methods inherited from class hudson.tasks.Builder
all, getProjectAction, getRequiredMonitorService, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, prebuild
 

Field Detail

DESCRIPTOR

@Extension
public static final NodeJsCommandInterpreter.NodeJsDescriptor DESCRIPTOR
Constructor Detail

NodeJsCommandInterpreter

public NodeJsCommandInterpreter(java.lang.String command)
Constructs a NodeJsCommandInterpreter with specified command.

Parameters:
command - the NodeJS script
Method Detail

buildCommandLine

public java.lang.String[] buildCommandLine(hudson.FilePath filePath)
Builds the command line.

Specified by:
buildCommandLine in class hudson.tasks.CommandInterpreter
Parameters:
filePath -
Returns:
an array containing node command and the script location

getContents

public java.lang.String getContents()
Specified by:
getContents in class hudson.tasks.CommandInterpreter
Returns:
the command

getFileExtension

public java.lang.String getFileExtension()
Specified by:
getFileExtension in class hudson.tasks.CommandInterpreter
Returns:
the file extension

getDescriptor

public hudson.model.Descriptor<hudson.tasks.Builder> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>
Overrides:
getDescriptor in class hudson.tasks.Builder
Returns:
the descriptor


Copyright © 2010. All Rights Reserved.