SmartFrog 3.10.000

org.smartfrog.services.filesystem.filestore
Interface LocalFilestore

All Superinterfaces:
FileUsingComponent, java.rmi.Remote
All Known Implementing Classes:
LocalFilestoreImpl

public interface LocalFilestore
extends FileUsingComponent

A filestore.


Field Summary
 
Fields inherited from interface org.smartfrog.services.filesystem.FileUsingComponent
ATTR_ABSOLUTE_PATH, ATTR_FILENAME, ATTR_URI
 
Method Summary
 FileEntry createNewFile(java.lang.String prefix, java.lang.String suffix)
          Create a new temp file
 boolean delete(java.net.URI uri)
          Delete an entry
 FileEntry lookup(java.net.URI uri)
          look up a file from a URI
 FileEntry uploadNewFile(java.lang.String prefix, java.lang.String suffix, byte[] content, java.lang.Object metadata)
          Create a new temp file
 

Method Detail

createNewFile

FileEntry createNewFile(java.lang.String prefix,
                        java.lang.String suffix)
                        throws SmartFrogException,
                               java.rmi.RemoteException
Create a new temp file

Parameters:
prefix - prefix
suffix - suffix
Returns:
a file entry describing both the file and the URL
Throws:
SmartFrogException - error in creating file
java.rmi.RemoteException - In case of network/rmi error

delete

boolean delete(java.net.URI uri)
               throws SmartFrogException,
                      java.rmi.RemoteException
Delete an entry

Parameters:
uri - uri of entry
Returns:
true if deletion worked
Throws:
SmartFrogException - error in deleting
java.rmi.RemoteException - In case of network/rmi error

lookup

FileEntry lookup(java.net.URI uri)
                 throws SmartFrogException,
                        java.rmi.RemoteException
look up a file from a URI

Parameters:
uri - uri
Returns:
FileEntry
Throws:
SmartFrogException - error in lookup
java.rmi.RemoteException - In case of network/rmi error

uploadNewFile

FileEntry uploadNewFile(java.lang.String prefix,
                        java.lang.String suffix,
                        byte[] content,
                        java.lang.Object metadata)
                        throws SmartFrogException,
                               java.rmi.RemoteException
Create a new temp file

Parameters:
prefix - prefix
suffix - suffix
content - the actual content of the file content
metadata - any metadata
Returns:
a file entry describing both the file and the URL
Throws:
SmartFrogException - error in creating file
java.rmi.RemoteException - In case of network/rmi error

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP