Package ome.services.scripts
Class ScriptFinder
- java.lang.Object
-
- ome.services.scripts.ScriptFinder
-
- Direct Known Subclasses:
PopulateRoiJob
public abstract class ScriptFinder extends java.lang.ObjectLooks up an official script based on path for internal use. The strategy here is to not only check for name, but also for the sha1 of the file, meaning that if a new version is published, it will be used. Also providescreateJob(ServiceFactory)method in order to allow simple creation of processors.- Since:
- Beta4.1
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description ScriptFinder(ome.system.Roles roles, java.lang.String uuid, ome.services.util.Executor executor, java.io.File source)ScriptFinder(ome.system.Roles roles, ome.system.Principal principal, ome.services.util.Executor executor, java.io.File source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ScriptJobcreateJob(ome.system.ServiceFactory sf)Returns a fresh (unsaved)ScriptJobwhich can be passed to acquireProcessor for background processing.OriginalFileIgetFile(ome.system.ServiceFactory sf)abstract java.lang.StringgetName()Subclasses should override to return the name of the file under scripts/ which should be uploaded.protected java.util.List<ome.model.core.OriginalFile>loadScripts(ome.system.ServiceFactory sf, ome.parameters.Parameters p)Load all scripts that match the name, hash, and format for script
-
-
-
Constructor Detail
-
ScriptFinder
public ScriptFinder(ome.system.Roles roles, java.lang.String uuid, ome.services.util.Executor executor, java.io.File source)
-
ScriptFinder
public ScriptFinder(ome.system.Roles roles, ome.system.Principal principal, ome.services.util.Executor executor, java.io.File source)
-
-
Method Detail
-
getName
public abstract java.lang.String getName()
Subclasses should override to return the name of the file under scripts/ which should be uploaded.
-
getFile
public OriginalFileI getFile(ome.system.ServiceFactory sf)
-
loadScripts
protected java.util.List<ome.model.core.OriginalFile> loadScripts(ome.system.ServiceFactory sf, ome.parameters.Parameters p)Load all scripts that match the name, hash, and format for script
-
-