Class ShareResourceImpl
java.lang.Object
com.biglybt.pifimpl.local.sharing.ShareResourceImpl
- All Implemented Interfaces:
ShareResource
- Direct Known Subclasses:
ShareResourceDirContentsImpl
,ShareResourceFileOrDirImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map
protected List
private boolean
protected List
protected static BrokenMd5Hasher
protected ShareManagerImpl
protected ShareResourceDirContents
protected int
Fields inherited from interface com.biglybt.pif.sharing.ShareResource
ST_DIR, ST_DIR_CONTENTS, ST_FILE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ShareResourceImpl
(ShareManagerImpl _manager, int _type) protected
ShareResourceImpl
(ShareManagerImpl _manager, int _type, Map _map) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
abstract boolean
protected abstract void
void
delete()
void
delete
(boolean force) void
delete
(boolean force, boolean fire_listeners) protected void
protected void
deleteTorrent
(ShareItemImpl item) protected void
fireChangeEvent
(int type, boolean internal, Object data) getAttribute
(TorrentAttribute attribute) get the defined attributes for this resourceprotected byte[]
getFingerPrint
(File file) protected void
getFingerPrintSupport
(StringBuffer buffer, File file, Set ignore_set) protected String
getTorrentFile
(ShareItemImpl item) int
getType()
protected void
inheritAttributes
(ShareResourceImpl source) boolean
boolean
protected void
readTorrent
(ShareItemImpl item) void
void
protected void
serialiseResource
(Map map) void
setAttribute
(TorrentAttribute attribute, String value) protected void
setParent
(ShareResourceDirContents _parent) protected void
writeTorrent
(ShareItemImpl item) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.sharing.ShareResource
getName, getProperties, setProperties
-
Field Details
-
hasher
-
manager
-
type
protected int type -
parent
-
attributes
-
change_listeners
-
deletion_listeners
-
deleted
private volatile boolean deleted
-
-
Constructor Details
-
Method Details
-
serialiseResource
-
getParent
- Specified by:
getParent
in interfaceShareResource
-
getChildren
-
getType
public int getType()- Specified by:
getType
in interfaceShareResource
-
setAttribute
- Specified by:
setAttribute
in interfaceShareResource
-
fireChangeEvent
-
getAttribute
- Specified by:
getAttribute
in interfaceShareResource
- Parameters:
attribute
-- Returns:
- null if no value defined
-
getAttributes
Description copied from interface:ShareResource
get the defined attributes for this resource- Specified by:
getAttributes
in interfaceShareResource
- Returns:
-
delete
- Specified by:
delete
in interfaceShareResource
- Throws:
ShareException
ShareResourceDeletionVetoException
-
delete
- Specified by:
delete
in interfaceShareResource
- Throws:
ShareException
ShareResourceDeletionVetoException
-
delete
public void delete(boolean force, boolean fire_listeners) throws ShareException, ShareResourceDeletionVetoException -
canBeDeleted
- Specified by:
canBeDeleted
in interfaceShareResource
- Throws:
ShareResourceDeletionVetoException
-
isDeleted
public boolean isDeleted()- Specified by:
isDeleted
in interfaceShareResource
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistent
in interfaceShareResource
-
deleteInternal
protected void deleteInternal() -
getFingerPrint
- Throws:
ShareException
-
getFingerPrintSupport
protected void getFingerPrintSupport(StringBuffer buffer, File file, Set ignore_set) throws ShareException - Throws:
ShareException
-
getNewTorrentLocation
- Throws:
ShareException
-
checkConsistency
- Throws:
ShareException
-