org.jdto.mergers
Class AbstractGroovyMerger

java.lang.Object
  extended by org.jdto.mergers.AbstractGroovyMerger
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GroovyMerger, MultiGroovyMerger

public abstract class AbstractGroovyMerger
extends Object
implements Serializable

Base class for groovy mergers, contains the logic needed to bootstrap the groovy evaluator and the default scoped variables and imports.

Author:
Juan Alberto López Cavallotti
See Also:
Serialized Form

Field Summary
protected static org.codehaus.groovy.control.CompilerConfiguration currentConfiguration
           
protected  org.slf4j.Logger logger
           
static String LOGGER_VARIABLE_NAME
          The name of the variable used for the logger instance.
 
Constructor Summary
AbstractGroovyMerger()
           
 
Method Summary
protected  Object evaluateGroovyScript(groovy.lang.Binding binding, String expression)
           
protected  String getExpression(String[] extraParam)
           
 boolean isRestoreSupported(String[] params)
          Default implementation for mergers.
 Object restoreObject(Object object, String[] params)
          Groovy mergers does not support restore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER_VARIABLE_NAME

public static final String LOGGER_VARIABLE_NAME
The name of the variable used for the logger instance.

See Also:
Constant Field Values

currentConfiguration

protected static final org.codehaus.groovy.control.CompilerConfiguration currentConfiguration

logger

protected final org.slf4j.Logger logger
Constructor Detail

AbstractGroovyMerger

public AbstractGroovyMerger()
Method Detail

evaluateGroovyScript

protected Object evaluateGroovyScript(groovy.lang.Binding binding,
                                      String expression)

getExpression

protected String getExpression(String[] extraParam)

isRestoreSupported

public boolean isRestoreSupported(String[] params)
Default implementation for mergers.

Parameters:
params - parameters to take in consideration for restore purposes.
Returns:
false, groovy mergers does not support restore.

restoreObject

public Object restoreObject(Object object,
                            String[] params)
Groovy mergers does not support restore.

Parameters:
object - the object to restore.
params - the parrameters used to merge.
Returns:
null.


Copyright © 2013. All Rights Reserved.