org.apache.maven.project.interpolation
Class AbstractStringBasedModelInterpolator

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.project.interpolation.AbstractStringBasedModelInterpolator
All Implemented Interfaces:
ModelInterpolator, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Direct Known Subclasses:
RegexBasedModelInterpolator, StringSearchModelInterpolator

Deprecated.

@Deprecated
public abstract class AbstractStringBasedModelInterpolator
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ModelInterpolator, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

Use a regular expression search to find and resolve expressions within the POM.

Author:
jdcasey Created on Feb 3, 2005

Field Summary
 
Fields inherited from interface org.apache.maven.project.interpolation.ModelInterpolator
BUILD_TIMESTAMP_FORMAT_PROPERTY, DEFAULT_BUILD_TIMESTAMP_FORMAT, ROLE
 
Constructor Summary
protected AbstractStringBasedModelInterpolator()
          Deprecated.  
protected AbstractStringBasedModelInterpolator(PathTranslator pathTranslator)
          Deprecated.  
 
Method Summary
protected abstract  Interpolator createInterpolator()
          Deprecated.  
protected  List<InterpolationPostProcessor> createPostProcessors(Model model, File projectDir, ProjectBuilderConfiguration config)
          Deprecated.  
protected  List<ValueSource> createValueSources(Model model, File projectDir, ProjectBuilderConfiguration config)
          Deprecated.  
protected  Interpolator getInterpolator()
          Deprecated.  
protected  RecursionInterceptor getRecursionInterceptor()
          Deprecated.  
 void initialize()
          Deprecated.  
 Model interpolate(Model model, File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled)
          Deprecated.  
 Model interpolate(Model model, Map<String,?> context)
          Deprecated.  
 Model interpolate(Model model, Map<String,?> context, boolean strict)
          Deprecated. Use ModelInterpolator.interpolate(Model, File, ProjectBuilderConfiguration, boolean) instead.
 String interpolate(String src, Model model, File projectDir, ProjectBuilderConfiguration config, boolean debug)
          Deprecated. Interpolates all expressions in the src parameter.
protected  String interpolateInternal(String src, List<ValueSource> valueSources, List<InterpolationPostProcessor> postProcessors, boolean debug)
          Deprecated.  
protected  void setRecursionInterceptor(RecursionInterceptor recursionInterceptor)
          Deprecated.  
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractStringBasedModelInterpolator

protected AbstractStringBasedModelInterpolator(PathTranslator pathTranslator)
Deprecated. 

AbstractStringBasedModelInterpolator

protected AbstractStringBasedModelInterpolator()
Deprecated. 
Throws:
IOException - This exception is not thrown any more, and needs to be removed.
Method Detail

interpolate

public Model interpolate(Model model,
                         Map<String,?> context)
                  throws ModelInterpolationException
Deprecated. 
Specified by:
interpolate in interface ModelInterpolator
Throws:
ModelInterpolationException

interpolate

public Model interpolate(Model model,
                         Map<String,?> context,
                         boolean strict)
                  throws ModelInterpolationException
Deprecated. Use ModelInterpolator.interpolate(Model, File, ProjectBuilderConfiguration, boolean) instead.

Serialize the inbound Model instance to a StringWriter, perform the regex replacement to resolve POM expressions, then re-parse into the resolved Model instance.
NOTE: This will result in a different instance of Model being returned!!!

Specified by:
interpolate in interface ModelInterpolator
Parameters:
model - The inbound Model instance, to serialize and reference for expression resolution
context - The other context map to be used during resolution
Returns:
The resolved instance of the inbound Model. This is a different instance!
Throws:
ModelInterpolationException

interpolate

public Model interpolate(Model model,
                         File projectDir,
                         ProjectBuilderConfiguration config,
                         boolean debugEnabled)
                  throws ModelInterpolationException
Deprecated. 
Specified by:
interpolate in interface ModelInterpolator
Throws:
ModelInterpolationException

interpolate

public String interpolate(String src,
                          Model model,
                          File projectDir,
                          ProjectBuilderConfiguration config,
                          boolean debug)
                   throws ModelInterpolationException
Deprecated. 
Interpolates all expressions in the src parameter.

The algorithm used for each expression is:


createValueSources

protected List<ValueSource> createValueSources(Model model,
                                               File projectDir,
                                               ProjectBuilderConfiguration config)
Deprecated. 

createPostProcessors

protected List<InterpolationPostProcessor> createPostProcessors(Model model,
                                                                File projectDir,
                                                                ProjectBuilderConfiguration config)
Deprecated. 

interpolateInternal

protected String interpolateInternal(String src,
                                     List<ValueSource> valueSources,
                                     List<InterpolationPostProcessor> postProcessors,
                                     boolean debug)
                              throws ModelInterpolationException
Deprecated. 
Throws:
ModelInterpolationException

getRecursionInterceptor

protected RecursionInterceptor getRecursionInterceptor()
Deprecated. 

setRecursionInterceptor

protected void setRecursionInterceptor(RecursionInterceptor recursionInterceptor)
Deprecated. 

createInterpolator

protected abstract Interpolator createInterpolator()
Deprecated. 

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Deprecated. 
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

getInterpolator

protected final Interpolator getInterpolator()
Deprecated. 


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.