Package omero.api
Interface _RawFileStoreOperations
-
- All Superinterfaces:
_ServiceInterfaceOperations
,_StatefulServiceInterfaceOperations
- All Known Subinterfaces:
RawFileStore
- All Known Implementing Classes:
_RawFileStoreDisp
,_RawFileStoreTie
,RawFileStoreI
,RepoRawFileStoreI
public interface _RawFileStoreOperations extends _StatefulServiceInterfaceOperations
Raw file gateway which provides access to the OMERO file repository. Note: methods on this service are protected by a DOWNLOAD restriction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
exists_async(AMD_RawFileStore_exists __cb, Ice.Current __current)
Checks to see if a raw file exists with the file ID that the service was initialized with.void
getFileId_async(AMD_RawFileStore_getFileId __cb, Ice.Current __current)
Returns the current file id or null if none has been set.void
read_async(AMD_RawFileStore_read __cb, long position, int length, Ice.Current __current)
Readslength
bytes of data at theposition
from the raw file into an array of bytes.void
save_async(AMD_RawFileStore_save __cb, Ice.Current __current)
Saves theOriginalFile
associated with the service if it has been modified.void
setFileId_async(AMD_RawFileStore_setFileId __cb, long fileId, Ice.Current __current)
This method manages the state of the service.void
size_async(AMD_RawFileStore_size __cb, Ice.Current __current)
Returns the size of the file on disk (not as stored in the database since that value will only be updated onsave
.void
truncate_async(AMD_RawFileStore_truncate __cb, long length, Ice.Current __current)
Limits the size of a file to the given length.void
write_async(AMD_RawFileStore_write __cb, byte[] buf, long position, int length, Ice.Current __current)
Writeslength
bytes of data from the specifiedbuf
byte array starting at atposition
to the raw file.-
Methods inherited from interface omero.api._StatefulServiceInterfaceOperations
activate_async, close_async, getCurrentEventContext_async, passivate_async
-
-
-
-
Method Detail
-
setFileId_async
void setFileId_async(AMD_RawFileStore_setFileId __cb, long fileId, Ice.Current __current) throws ServerError
This method manages the state of the service. This method will throw aSecurityViolation
if for the current user context either the file is not readable or aomero.constants.permissions.BINARYACCESS
restriction is in place.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
getFileId_async
void getFileId_async(AMD_RawFileStore_getFileId __cb, Ice.Current __current) throws ServerError
Returns the current file id or null if none has been set.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
read_async
void read_async(AMD_RawFileStore_read __cb, long position, int length, Ice.Current __current) throws ServerError
Readslength
bytes of data at theposition
from the raw file into an array of bytes.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
size_async
void size_async(AMD_RawFileStore_size __cb, Ice.Current __current) throws ServerError
Returns the size of the file on disk (not as stored in the database since that value will only be updated onsave
. If the file has not yet been written to, and therefore does not exist, aResourceError
will be thrown.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
truncate_async
void truncate_async(AMD_RawFileStore_truncate __cb, long length, Ice.Current __current) throws ServerError
Limits the size of a file to the given length. If the file is already shorter than length, no action is taken in which case false is returned.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
write_async
void write_async(AMD_RawFileStore_write __cb, byte[] buf, long position, int length, Ice.Current __current) throws ServerError
Writeslength
bytes of data from the specifiedbuf
byte array starting at atposition
to the raw file.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
exists_async
void exists_async(AMD_RawFileStore_exists __cb, Ice.Current __current) throws ServerError
Checks to see if a raw file exists with the file ID that the service was initialized with.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ResourceError
- if there is a problem accessing the file due to permissions errors within the repository or any other I/O error.ServerError
-
save_async
void save_async(AMD_RawFileStore_save __cb, Ice.Current __current) throws ServerError
Saves theOriginalFile
associated with the service if it has been modified. The returned valued should replace all instances of theOriginalFile
in the client. If save has not been called,RawFileStore
instances will save theOriginalFile
object associated with it onclose
. See also ticket 1651 and ticket 2161.- Parameters:
__cb
- The callback object for the operation.__current
- The Current object for the invocation.- Throws:
ServerError
-
-