Class DefaultEnforcementRuleHelper
java.lang.Object
org.apache.maven.plugins.enforcer.internal.DefaultEnforcementRuleHelper
- All Implemented Interfaces:
EnforcerRuleHelper
,org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
Default implementation of the EnforcementRuleHelper interface. This is used to help retrieve information from the
session and provide useful elements like the log.
- Author:
- Brian Fox
-
Constructor Summary
ConstructorDescriptionDefaultEnforcementRuleHelper
(org.apache.maven.execution.MavenSession session, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator, org.apache.maven.plugin.logging.Log log, org.codehaus.plexus.PlexusContainer container) Instantiates a new default enforcement rule helper. -
Method Summary
Modifier and TypeMethodDescriptionalignToBaseDirectory
(File theFile) <T> T
getComponent
(Class<T> clazz) <T> T
getComponent
(Class<T> clazz, String roleHint) getComponent
(String theComponentKey) getComponent
(String theRole, String theRoleHint) getComponentList
(String theRole) getComponentMap
(String theRole) org.codehaus.plexus.PlexusContainer
org.apache.maven.plugin.logging.Log
getLog()
-
Constructor Details
-
DefaultEnforcementRuleHelper
public DefaultEnforcementRuleHelper(org.apache.maven.execution.MavenSession session, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator, org.apache.maven.plugin.logging.Log log, org.codehaus.plexus.PlexusContainer container) Instantiates a new default enforcement rule helper.- Parameters:
session
- the sessionevaluator
- the evaluatorlog
- the logcontainer
- the container
-
-
Method Details
-
getLog
- Specified by:
getLog
in interfaceEnforcerRuleHelper
-
alignToBaseDirectory
- Specified by:
alignToBaseDirectory
in interfaceorg.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
-
evaluate
public Object evaluate(String theExpression) throws org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException - Specified by:
evaluate
in interfaceorg.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
- Throws:
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException
-
getComponent
public <T> T getComponent(Class<T> clazz) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException - Specified by:
getComponent
in interfaceEnforcerRuleHelper
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getComponent
public Object getComponent(String theComponentKey) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException - Specified by:
getComponent
in interfaceEnforcerRuleHelper
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getComponent
public Object getComponent(String theRole, String theRoleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException - Specified by:
getComponent
in interfaceEnforcerRuleHelper
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getComponentList
public List<Object> getComponentList(String theRole) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException - Specified by:
getComponentList
in interfaceEnforcerRuleHelper
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getComponentMap
public Map<String,Object> getComponentMap(String theRole) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException - Specified by:
getComponentMap
in interfaceEnforcerRuleHelper
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getComponent
public <T> T getComponent(Class<T> clazz, String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException - Specified by:
getComponent
in interfaceEnforcerRuleHelper
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
getContainer
- Specified by:
getContainer
in interfaceEnforcerRuleHelper
-
getCache
- Specified by:
getCache
in interfaceEnforcerRuleHelper
-