org.jenkinsci.plugins.tokenmacro.impl
Class PropertyFromFileMacro

java.lang.Object
  extended by org.jenkinsci.plugins.tokenmacro.TokenMacro
      extended by org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
          extended by org.jenkinsci.plugins.tokenmacro.impl.PropertyFromFileMacro
All Implemented Interfaces:
hudson.ExtensionPoint

@Extension
public class PropertyFromFileMacro
extends DataBoundTokenMacro

Expands to a property from a property file relative to the workspace root.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
DataBoundTokenMacro.Parameter
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 java.lang.String file
           
 java.lang.String property
           
 
Constructor Summary
PropertyFromFileMacro()
           
 
Method Summary
 boolean acceptsMacroName(java.lang.String macroName)
          Returns true if this object can evaluate the macro of the given name.
 java.lang.String evaluate(hudson.model.AbstractBuild<?,?> context, hudson.model.TaskListener listener, java.lang.String macroName)
           
 
Methods inherited from class org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro
evaluate
 
Methods inherited from class org.jenkinsci.plugins.tokenmacro.TokenMacro
all, expand, expandAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

public java.lang.String file

property

public java.lang.String property
Constructor Detail

PropertyFromFileMacro

public PropertyFromFileMacro()
Method Detail

acceptsMacroName

public boolean acceptsMacroName(java.lang.String macroName)
Description copied from class: TokenMacro
Returns true if this object can evaluate the macro of the given name.

Specified by:
acceptsMacroName in class TokenMacro
Parameters:
macroName - By convention we encourage all caps name.
Returns:
true ... to claim the macro of the given name and have TokenMacro.evaluate(AbstractBuild, TaskListener, String, Map, ListMultimap) called.

evaluate

public java.lang.String evaluate(hudson.model.AbstractBuild<?,?> context,
                                 hudson.model.TaskListener listener,
                                 java.lang.String macroName)
                          throws MacroEvaluationException,
                                 java.io.IOException,
                                 java.lang.InterruptedException
Specified by:
evaluate in class DataBoundTokenMacro
Throws:
MacroEvaluationException
java.io.IOException
java.lang.InterruptedException


Copyright © 2004-2011. All Rights Reserved.