Package com.biglybt.pif.sharing
Interface ShareResource
-
- All Known Subinterfaces:
ShareResourceDir
,ShareResourceDirContents
,ShareResourceFile
- All Known Implementing Classes:
ShareResourceDirContentsImpl
,ShareResourceDirContentsImpl.shareNode
,ShareResourceDirImpl
,ShareResourceFileImpl
,ShareResourceFileOrDirImpl
,ShareResourceImpl
public interface ShareResource
-
-
Field Summary
Fields Modifier and Type Field Description static int
ST_DIR
static int
ST_DIR_CONTENTS
static int
ST_FILE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 resourcejava.lang.String
getName()
ShareResourceDirContents
getParent()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
int
getType()
boolean
isDeleted()
boolean
isPersistent()
void
removeChangeListener(ShareResourceListener l)
void
removeDeletionListener(ShareResourceWillBeDeletedListener l)
void
setAttribute(TorrentAttribute attribute, java.lang.String value)
void
setProperties(java.util.Map<java.lang.String,java.lang.String> props, boolean internal)
-
-
-
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
-
delete
void delete(boolean force) 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()
-
setProperties
void setProperties(java.util.Map<java.lang.String,java.lang.String> props, boolean internal)
-
isPersistent
boolean isPersistent()
-
canBeDeleted
boolean canBeDeleted() throws ShareResourceDeletionVetoException
-
isDeleted
boolean isDeleted()
-
getParent
ShareResourceDirContents getParent()
-
addChangeListener
void addChangeListener(ShareResourceListener l)
-
removeChangeListener
void removeChangeListener(ShareResourceListener l)
-
addDeletionListener
void addDeletionListener(ShareResourceWillBeDeletedListener l)
-
removeDeletionListener
void removeDeletionListener(ShareResourceWillBeDeletedListener l)
-
-