public class DefaultEnforcementRuleHelper extends java.lang.Object implements EnforcerRuleHelper
Modifier and Type | Field and Description |
---|---|
private org.codehaus.plexus.PlexusContainer |
container
The container.
|
private org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator |
evaluator
The evaluator.
|
private org.apache.maven.plugin.logging.Log |
log
The log.
|
private org.apache.maven.execution.MavenSession |
session
The session.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
alignToBaseDirectory(java.io.File theFile) |
java.lang.Object |
evaluate(java.lang.String theExpression) |
java.lang.Object |
getComponent(java.lang.Class clazz)
Gets the component.
|
java.lang.Object |
getComponent(java.lang.String theComponentKey)
Gets the component.
|
java.lang.Object |
getComponent(java.lang.String theRole,
java.lang.String theRoleHint)
Gets the component.
|
java.util.List |
getComponentList(java.lang.String theRole)
Gets the component list.
|
java.util.Map |
getComponentMap(java.lang.String theRole)
Gets the component map.
|
org.codehaus.plexus.PlexusContainer |
getContainer()
Gets the container.
|
org.apache.maven.plugin.logging.Log |
getLog()
Gets the log.
|
private org.apache.maven.plugin.logging.Log log
private org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator
private org.apache.maven.execution.MavenSession session
private org.codehaus.plexus.PlexusContainer container
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)
session
- the sessionevaluator
- the evaluatorlog
- the logcontainer
- the containerpublic org.apache.maven.plugin.logging.Log getLog()
EnforcerRuleHelper
getLog
in interface EnforcerRuleHelper
public java.io.File alignToBaseDirectory(java.io.File theFile)
alignToBaseDirectory
in interface org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
public java.lang.Object evaluate(java.lang.String theExpression) throws org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException
evaluate
in interface org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException
public java.lang.Object getComponent(java.lang.Class clazz) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelper
getComponent
in interface EnforcerRuleHelper
clazz
- the clazzorg.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exceptionpublic java.lang.Object getComponent(java.lang.String theComponentKey) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelper
getComponent
in interface EnforcerRuleHelper
theComponentKey
- the component keyorg.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exceptionpublic java.lang.Object getComponent(java.lang.String theRole, java.lang.String theRoleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelper
getComponent
in interface EnforcerRuleHelper
theRole
- the roletheRoleHint
- the role hintorg.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exceptionpublic java.util.List getComponentList(java.lang.String theRole) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelper
getComponentList
in interface EnforcerRuleHelper
theRole
- the roleorg.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exceptionpublic java.util.Map getComponentMap(java.lang.String theRole) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelper
getComponentMap
in interface EnforcerRuleHelper
theRole
- the roleorg.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exceptionpublic org.codehaus.plexus.PlexusContainer getContainer()
EnforcerRuleHelper
getContainer
in interface EnforcerRuleHelper