hudson.plugins.warnings
Class GroovyParser

java.lang.Object
  extended by hudson.plugins.warnings.GroovyParser

public class GroovyParser
extends java.lang.Object

Defines the properties of a warnings parser that uses a Groovy script to parse the warnings log.

Author:
Ulli Hafner

Constructor Summary
GroovyParser(java.lang.String name, java.lang.String regexp, java.lang.String script)
          Creates a new instance of GroovyParser.
 
Method Summary
static hudson.util.FormValidation doCheckName(java.lang.String name)
          Performs on-the-fly validation on the name of the parser that needs to be unique.
static hudson.util.FormValidation doCheckRegexp(java.lang.String regexp)
          Performs on-the-fly validation on the regular expression.
static hudson.util.FormValidation doCheckScript(java.lang.String script)
          Performs on-the-fly validation on the Groovy script.
 java.lang.String getName()
          Returns the name.
 java.lang.String getRegexp()
          Returns the regular expression.
 java.lang.String getScript()
          Returns the Groovy script.
 boolean hasMultiLineSupport()
          Returns whether the parser can scan messages spanning multiple lines.
 boolean isValid()
          Validates this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroovyParser

@DataBoundConstructor
public GroovyParser(java.lang.String name,
                                         java.lang.String regexp,
                                         java.lang.String script)
Creates a new instance of GroovyParser.

Parameters:
name - the name of the parser
regexp - the regular expression
script - the script to map the expression to a warning
Method Detail

isValid

public boolean isValid()
Validates this instance.

Returns:
true if this instance is valid, false otherwise

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

getRegexp

public java.lang.String getRegexp()
Returns the regular expression.

Returns:
the regular expression

getScript

public java.lang.String getScript()
Returns the Groovy script.

Returns:
the Groovy script

hasMultiLineSupport

public boolean hasMultiLineSupport()
Returns whether the parser can scan messages spanning multiple lines.

Returns:
true if the parser can scan messages spanning multiple lines

doCheckName

public static hudson.util.FormValidation doCheckName(java.lang.String name)
Performs on-the-fly validation on the name of the parser that needs to be unique.

Parameters:
name - the name of the parser
Returns:
the validation result

doCheckRegexp

public static hudson.util.FormValidation doCheckRegexp(java.lang.String regexp)
Performs on-the-fly validation on the regular expression.

Parameters:
regexp - the regular expression
Returns:
the validation result

doCheckScript

public static hudson.util.FormValidation doCheckScript(java.lang.String script)
Performs on-the-fly validation on the Groovy script.

Parameters:
script - the script
Returns:
the validation result


Copyright © 2004-2011. All Rights Reserved.