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, java.io.File _file, java.util.Map _map)
           
protected ShareResourceFileOrDirImpl(ShareManagerImpl _manager, ShareResourceDirContentsImpl _parent, int _type, java.io.File _file, boolean _personal, java.util.Map<java.lang.String,java.lang.String> _properties)
           
 
Method Summary
 boolean canBeDeleted()
           
protected  void checkConsistency()
           
protected  void createTorrent()
           
protected  void deleteInternal()
           
protected static ShareResourceImpl deserialiseResource(ShareManagerImpl manager, java.util.Map map, int type)
           
 java.io.File getFile()
           
protected abstract  byte[] getFingerPrint()
           
 ShareItem getItem()
           
 java.lang.String getName()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
protected static ShareResourceImpl getResourceSupport(ShareManagerImpl _manager, java.io.File _file)
           
protected  void serialiseResource(java.util.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,
                                     java.io.File _file,
                                     boolean _personal,
                                     java.util.Map<java.lang.String,java.lang.String> _properties)
                              throws ShareException
Throws:
ShareException

ShareResourceFileOrDirImpl

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

getResourceSupport

protected static ShareResourceImpl getResourceSupport(ShareManagerImpl _manager,
                                                      java.io.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,
                                                       java.util.Map map,
                                                       int type)
                                                throws ShareException
Throws:
ShareException

serialiseResource

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

deleteInternal

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

getName

public java.lang.String getName()

getFile

public java.io.File getFile()

getItem

public ShareItem getItem()

getProperties

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