Package ome.services.scripts
Class ScriptFileType
- java.lang.Object
-
- ome.services.scripts.ScriptFileType
-
public class ScriptFileType extends java.lang.Object
Definition of the script types that will be accepted by the server. Every instance ofScriptFileType
defined in the Spring context will be registered with theScriptRepoHelper
.- Since:
- 5.0.0
-
-
Constructor Summary
Constructors Constructor Description ScriptFileType(java.lang.String pattern, java.lang.String mimetype)
ScriptFileType(java.lang.String pattern, java.lang.String mimetype, java.lang.String launcher, java.lang.String process)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.io.filefilter.IOFileFilter
getFileFilter()
A file-pattern (most likely of the form "*.EXT") which will be used to determine if a file is of this type.java.lang.String
getLauncher()
Return the name of the launcher ("./run.exe") that is used for scripts of this type.java.lang.String
getMimetype()
Returns the mimetype that must be set on an original file instance in order to be considered of this type.java.lang.String
getProcess()
Return the import name of the process class which will be used to invoke scripts of this type.boolean
isInert()
Returnstrue
if the script type cannot be executed,false
otherwise.boolean
setMimetype(ome.model.core.OriginalFile ofile)
Sets the mimetype on the givenOriginalFile
if the name field matches thewildcard pattern
for this instance.
-
-
-
Method Detail
-
isInert
public boolean isInert()
Returnstrue
if the script type cannot be executed,false
otherwise.- Returns:
- See above.
-
getMimetype
public java.lang.String getMimetype()
Returns the mimetype that must be set on an original file instance in order to be considered of this type. Used in conjunction withgetFileFilter()
.
-
getFileFilter
public org.apache.commons.io.filefilter.IOFileFilter getFileFilter()
A file-pattern (most likely of the form "*.EXT") which will be used to determine if a file is of this type. Used in conjunction withgetMimetype()
.
-
getLauncher
public java.lang.String getLauncher()
Return the name of the launcher ("./run.exe") that is used for scripts of this type. This is a fairly easy way to modify what is called by the backend.
-
getProcess
public java.lang.String getProcess()
Return the import name of the process class which will be used to invoke scripts of this type. This permits developers to inject completely different process handling.
-
setMimetype
public boolean setMimetype(ome.model.core.OriginalFile ofile)
Sets the mimetype on the givenOriginalFile
if the name field matches thewildcard pattern
for this instance.
-
-