public class ManagedRepositoryI extends PublicRepositoryI implements omero.grid._ManagedRepositoryOperations
PublicRepositoryI.AMD_submit
Modifier and Type | Field and Description |
---|---|
protected FsFile |
templateRoot |
checksumAlgorithms, checksumProviderFactory, context, DIRECTORY_MIMETYPE, filePathRestrictions, IMPORT_LOG_MIMETYPE, repositoryDao, serverPaths
Constructor and Description |
---|
ManagedRepositoryI(String template,
RepositoryDao dao)
Creates a
ProcessContainer internally that will not be managed
by background threads. |
ManagedRepositoryI(String template,
RepositoryDao dao,
ProcessContainer processes,
ChecksumProviderFactory checksumProviderFactory,
String checksumAlgorithmSupported,
String pathRules,
String rootSessionUuid,
Roles roles) |
Modifier and Type | Method and Description |
---|---|
protected FsFile |
commonRoot(List<FsFile> paths)
From a list of paths, calculate the common root path that all share.
|
protected omero.grid.ImportProcessPrx |
createImportProcess(omero.model.Fileset fs,
omero.grid.ImportLocation location,
omero.grid.ImportSettings settings,
Ice.Current __current)
Creating the process will register itself in an appropriate
container (i.e. a SessionI or similar) for the current
user and therefore this instance no longer needs to worry
about the maintenance of the object.
|
protected FsFile |
createTemplatePath(Object consistentData,
Ice.Current __current)
Expand the template path and create its directories with the correct ownership.
|
protected omero.grid.ImportProcessPrx |
createUploadProcess(omero.model.Fileset fs,
omero.grid.ImportLocation location,
omero.grid.ImportSettings settings,
Ice.Current __current,
boolean uploadOnly)
Creating the process will register itself in an appropriate
container (i.e. a SessionI or similar) for the current
user and therefore this instance no longer needs to worry
about the maintenance of the object.
|
protected FsFile |
expandTemplateRootOwnedPath(omero.sys.EventContext ctx,
ServiceFactory sf)
Expand the root-owned segment of the template path.
|
protected Class<? extends FormatReader> |
getReaderClass(omero.model.Fileset fs,
Ice.Current __current)
Get the suggested BioFormats Reader for the given Fileset.
|
omero.grid.ImportProcessPrx |
importFileset(omero.model.Fileset fs,
omero.grid.ImportSettings settings,
Ice.Current __current)
Return a template based directory path.
|
omero.grid.ImportProcessPrx |
importPaths(List<String> paths,
Ice.Current __current) |
List<omero.model.ChecksumAlgorithm> |
listChecksumAlgorithms(Ice.Current __current) |
List<omero.grid.ImportProcessPrx> |
listImports(Ice.Current __current) |
protected void |
makeCheckedDirs(LinkedList<CheckedPath> paths,
boolean parents,
org.hibernate.Session s,
ServiceFactory sf,
SqlAction sql,
EventContext effectiveEventContext)
Checks for the top-level user directory restriction before calling
PublicRepositoryI.makeCheckedDirs(LinkedList, boolean, Session, ServiceFactory, SqlAction, ome.system.EventContext) |
List<Long> |
setChecksumAlgorithm(omero.model.ChecksumAlgorithm toHasherWrapped,
List<Long> ids,
Ice.Current __current) |
omero.model.ChecksumAlgorithm |
suggestChecksumAlgorithm(List<omero.model.ChecksumAlgorithm> supported,
Ice.Current __current) |
protected omero.grid.ImportLocation |
suggestImportPaths(FsFile relPath,
FsFile basePath,
List<FsFile> paths,
Class<? extends FormatReader> reader,
omero.model.ChecksumAlgorithm checksumAlgorithm,
Ice.Current __current)
Take a relative path that the user would like to see in his or her
upload area, and provide an import location instance whose paths
correspond to existing directories corresponding to the sanitized
file paths.
|
Ice.Object |
tie()
Wrap the current instance with an
TieBase so that it
can be turned into a proxy. |
protected ome.services.blitz.repo.ManagedRepositoryI.Paths |
trimPaths(FsFile basePath,
List<FsFile> fullPaths,
Class<? extends FormatReader> readerClass)
Trim off the start of long client-side paths.
|
omero.grid.ImportProcessPrx |
uploadFileset(omero.model.Fileset fs,
omero.grid.ImportSettings settings,
Ice.Current __current)
Return a template based directory path.
|
List<Long> |
verifyChecksums(List<Long> ids,
Ice.Current __current) |
checkPath, createRepoRFS, deletePaths, file, fileById, fileExists, findInDb, findOrCreateInDb, findOrCreateInDb, getFactory, getRepoUuid, initialize, list, listFiles, makeAdjustedCurrent, makeDir, makeDir, mimetype, persistLogFile, pixels, publishMessage, register, root, setApplicationContext, stackTraceAsString, submitRequest, sudo, treeList
protected FsFile templateRoot
public ManagedRepositoryI(String template, RepositoryDao dao) throws Exception
ProcessContainer
internally that will not be managed
by background threads. Used primarily during testing.template
- dao
- Exception
public ManagedRepositoryI(String template, RepositoryDao dao, ProcessContainer processes, ChecksumProviderFactory checksumProviderFactory, String checksumAlgorithmSupported, String pathRules, String rootSessionUuid, Roles roles) throws omero.ServerError
omero.ServerError
public Ice.Object tie()
PublicRepositoryI
TieBase
so that it
can be turned into a proxy. This is required due to the subclassing
between public repo instances.tie
in class PublicRepositoryI
public omero.grid.ImportProcessPrx uploadFileset(omero.model.Fileset fs, omero.grid.ImportSettings settings, Ice.Current __current) throws omero.ServerError
PublicRepositoryI.makeDir(String, boolean, Ice.Current)
.omero.ServerError
public omero.grid.ImportProcessPrx importFileset(omero.model.Fileset fs, omero.grid.ImportSettings settings, Ice.Current __current) throws omero.ServerError
PublicRepositoryI.makeDir(String, boolean, Ice.Current)
.importFileset
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public omero.grid.ImportProcessPrx importPaths(List<String> paths, Ice.Current __current) throws omero.ServerError
importPaths
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public List<omero.grid.ImportProcessPrx> listImports(Ice.Current __current) throws omero.ServerError
listImports
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public List<omero.model.ChecksumAlgorithm> listChecksumAlgorithms(Ice.Current __current)
listChecksumAlgorithms
in interface omero.grid._ManagedRepositoryOperations
public omero.model.ChecksumAlgorithm suggestChecksumAlgorithm(List<omero.model.ChecksumAlgorithm> supported, Ice.Current __current)
suggestChecksumAlgorithm
in interface omero.grid._ManagedRepositoryOperations
public List<Long> verifyChecksums(List<Long> ids, Ice.Current __current) throws omero.ServerError
verifyChecksums
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public List<Long> setChecksumAlgorithm(omero.model.ChecksumAlgorithm toHasherWrapped, List<Long> ids, Ice.Current __current) throws omero.ServerError
setChecksumAlgorithm
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
protected omero.grid.ImportProcessPrx createImportProcess(omero.model.Fileset fs, omero.grid.ImportLocation location, omero.grid.ImportSettings settings, Ice.Current __current) throws omero.ServerError
omero.ServerError
protected omero.grid.ImportProcessPrx createUploadProcess(omero.model.Fileset fs, omero.grid.ImportLocation location, omero.grid.ImportSettings settings, Ice.Current __current, boolean uploadOnly) throws omero.ServerError
omero.ServerError
protected Class<? extends FormatReader> getReaderClass(omero.model.Fileset fs, Ice.Current __current)
fs
- a fileset__current
- the current ICE contextprotected FsFile commonRoot(List<FsFile> paths)
paths
- some pathsprotected FsFile expandTemplateRootOwnedPath(omero.sys.EventContext ctx, ServiceFactory sf) throws omero.ServerError
ctx
- the event context to apply in expanding termssf
- the service factory which to perform queriesomero.ServerError
- if the path could not be expandedprotected FsFile createTemplatePath(Object consistentData, Ice.Current __current) throws omero.ServerError
consistentData
- the object to hash in expanding %hash%
__current
- the current ICE method invocation contextomero.ServerError
- if the new path could not be createdprotected ome.services.blitz.repo.ManagedRepositoryI.Paths trimPaths(FsFile basePath, List<FsFile> fullPaths, Class<? extends FormatReader> readerClass)
basePath
- the common rootfullPaths
- the full paths from the common root down to the filenamereaderClass
- BioFormats reader for data, may be nullprotected omero.grid.ImportLocation suggestImportPaths(FsFile relPath, FsFile basePath, List<FsFile> paths, Class<? extends FormatReader> reader, omero.model.ChecksumAlgorithm checksumAlgorithm, Ice.Current __current) throws omero.ServerError
relPath
- Path parsed from the templatebasePath
- Common base of all the listed paths ("/my/path")reader
- BioFormats reader for data, may be nullchecksumAlgorithm
- the checksum algorithm to use in verifying the integrity of uploaded filesImportLocation
instanceomero.ServerError
protected void makeCheckedDirs(LinkedList<CheckedPath> paths, boolean parents, org.hibernate.Session s, ServiceFactory sf, SqlAction sql, EventContext effectiveEventContext) throws omero.ServerError
PublicRepositoryI.makeCheckedDirs(LinkedList, boolean, Session, ServiceFactory, SqlAction, ome.system.EventContext)
makeCheckedDirs
in class PublicRepositoryI
paths
- Not null, not empty. (Will be emptied by this method.)parents
- "mkdir -p" like flag.s
- The sessionomero.ServerError
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.