Interface EnforcerRuleHelper
- All Superinterfaces:
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
@Deprecated
public interface EnforcerRuleHelper
extends org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
Deprecated.
Please see
Writing a custom rule
This is the interface that all helpers will use. This
provides access to the log, session and components to the
rules.
- Author:
- Brian Fox
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets a cached value, or uses the provided producer to compute it.<T> T
getComponent
(Class<T> clazz) Deprecated.Gets the component.<T> T
getComponent
(Class<T> clazz, String roleHint) Deprecated.Gets the component.getComponent
(String componentKey) Deprecated.Gets the component.getComponent
(String role, String roleHint) Deprecated.Gets the component.List
<?> getComponentList
(String role) Deprecated.Gets the component list.getComponentMap
(String role) Deprecated.Gets the component map.org.codehaus.plexus.PlexusContainer
Deprecated.Gets the container.org.apache.maven.plugin.logging.Log
getLog()
Deprecated.Gets the log.Methods inherited from interface org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
alignToBaseDirectory, evaluate
-
Method Details
-
getLog
Deprecated.Gets the log.- Returns:
- the log
-
getComponent
@Nonnull <T> T getComponent(Class<T> clazz) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException Deprecated.Gets the component.- Type Parameters:
T
- a class type- Parameters:
clazz
- the clazz- Returns:
- the component
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exception
-
getComponent
@Nonnull Object getComponent(String componentKey) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException Deprecated.Gets the component.- Parameters:
componentKey
- the component key- Returns:
- the component
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exception
-
getComponent
Object getComponent(String role, String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException Deprecated.Gets the component.- Parameters:
role
- the roleroleHint
- the role hint- Returns:
- the component
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exception
-
getComponent
<T> T getComponent(Class<T> clazz, String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException Deprecated.Gets the component.- Type Parameters:
T
- a class type- Parameters:
clazz
- the clazzroleHint
- the role hint- Returns:
- the component
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exception
-
getComponentMap
Map<String,?> getComponentMap(String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException Deprecated.Gets the component map.- Parameters:
role
- the role- Returns:
- the component map
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exception
-
getComponentList
List<?> getComponentList(String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException Deprecated.Gets the component list.- Parameters:
role
- the role- Returns:
- the component list
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
- the component lookup exception
-
getContainer
org.codehaus.plexus.PlexusContainer getContainer()Deprecated.Gets the container.- Returns:
- the container
-
getCache
Deprecated.Gets a cached value, or uses the provided producer to compute it.- Parameters:
key
- a key to identify the value storedproducer
- a supplier for the value if it's not already present- Returns:
- a previously-cached or freshly-computed value
-