org.apache.maven.plugin.enforcer
Class EvaluateBeanshell

java.lang.Object
  extended by org.apache.maven.plugin.enforcer.EvaluateBeanshell
All Implemented Interfaces:
org.apache.maven.shared.enforcer.rule.api.EnforcerRule

public class EvaluateBeanshell
extends java.lang.Object
implements org.apache.maven.shared.enforcer.rule.api.EnforcerRule

Author:
hugonnem Rule for Maven Enforcer using Beanshell to evaluate a conditional expression

Field Summary
 java.lang.String condition
          The condition to be evaluated.
 java.lang.String message
          The message to be printed in case the condition returns true
 
Constructor Summary
EvaluateBeanshell()
           
 
Method Summary
protected  boolean evaluateCondition(java.lang.String script, org.apache.maven.plugin.logging.Log log)
          Evaluate expression using Beanshell
 void execute(org.apache.maven.shared.enforcer.rule.api.EnforcerRuleHelper helper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

condition

public java.lang.String condition
The condition to be evaluated.


message

public java.lang.String message
The message to be printed in case the condition returns true

Constructor Detail

EvaluateBeanshell

public EvaluateBeanshell()
Method Detail

execute

public void execute(org.apache.maven.shared.enforcer.rule.api.EnforcerRuleHelper helper)
             throws org.apache.maven.shared.enforcer.rule.api.EnforcerRuleException
Specified by:
execute in interface org.apache.maven.shared.enforcer.rule.api.EnforcerRule
Throws:
org.apache.maven.shared.enforcer.rule.api.EnforcerRuleException

evaluateCondition

protected boolean evaluateCondition(java.lang.String script,
                                    org.apache.maven.plugin.logging.Log log)
Evaluate expression using Beanshell

Parameters:
script - the expression to be evaluated
log - the logger
Returns:
boolean the evaluation of the expression


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.