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 Mapprotected Listprivate booleanprotected Listprotected static BrokenMd5Hasherprotected ShareManagerImplprotected ShareResourceDirContentsprotected intFields inherited from interface ShareResource
ST_DIR, ST_DIR_CONTENTS, ST_FILE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedShareResourceImpl(ShareManagerImpl _manager, int _type) protectedShareResourceImpl(ShareManagerImpl _manager, int _type, Map _map) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidabstract booleanprotected abstract voidvoiddelete()voiddelete(boolean force) voiddelete(boolean force, boolean fire_listeners) protected voidprotected voiddeleteTorrent(ShareItemImpl item) protected voidfireChangeEvent(int type, boolean internal, Object data) getAttribute(TorrentAttribute attribute) get the defined attributes for this resourceprotected byte[]getFingerPrint(File file) protected voidgetFingerPrintSupport(StringBuffer buffer, File file, Set ignore_set) protected StringgetTorrentFile(ShareItemImpl item) intgetType()protected voidinheritAttributes(ShareResourceImpl source) booleanbooleanprotected voidreadTorrent(ShareItemImpl item) voidvoidprotected voidserialiseResource(Map map) voidsetAttribute(TorrentAttribute attribute, String value) protected voidsetParent(ShareResourceDirContents _parent) protected voidwriteTorrent(ShareItemImpl item) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
getParentin interfaceShareResource
-
getChildren
-
getType
public int getType()- Specified by:
getTypein interfaceShareResource
-
setAttribute
- Specified by:
setAttributein interfaceShareResource
-
fireChangeEvent
-
getAttribute
- Specified by:
getAttributein interfaceShareResource- Parameters:
attribute-- Returns:
- null if no value defined
-
getAttributes
Description copied from interface:ShareResourceget the defined attributes for this resource- Specified by:
getAttributesin interfaceShareResource- Returns:
-
delete
- Specified by:
deletein interfaceShareResource- Throws:
ShareExceptionShareResourceDeletionVetoException
-
delete
- Specified by:
deletein interfaceShareResource- Throws:
ShareExceptionShareResourceDeletionVetoException
-
delete
public void delete(boolean force, boolean fire_listeners) throws ShareException, ShareResourceDeletionVetoException -
canBeDeleted
- Specified by:
canBeDeletedin interfaceShareResource- Throws:
ShareResourceDeletionVetoException
-
isDeleted
public boolean isDeleted()- Specified by:
isDeletedin interfaceShareResource
-
isPersistent
public boolean isPersistent()- Specified by:
isPersistentin 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
-