org.apache.maven.plugins.enforcer
Class DefaultEnforcementRuleHelper

java.lang.Object
  extended by org.apache.maven.plugins.enforcer.DefaultEnforcementRuleHelper

public class DefaultEnforcementRuleHelper
extends Object

Default implementation of the EnforcementRuleHelper interface. This is used to help retrieve information from the session and provide useful elements like the log.

Version:
$Id: DefaultEnforcementRuleHelper.java 805190 2009-08-17 22:30:49Z hboutemy $
Author:
Brian Fox

Constructor Summary
DefaultEnforcementRuleHelper(MavenSession session, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator, Log log, org.codehaus.plexus.PlexusContainer container)
          Instantiates a new default enforcement rule helper.
 
Method Summary
 File alignToBaseDirectory(File theFile)
           
 Object evaluate(String theExpression)
           
 Object getComponent(Class clazz)
           
 Object getComponent(String theComponentKey)
           
 Object getComponent(String theRole, String theRoleHint)
           
 List getComponentList(String theRole)
           
 Map getComponentMap(String theRole)
           
 org.codehaus.plexus.PlexusContainer getContainer()
           
 Log getLog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEnforcementRuleHelper

public DefaultEnforcementRuleHelper(MavenSession session,
                                    org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator,
                                    Log log,
                                    org.codehaus.plexus.PlexusContainer container)
Instantiates a new default enforcement rule helper.

Parameters:
session - the session
evaluator - the evaluator
log - the log
container - the container
Method Detail

getLog

public Log getLog()

alignToBaseDirectory

public File alignToBaseDirectory(File theFile)

evaluate

public Object evaluate(String theExpression)
                throws org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException
Throws:
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException

getComponent

public Object getComponent(Class clazz)
                    throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getComponent

public Object getComponent(String theComponentKey)
                    throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getComponent

public Object getComponent(String theRole,
                           String theRoleHint)
                    throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getComponentList

public List getComponentList(String theRole)
                      throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getComponentMap

public Map getComponentMap(String theRole)
                    throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException

getContainer

public org.codehaus.plexus.PlexusContainer getContainer()


Copyright © 2007-2012 The Apache Software Foundation. All Rights Reserved.