Class MetaScript
- java.lang.Object
-
- hudson.plugins.project_inheritance.projects.view.scripts.MetaScript
-
public class MetaScript extends Object
This class encapsulates a script and the metadata surrounding it.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
callable
This flag specifies, whether the file ought to be called from a control file -- or not.String
content
The content of the script file.File
file
The file path that should be used for the script file.String
shebang
This is the shebang line from the content, all neatly parsed out and without the leading magic bytes.
-
Constructor Summary
Constructors Constructor Description MetaScript(String shebang, String content, File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isCallable()
void
setCallable(boolean isCallable)
-
-
-
Field Detail
-
shebang
public final String shebang
This is the shebang line from the content, all neatly parsed out and without the leading magic bytes.May be emtpy (e.g. for Windows CMD) but should not be null.
-
content
public final String content
The content of the script file. Line endings must be appropriate for the target platform.
-
file
public final File file
The file path that should be used for the script file.This must be a relative path, so that the script archive generator can properly create the build-flow control files.
Note that it is not necessary for this path to actually exist.
-
callable
protected boolean callable
This flag specifies, whether the file ought to be called from a control file -- or not.It is not final, because a script might start out as being callable, then be "called" by control file and thus turn not callable, to prevent double-invocation.
Note that this means that being executable and being callable are not the same thing. A script can be executed at some point, without being marked as callable in the end.
-
-