org.gudy.azureus2.plugins.sharing
Interface ShareResource

All Known Subinterfaces:
ShareResourceDir, ShareResourceDirContents, ShareResourceFile
All Known Implementing Classes:
ShareResourceDirContentsImpl, ShareResourceDirContentsImpl.shareNode, ShareResourceDirImpl, ShareResourceFileImpl, ShareResourceFileOrDirImpl, ShareResourceImpl

public interface ShareResource

Author:
parg

Field Summary
static int ST_DIR
           
static int ST_DIR_CONTENTS
           
static int ST_FILE
           
 
Method Summary
 void addChangeListener(ShareResourceListener l)
           
 void addDeletionListener(ShareResourceWillBeDeletedListener l)
           
 boolean canBeDeleted()
           
 void delete()
           
 void delete(boolean force)
           
 java.lang.String getAttribute(TorrentAttribute attribute)
           
 TorrentAttribute[] getAttributes()
          get the defined attributes for this resource
 java.lang.String getName()
           
 ShareResourceDirContents getParent()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 int getType()
           
 boolean isPersistent()
           
 void removeChangeListener(ShareResourceListener l)
           
 void removeDeletionListener(ShareResourceWillBeDeletedListener l)
           
 void setAttribute(TorrentAttribute attribute, java.lang.String value)
           
 

Field Detail

ST_FILE

static final int ST_FILE
See Also:
Constant Field Values

ST_DIR

static final int ST_DIR
See Also:
Constant Field Values

ST_DIR_CONTENTS

static final int ST_DIR_CONTENTS
See Also:
Constant Field Values
Method Detail

getType

int getType()

getName

java.lang.String getName()

delete

void delete()
            throws ShareException,
                   ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

delete

void delete(boolean force)
            throws ShareException,
                   ShareResourceDeletionVetoException
Throws:
ShareException
ShareResourceDeletionVetoException

setAttribute

void setAttribute(TorrentAttribute attribute,
                  java.lang.String value)

getAttribute

java.lang.String getAttribute(TorrentAttribute attribute)
Parameters:
attribute -
Returns:
null if no value defined

getAttributes

TorrentAttribute[] getAttributes()
get the defined attributes for this resource

Returns:

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()

isPersistent

boolean isPersistent()

canBeDeleted

boolean canBeDeleted()
                     throws ShareResourceDeletionVetoException
Throws:
ShareResourceDeletionVetoException

getParent

ShareResourceDirContents getParent()

addChangeListener

void addChangeListener(ShareResourceListener l)

removeChangeListener

void removeChangeListener(ShareResourceListener l)

addDeletionListener

void addDeletionListener(ShareResourceWillBeDeletedListener l)

removeDeletionListener

void removeDeletionListener(ShareResourceWillBeDeletedListener l)