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

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceImpl
      extended by org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceDirContentsImpl
All Implemented Interfaces:
ShareResource, ShareResourceDirContents

public class ShareResourceDirContentsImpl
extends ShareResourceImpl
implements ShareResourceDirContents


Nested Class Summary
protected  class ShareResourceDirContentsImpl.shareNode
           
 
Field Summary
protected  ShareResource[] children
           
 
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 ShareResourceDirContentsImpl(ShareManagerImpl _manager, File _dir, boolean _recursive, boolean _personal, Map<String,String> _properties, boolean _async_check)
           
protected ShareResourceDirContentsImpl(ShareManagerImpl _manager, File _dir, boolean _recursive, Map _map)
           
 
Method Summary
 boolean canBeDeleted()
           
protected  void checkConsistency()
           
protected  List checkConsistency(File dir)
           
protected  void deleteInternal()
           
protected static ShareResourceImpl deserialiseResource(ShareManagerImpl manager, Map map)
           
 ShareResource[] getChildren()
           
 String getName()
           
 Map<String,String> getProperties()
           
 File getRoot()
           
 boolean isRecursive()
           
protected  void serialiseResource(Map map)
           
 
Methods inherited from class org.gudy.azureus2.pluginsimpl.local.sharing.ShareResourceImpl
addChangeListener, addDeletionListener, delete, delete, delete, deleteTorrent, getAttribute, getAttributes, 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
 
Methods inherited from interface org.gudy.azureus2.plugins.sharing.ShareResource
addChangeListener, addDeletionListener, delete, delete, getAttribute, getAttributes, getParent, getType, isPersistent, removeChangeListener, removeDeletionListener, setAttribute
 

Field Detail

children

protected ShareResource[] children
Constructor Detail

ShareResourceDirContentsImpl

protected ShareResourceDirContentsImpl(ShareManagerImpl _manager,
                                       File _dir,
                                       boolean _recursive,
                                       boolean _personal,
                                       Map<String,String> _properties,
                                       boolean _async_check)
                                throws ShareException
Throws:
ShareException

ShareResourceDirContentsImpl

protected ShareResourceDirContentsImpl(ShareManagerImpl _manager,
                                       File _dir,
                                       boolean _recursive,
                                       Map _map)
                                throws ShareException
Throws:
ShareException
Method Detail

canBeDeleted

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

checkConsistency

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

checkConsistency

protected List checkConsistency(File dir)
                         throws ShareException
Throws:
ShareException

deleteInternal

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

serialiseResource

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

deserialiseResource

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

getName

public String getName()
Specified by:
getName in interface ShareResource

getRoot

public File getRoot()
Specified by:
getRoot in interface ShareResourceDirContents

isRecursive

public boolean isRecursive()
Specified by:
isRecursive in interface ShareResourceDirContents

getChildren

public ShareResource[] getChildren()
Specified by:
getChildren in interface ShareResourceDirContents
Overrides:
getChildren in class ShareResourceImpl

getProperties

public Map<String,String> getProperties()
Specified by:
getProperties in interface ShareResource