org.gudy.azureus2.pluginsimpl.local.sharing
Class ShareResourceFileOrDirImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceImpl
      extended by org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceFileOrDirImpl
All Implemented Interfaces:
ShareResource
Direct Known Subclasses:
ShareResourceDirImpl, ShareResourceFileImpl

public abstract class ShareResourceFileOrDirImpl
extends ShareResourceImpl


Field Summary
 
Fields inherited from class org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceImpl
attributes, change_listeners, deletion_listeners, hasher, manager, parent, type
 
Fields inherited from interface org.gudy.azureus2.plugins.sharing.ShareResource
ST_DIR, ST_DIR_CONTENTS, ST_FILE
 
Constructor Summary
protected ShareResourceFileOrDirImpl(ShareManagerImpl _manager, int _type, File _file, Map _map)
           
protected ShareResourceFileOrDirImpl(ShareManagerImpl _manager, ShareResourceDirContentsImpl _parent, int _type, File _file, boolean _personal, Map<String,String> _properties)
           
 
Method Summary
 boolean canBeDeleted()
           
protected  void checkConsistency()
           
protected  void createTorrent()
           
protected  void deleteInternal()
           
protected static ShareResourceImpl deserialiseResource(ShareManagerImpl manager, Map map, int type)
           
 File getFile()
           
protected abstract  byte[] getFingerPrint()
           
 ShareItem getItem()
           
 String getName()
           
 Map<String,String> getProperties()
           
protected static ShareResourceImpl getResourceSupport(ShareManagerImpl _manager, File _file)
           
protected  void serialiseResource(Map map)
           
 
Methods inherited from class org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceImpl
addChangeListener, addDeletionListener, delete, delete, delete, deleteTorrent, getAttribute, getAttributes, getChildren, getFingerPrint, getFingerPrintSupport, getNewTorrentLocation, getParent, getTorrentFile, getType, inheritAttributes, isPersistent, readTorrent, removeChangeListener, removeDeletionListener, setAttribute, setParent, writeTorrent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShareResourceFileOrDirImpl

protected ShareResourceFileOrDirImpl(ShareManagerImpl _manager,
                                     ShareResourceDirContentsImpl _parent,
                                     int _type,
                                     File _file,
                                     boolean _personal,
                                     Map<String,String> _properties)
                              throws ShareException
Throws:
ShareException

ShareResourceFileOrDirImpl

protected ShareResourceFileOrDirImpl(ShareManagerImpl _manager,
                                     int _type,
                                     File _file,
                                     Map _map)
                              throws ShareException
Throws:
ShareException
Method Detail

getResourceSupport

protected static ShareResourceImpl getResourceSupport(ShareManagerImpl _manager,
                                                      File _file)
                                               throws ShareException
Throws:
ShareException

canBeDeleted

public boolean canBeDeleted()
                     throws ShareResourceDeletionVetoException
Specified by:
canBeDeleted in interface ShareResource
Specified by:
canBeDeleted in class ShareResourceImpl
Throws:
ShareResourceDeletionVetoException

getFingerPrint

protected abstract byte[] getFingerPrint()
                                  throws ShareException
Throws:
ShareException

createTorrent

protected void createTorrent()
                      throws ShareException
Throws:
ShareException

checkConsistency

protected void checkConsistency()
                         throws ShareException
Specified by:
checkConsistency in class ShareResourceImpl
Throws:
ShareException

deserialiseResource

protected static ShareResourceImpl deserialiseResource(ShareManagerImpl manager,
                                                       Map map,
                                                       int type)
                                                throws ShareException
Throws:
ShareException

serialiseResource

protected void serialiseResource(Map map)
Overrides:
serialiseResource in class ShareResourceImpl

deleteInternal

protected void deleteInternal()
Specified by:
deleteInternal in class ShareResourceImpl

getName

public String getName()

getFile

public File getFile()

getItem

public ShareItem getItem()

getProperties

public Map<String,String> getProperties()