Class ScriptFileType


  • public class ScriptFileType
    extends java.lang.Object
    Definition of the script types that will be accepted by the server. Every instance of ScriptFileType defined in the Spring context will be registered with the ScriptRepoHelper.
    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()
      Returns true if the script type cannot be executed, false otherwise.
      boolean setMimetype​(ome.model.core.OriginalFile ofile)
      Sets the mimetype on the given OriginalFile if the name field matches the wildcard pattern for this instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScriptFileType

        public ScriptFileType​(java.lang.String pattern,
                              java.lang.String mimetype)
      • ScriptFileType

        public ScriptFileType​(java.lang.String pattern,
                              java.lang.String mimetype,
                              java.lang.String launcher,
                              java.lang.String process)
    • Method Detail

      • isInert

        public boolean isInert()
        Returns true 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 with getFileFilter().
      • 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 with getMimetype().
      • 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 given OriginalFile if the name field matches the wildcard pattern for this instance.