Package omero.grid
Class _ManagedRepositoryTie
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.grid._ManagedRepositoryDisp
-
- omero.grid._ManagedRepositoryTie
-
- All Implemented Interfaces:
Ice.Object
,Ice.TieBase
,java.io.Serializable
,java.lang.Cloneable
,_ManagedRepositoryOperations
,_ManagedRepositoryOperationsNC
,_RepositoryOperations
,_RepositoryOperationsNC
,ManagedRepository
,Repository
public class _ManagedRepositoryTie extends _ManagedRepositoryDisp implements Ice.TieBase
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Fields inherited from class omero.grid._ManagedRepositoryDisp
__ids
-
Fields inherited from interface omero.grid.ManagedRepository
ice_staticId
-
-
Constructor Summary
Constructors Constructor Description _ManagedRepositoryTie()
_ManagedRepositoryTie(_ManagedRepositoryOperations delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HandlePrx
deletePaths(java.lang.String[] paths, boolean recursively, boolean force, Ice.Current __current)
Delete several individual paths.boolean
equals(java.lang.Object rhs)
RawFileStorePrx
file(java.lang.String path, java.lang.String mode, Ice.Current __current)
Returns a special RawFileStore which permits only the operations set out in the options string ""wb"", ""a+"", etc.RawFileStorePrx
fileById(long id, Ice.Current __current)
boolean
fileExists(java.lang.String path, Ice.Current __current)
Returns true if the file or path exists within the repository.int
hashCode()
java.lang.Object
ice_delegate()
void
ice_delegate(java.lang.Object delegate)
ImportProcessPrx
importFileset(Fileset fs, ImportSettings settings, Ice.Current __current)
Returns anImportProcess
which can be used to upload files.ImportProcessPrx
importPaths(java.util.List<java.lang.String> filePaths, Ice.Current __current)
For clients without access to Bio-Formats, the simplifiedimportPaths
method allows passing solely the absolute path of the files to be uploaded (no directories) and all configuration happens server-side.java.util.List<java.lang.String>
list(java.lang.String path, Ice.Current __current)
Returns a set of strings naming the files and directories in the directory denoted by an abstract pathname.java.util.List<ChecksumAlgorithm>
listChecksumAlgorithms(Ice.Current __current)
Return the list of checksum algorithms supported by this repository for verifying the integrity of uploaded files.java.util.List<OriginalFile>
listFiles(java.lang.String path, Ice.Current __current)
Returns an array of abstract pathname objects denoting the files in the directory denoted by an abstract pathname.java.util.List<ImportProcessPrx>
listImports(Ice.Current __current)
List imports that are currently running in this importer.void
makeDir(java.lang.String path, boolean parents, Ice.Current __current)
Create a directory at the given path.java.lang.String
mimetype(java.lang.String path, Ice.Current __current)
Returns the best-guess mimetype for the given path.OriginalFile
register(java.lang.String path, RString mimetype, Ice.Current __current)
Create an OriginalFile in the database for the given path.OriginalFile
root(Ice.Current __current)
Return the OriginalFile descriptor for this Repository.java.util.List<java.lang.Long>
setChecksumAlgorithm(ChecksumAlgorithm hasher, java.util.List<java.lang.Long> ids, Ice.Current __current)
Set the checksum algorithm for the original files identified by the given IDs and calculate their checksum accordingly.ChecksumAlgorithm
suggestChecksumAlgorithm(java.util.List<ChecksumAlgorithm> supported, Ice.Current __current)
Suggest a checksum algorithm to use forImportSettings.checksumAlgorithm
according to the preferences set by the server administrator.RMap
treeList(java.lang.String path, Ice.Current __current)
Similar tolist
but recursive and returns only primitive values for the file at each location.java.util.List<java.lang.Long>
verifyChecksums(java.util.List<java.lang.Long> ids, Ice.Current __current)
Verify the checksum for the original files identified by the given IDs.-
Methods inherited from class omero.grid._ManagedRepositoryDisp
___importFileset, ___importPaths, ___listChecksumAlgorithms, ___listImports, ___setChecksumAlgorithm, ___suggestChecksumAlgorithm, ___verifyChecksums, __dispatch, __readImpl, __writeImpl, deletePaths, file, fileById, fileExists, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId, importFileset, importPaths, list, listChecksumAlgorithms, listFiles, listImports, makeDir, mimetype, register, root, setChecksumAlgorithm, suggestChecksumAlgorithm, treeList, verifyChecksums
-
Methods inherited from class Ice.ObjectImpl
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __read, __read, __readImpl, __write, __write, __writeImpl, clone, ice_dispatch, ice_dispatch, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
_ManagedRepositoryTie
public _ManagedRepositoryTie()
-
_ManagedRepositoryTie
public _ManagedRepositoryTie(_ManagedRepositoryOperations delegate)
-
-
Method Detail
-
ice_delegate
public java.lang.Object ice_delegate()
- Specified by:
ice_delegate
in interfaceIce.TieBase
-
ice_delegate
public void ice_delegate(java.lang.Object delegate)
- Specified by:
ice_delegate
in interfaceIce.TieBase
-
equals
public boolean equals(java.lang.Object rhs)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
importFileset
public ImportProcessPrx importFileset(Fileset fs, ImportSettings settings, Ice.Current __current) throws ServerError
Description copied from interface:_ManagedRepositoryOperations
Returns anImportProcess
which can be used to upload files. On_ImportProcessOperations.verifyUpload(java.util.List<java.lang.String>, Ice.Current)
, anHandle
will be returned which can be watched for knowing when the server-side import is complete. Client paths set in the fileset entries must /-separate their components. Once the upload is complete, theImportProcess
must be closed. Once_HandleOperations.getResponse(Ice.Current)
returns a non-null value, the handle instance can and must be closed.- Specified by:
importFileset
in interface_ManagedRepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
importPaths
public ImportProcessPrx importPaths(java.util.List<java.lang.String> filePaths, Ice.Current __current) throws ServerError
Description copied from interface:_ManagedRepositoryOperations
For clients without access to Bio-Formats, the simplifiedimportPaths
method allows passing solely the absolute path of the files to be uploaded (no directories) and all configuration happens server-side. Much of the functionality provided viaFileset
andImportSettings
is of course lost.- Specified by:
importPaths
in interface_ManagedRepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
listChecksumAlgorithms
public java.util.List<ChecksumAlgorithm> listChecksumAlgorithms(Ice.Current __current)
Description copied from interface:_ManagedRepositoryOperations
Return the list of checksum algorithms supported by this repository for verifying the integrity of uploaded files. They are named as ""algorithm-integer"", integer being the bit width of the resulting hash code. It is possible for the same algorithm to be offered with different bit widths. They are listed in descending order of preference, as set by the server administrator, and any of them may be specified forImportSettings.checksumAlgorithm
.- Specified by:
listChecksumAlgorithms
in interface_ManagedRepositoryOperations
- Parameters:
__current
- The Current object for the invocation.
-
listImports
public java.util.List<ImportProcessPrx> listImports(Ice.Current __current) throws ServerError
Description copied from interface:_ManagedRepositoryOperations
List imports that are currently running in this importer. These will be limited based on user/group membership for theFileset
object which is being created by the import. If the user has write permissions for the fileset, then the import will be included.- Specified by:
listImports
in interface_ManagedRepositoryOperations
- Parameters:
__current
- The Current object for the invocation.- Throws:
ServerError
-
setChecksumAlgorithm
public java.util.List<java.lang.Long> setChecksumAlgorithm(ChecksumAlgorithm hasher, java.util.List<java.lang.Long> ids, Ice.Current __current) throws ServerError
Description copied from interface:_ManagedRepositoryOperations
Set the checksum algorithm for the original files identified by the given IDs and calculate their checksum accordingly. The files must be in this repository. Existing checksums are checked before being changed. If a checksum does not match, ServerError will be thrown; in this case some other files may already have had their checksum algorithm set. Returns the IDs of the original files that did not already have a checksum set for the given algorithm.- Specified by:
setChecksumAlgorithm
in interface_ManagedRepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
suggestChecksumAlgorithm
public ChecksumAlgorithm suggestChecksumAlgorithm(java.util.List<ChecksumAlgorithm> supported, Ice.Current __current)
Description copied from interface:_ManagedRepositoryOperations
Suggest a checksum algorithm to use forImportSettings.checksumAlgorithm
according to the preferences set by the server administrator. Provide a list of the algorithms supported by the client, and the server will report which of them is most preferred by the server, or return null if none of them are supported.- Specified by:
suggestChecksumAlgorithm
in interface_ManagedRepositoryOperations
__current
- The Current object for the invocation.
-
verifyChecksums
public java.util.List<java.lang.Long> verifyChecksums(java.util.List<java.lang.Long> ids, Ice.Current __current) throws ServerError
Description copied from interface:_ManagedRepositoryOperations
Verify the checksum for the original files identified by the given IDs. The files must be in this repository. Returns the IDs of the original files whose checksums do not match the file on disk.- Specified by:
verifyChecksums
in interface_ManagedRepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
deletePaths
public HandlePrx deletePaths(java.lang.String[] paths, boolean recursively, boolean force, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Delete several individual paths. Internally, this converts all of the paths into a singleDelete2
command and submits it. If a ""recursively"" is true, then directories will be searched and all of their contained files will be placed before them in the delete order. When the directory is removed from the database, it will removed from the filesystem if and only if it is empty. If ""recursively"" is false, then the delete will produce an error according to the ""force"" flag. If ""force"" is false, this method attempts the delete of all given paths in a single transaction, and any failure will cause the entire transaction to fail. If ""force"" is true, however, then all the other deletes will succeed. which could possibly leave dangling files within no longer extant directories.- Specified by:
deletePaths
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
file
public RawFileStorePrx file(java.lang.String path, java.lang.String mode, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Returns a special RawFileStore which permits only the operations set out in the options string ""wb"", ""a+"", etc. FIXME: Initially only ""r"" and ""rw"" are supported as these are handled directly by RandomAccessFile and so don't break the current implementation. Any call to that tries to break the options will throw an ApiUsageException. If a file exists at the given path, a ValidationException will be thrown.- Specified by:
file
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
fileById
public RawFileStorePrx fileById(long id, Ice.Current __current) throws ServerError
- Specified by:
fileById
in interface_RepositoryOperations
- Throws:
ServerError
-
fileExists
public boolean fileExists(java.lang.String path, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Returns true if the file or path exists within the repository. In other words, if a call on `dirname path` tolistFiles
would return an object for this path.- Specified by:
fileExists
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
list
public java.util.List<java.lang.String> list(java.lang.String path, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Returns a set of strings naming the files and directories in the directory denoted by an abstract pathname.- Specified by:
list
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
listFiles
public java.util.List<OriginalFile> listFiles(java.lang.String path, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Returns an array of abstract pathname objects denoting the files in the directory denoted by an abstract pathname. It is expected that at a minimum the ""name"", ""path"", ""size"" and ""mtime"" attributes will be present for eachOriginalFile
instance.- Specified by:
listFiles
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
makeDir
public void makeDir(java.lang.String path, boolean parents, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Create a directory at the given path. If parents is true, then all preceding paths will be generated and no exception will be thrown if the directory already exists. Otherwise, all parent directories must exist in both the DB and on the filesystem and be readable.- Specified by:
makeDir
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
mimetype
public java.lang.String mimetype(java.lang.String path, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Returns the best-guess mimetype for the given path.- Specified by:
mimetype
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
register
public OriginalFile register(java.lang.String path, RString mimetype, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Create an OriginalFile in the database for the given path.- Specified by:
register
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
root
public OriginalFile root(Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Return the OriginalFile descriptor for this Repository. It will have the path of the repository's root on the underlying filesystem.- Specified by:
root
in interface_RepositoryOperations
- Parameters:
__current
- The Current object for the invocation.- Throws:
ServerError
-
treeList
public RMap treeList(java.lang.String path, Ice.Current __current) throws ServerError
Description copied from interface:_RepositoryOperations
Similar tolist
but recursive and returns only primitive values for the file at each location. Guaranteed for each path is only the values id and mimetype. After a call to unwrap, the returnedRMap
for a call to treeList("/user_1/dir0") might look something like:{ "/user_1/dir0/file1.txt" : { "id":10, "mimetype": "binary", "size": 10000L }, "/user_1/dir0/dir1" : { "id": 100, "mimetype": "Directory", "size": 0L, "files": { "/user_1/dir0/dir1/file1indir.txt" : { "id": 1, "mimetype": "png", "size": 500 } } } }
- Specified by:
treeList
in interface_RepositoryOperations
__current
- The Current object for the invocation.- Throws:
ServerError
-
-