Interface EnforcerRuleHelper
-
- All Superinterfaces:
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator
- All Known Implementing Classes:
DefaultEnforcementRuleHelper
@Deprecated public interface EnforcerRuleHelper extends org.codehaus.plexus.component.configurator.expression.ExpressionEvaluatorDeprecated.Please see Writing a custom ruleThis is the interface that all helpers will use. This provides access to the log, session and components to the rules.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.ObjectgetCache(java.lang.String key, java.util.function.Supplier<?> producer)Deprecated.Gets a cached value, or uses the provided producer to compute it.<T> TgetComponent(java.lang.Class<T> clazz)Deprecated.Gets the component.<T> TgetComponent(java.lang.Class<T> clazz, java.lang.String roleHint)Deprecated.Gets the component.java.lang.ObjectgetComponent(java.lang.String componentKey)Deprecated.Gets the component.java.lang.ObjectgetComponent(java.lang.String role, java.lang.String roleHint)Deprecated.Gets the component.java.util.List<?>getComponentList(java.lang.String role)Deprecated.Gets the component list.java.util.Map<java.lang.String,?>getComponentMap(java.lang.String role)Deprecated.Gets the component map.org.codehaus.plexus.PlexusContainergetContainer()Deprecated.Gets the container.org.apache.maven.plugin.logging.LoggetLog()Deprecated.Gets the log.
-
-
-
Method Detail
-
getLog
@Nonnull org.apache.maven.plugin.logging.Log getLog()
Deprecated.Gets the log.- Returns:
- the log
-
getComponent
@Nonnull <T> T getComponent(java.lang.Class<T> clazz) throws org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionDeprecated.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 java.lang.Object getComponent(java.lang.String componentKey) throws org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionDeprecated.Gets the component.- Parameters:
componentKey- the component key- Returns:
- the component
- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException- the component lookup exception
-
getComponent
java.lang.Object getComponent(java.lang.String role, java.lang.String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionDeprecated.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(java.lang.Class<T> clazz, java.lang.String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionDeprecated.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
java.util.Map<java.lang.String,?> getComponentMap(java.lang.String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionDeprecated.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
java.util.List<?> getComponentList(java.lang.String role) throws org.codehaus.plexus.component.repository.exception.ComponentLookupExceptionDeprecated.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
java.lang.Object getCache(java.lang.String key, java.util.function.Supplier<?> producer)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
-
-