eu.lindenbaum.maven.erlang
Class GetAppupDirectiveScript

java.lang.Object
  extended by eu.lindenbaum.maven.erlang.GetAppupDirectiveScript
All Implemented Interfaces:
Script<String>

public class GetAppupDirectiveScript
extends Object

A Script that returns the appup directive for a certain module. It is assumed that the module is neither newly introduced nor deleted in the update.

Since:
2.1.0
Author:
Tobias Schlager

Field Summary
protected  String script
           
 
Fields inherited from interface eu.lindenbaum.maven.erlang.Script
NL
 
Constructor Summary
GetAppupDirectiveScript(String module, File modulePath)
          Returns the appup directive for a certain module.
 
Method Summary
 String get()
          Returns an evaluateable String containing the erlang script of the implementing class.
 String handle(com.ericsson.otp.erlang.OtpErlangObject result)
          Converts the result of the Script execution into a String containing either "error" or the appup directive for the module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

script

protected final String script
Constructor Detail

GetAppupDirectiveScript

public GetAppupDirectiveScript(String module,
                               File modulePath)
                        throws org.apache.maven.plugin.MojoExecutionException
Returns the appup directive for a certain module.

Parameters:
module - to generate the directive for
modulePath - path to the parent directory of the module's beam file
Throws:
org.apache.maven.plugin.MojoExecutionException
Method Detail

get

public String get()
Description copied from interface: Script
Returns an evaluateable String containing the erlang script of the implementing class.

Returns:
An erlang script that can be evaluated.

handle

public String handle(com.ericsson.otp.erlang.OtpErlangObject result)
Converts the result of the Script execution into a String containing either "error" or the appup directive for the module.

Parameters:
result - to convert
Returns:
A String object, never null


Copyright © 2012 Lindenbaum GmbH. All Rights Reserved.