|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectome.services.scripts.ScriptUploader
public abstract class ScriptUploader
Start-up task which guarantees a script is added as a script to the server.
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 provides createJob()
method in order to allow simple creation
of processors.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
ScriptUploader(Principal principal,
Executor executor,
File source)
|
|
ScriptUploader(String uuid,
Executor executor,
File source)
|
Method Summary | |
---|---|
omero.model.ScriptJob |
createJob()
Returns a fresh (unsaved) ScriptJob which can be passed to
acquireProcessor for background processing. |
protected ome.model.core.OriginalFile |
createScript(byte[] buf,
String sha1,
ServiceFactory sf)
Create the original file and upload the bytes we've already read into memory. |
abstract String |
getName()
Subclasses should override to return the name of the file under scripts/ which should be uploaded. |
void |
init()
|
protected List<ome.model.core.OriginalFile> |
loadScripts(ServiceFactory sf,
ome.parameters.Parameters p)
Load all scripts that match the name, sha1, and format for script |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
Constructor Detail |
---|
public ScriptUploader(String uuid, Executor executor, File source)
public ScriptUploader(Principal principal, Executor executor, File source)
Method Detail |
---|
public abstract String getName()
public void init()
protected List<ome.model.core.OriginalFile> loadScripts(ServiceFactory sf, ome.parameters.Parameters p)
protected ome.model.core.OriginalFile createScript(byte[] buf, String sha1, ServiceFactory sf)
public omero.model.ScriptJob createJob()
ScriptJob
which can be passed to
acquireProcessor for background processing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Version: Beta-4.1.1-r5927-b91
Copyright © 2009 The University of Dundee. All Rights Reserved.