org.gudy.azureus2.plugins.sharing
Interface ShareManager

All Known Implementing Classes:
ShareManagerImpl

public interface ShareManager


Field Summary
static String PR_NETWORKS
           
static String PR_PERSISTENT
           
static String PR_PERSONAL
           
static String PR_TAGS
           
static String PR_USER_DATA
           
 
Method Summary
 ShareResourceDir addDir(File dir)
           
 ShareResourceDir addDir(File dir, Map<String,String> properties)
           
 ShareResourceDirContents addDirContents(File dir, boolean recursive)
           
 ShareResourceDirContents addDirContents(File dir, boolean recursive, Map<String,String> properties)
           
 ShareResourceFile addFile(File file)
           
 ShareResourceFile addFile(File file, Map<String,String> properties)
           
 void addListener(ShareManagerListener listener)
           
 void cancelOperation()
          adding shares can take a long time due to the torrent creation process.
 ShareResource getShare(File file_or_dir)
          returns null if share not defined
 ShareResource[] getShares()
           
 void initialise()
           
 boolean isInitialising()
           
 void removeListener(ShareManagerListener listener)
           
 

Field Detail

PR_PERSONAL

static final String PR_PERSONAL
See Also:
Constant Field Values

PR_NETWORKS

static final String PR_NETWORKS
See Also:
Constant Field Values

PR_TAGS

static final String PR_TAGS
See Also:
Constant Field Values

PR_USER_DATA

static final String PR_USER_DATA
See Also:
Constant Field Values

PR_PERSISTENT

static final String PR_PERSISTENT
See Also:
Constant Field Values
Method Detail

initialise

void initialise()
                throws ShareException
Throws:
ShareException

isInitialising

boolean isInitialising()

getShares

ShareResource[] getShares()

getShare

ShareResource getShare(File file_or_dir)
returns null if share not defined

Parameters:
file_or_dir -
Returns:

addFile

ShareResourceFile addFile(File file)
                          throws ShareException,
                                 ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addFile

ShareResourceFile addFile(File file,
                          Map<String,String> properties)
                          throws ShareException,
                                 ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDir

ShareResourceDir addDir(File dir)
                        throws ShareException,
                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDir

ShareResourceDir addDir(File dir,
                        Map<String,String> properties)
                        throws ShareException,
                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDirContents

ShareResourceDirContents addDirContents(File dir,
                                        boolean recursive)
                                        throws ShareException,
                                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

addDirContents

ShareResourceDirContents addDirContents(File dir,
                                        boolean recursive,
                                        Map<String,String> properties)
                                        throws ShareException,
                                               ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

cancelOperation

void cancelOperation()
adding shares can take a long time due to the torrent creation process. The current activity can be interrupted by calling this function, in which case the original activity will fail with a ShareException


addListener

void addListener(ShareManagerListener listener)

removeListener

void removeListener(ShareManagerListener listener)