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(java.lang.String template,
RepositoryDao dao)
Creates a
ProcessContainer internally that will not be managed
by background threads. |
ManagedRepositoryI(java.lang.String template,
RepositoryDao dao,
ProcessContainer processes,
ChecksumProviderFactory checksumProviderFactory,
java.lang.String checksumAlgorithmSupported,
java.lang.String pathRules,
java.lang.String rootSessionUuid,
Roles roles,
java.util.Set<java.lang.String> managedRepoUuids) |
Modifier and Type | Method and Description |
---|---|
protected FsFile |
commonRoot(java.util.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(java.lang.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 java.lang.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(java.util.List<java.lang.String> paths,
Ice.Current __current) |
void |
initialize(FileMaker fileMaker,
java.lang.Long id,
java.lang.String repoUuid)
Called by the internal repository once initialization has taken place.
|
java.util.List<omero.model.ChecksumAlgorithm> |
listChecksumAlgorithms(Ice.Current __current) |
java.util.List<omero.grid.ImportProcessPrx> |
listImports(Ice.Current __current) |
protected void |
makeCheckedDirs(java.util.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) |
java.util.List<java.lang.Long> |
setChecksumAlgorithm(omero.model.ChecksumAlgorithm toHasherWrapped,
java.util.List<java.lang.Long> ids,
Ice.Current __current) |
omero.model.ChecksumAlgorithm |
suggestChecksumAlgorithm(java.util.List<omero.model.ChecksumAlgorithm> supported,
Ice.Current __current) |
protected omero.grid.ImportLocation |
suggestImportPaths(FsFile relPath,
FsFile basePath,
java.util.List<FsFile> paths,
java.lang.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,
java.util.List<FsFile> fullPaths,
java.lang.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.
|
java.util.List<java.lang.Long> |
verifyChecksums(java.util.List<java.lang.Long> ids,
Ice.Current __current) |
checkPath, createRepoRFS, deletePaths, file, fileById, fileExists, findInDb, findOrCreateInDb, findOrCreateInDb, getFactory, getRepoUuid, list, listFiles, makeAdjustedCurrent, makeDir, makeDir, mimetype, persistLogFile, pixels, publishMessage, register, root, setApplicationContext, stackTraceAsString, submitRequest, sudo, treeList
protected FsFile templateRoot
public ManagedRepositoryI(java.lang.String template, RepositoryDao dao) throws java.lang.Exception
ProcessContainer
internally that will not be managed
by background threads. Used primarily during testing.template
- dao
- java.lang.Exception
public ManagedRepositoryI(java.lang.String template, RepositoryDao dao, ProcessContainer processes, ChecksumProviderFactory checksumProviderFactory, java.lang.String checksumAlgorithmSupported, java.lang.String pathRules, java.lang.String rootSessionUuid, Roles roles, java.util.Set<java.lang.String> managedRepoUuids) 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 void initialize(FileMaker fileMaker, java.lang.Long id, java.lang.String repoUuid) throws omero.ValidationException
PublicRepositoryI
initialize
in class PublicRepositoryI
omero.ValidationException
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(java.util.List<java.lang.String> paths, Ice.Current __current) throws omero.ServerError
importPaths
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public java.util.List<omero.grid.ImportProcessPrx> listImports(Ice.Current __current) throws omero.ServerError
listImports
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public java.util.List<omero.model.ChecksumAlgorithm> listChecksumAlgorithms(Ice.Current __current)
listChecksumAlgorithms
in interface omero.grid._ManagedRepositoryOperations
public omero.model.ChecksumAlgorithm suggestChecksumAlgorithm(java.util.List<omero.model.ChecksumAlgorithm> supported, Ice.Current __current)
suggestChecksumAlgorithm
in interface omero.grid._ManagedRepositoryOperations
public java.util.List<java.lang.Long> verifyChecksums(java.util.List<java.lang.Long> ids, Ice.Current __current) throws omero.ServerError
verifyChecksums
in interface omero.grid._ManagedRepositoryOperations
omero.ServerError
public java.util.List<java.lang.Long> setChecksumAlgorithm(omero.model.ChecksumAlgorithm toHasherWrapped, java.util.List<java.lang.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 java.lang.Class<? extends FormatReader> getReaderClass(omero.model.Fileset fs, Ice.Current __current)
fs
- a fileset__current
- the current ICE contextprotected FsFile commonRoot(java.util.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(java.lang.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, java.util.List<FsFile> fullPaths, java.lang.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, java.util.List<FsFile> paths, java.lang.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(java.util.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.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.