Package ome.services.scripts
Class ScriptFileType
- java.lang.Object
-
- ome.services.scripts.ScriptFileType
-
public class ScriptFileType extends java.lang.ObjectDefinition of the script types that will be accepted by the server. Every instance ofScriptFileTypedefined 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.IOFileFiltergetFileFilter()A file-pattern (most likely of the form "*.EXT") which will be used to determine if a file is of this type.java.lang.StringgetLauncher()Return the name of the launcher ("./run.exe") that is used for scripts of this type.java.lang.StringgetMimetype()Returns the mimetype that must be set on an original file instance in order to be considered of this type.java.lang.StringgetProcess()Return the import name of the process class which will be used to invoke scripts of this type.booleanisInert()Returnstrueif the script type cannot be executed,falseotherwise.booleansetMimetype(ome.model.core.OriginalFile ofile)Sets the mimetype on the givenOriginalFileif the name field matches thewildcard patternfor this instance.
-
-
-
Method Detail
-
isInert
public boolean isInert()
Returnstrueif the script type cannot be executed,falseotherwise.- 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 givenOriginalFileif the name field matches thewildcard patternfor this instance.
-
-