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, java.io.File _dir, boolean _recursive, boolean _personal, java.util.Map<java.lang.String,java.lang.String> _properties, boolean _async_check)
           
protected ShareResourceDirContentsImpl(ShareManagerImpl _manager, java.io.File _dir, boolean _recursive, java.util.Map _map)
           
 
Method Summary
 boolean canBeDeleted()
           
protected  void checkConsistency()
           
protected  java.util.List checkConsistency(java.io.File dir)
           
protected  void deleteInternal()
           
protected static ShareResourceImpl deserialiseResource(ShareManagerImpl manager, java.util.Map map)
           
 ShareResource[] getChildren()
           
 java.lang.String getName()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.io.File getRoot()
           
 boolean isRecursive()
           
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, 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,
                                       java.io.File _dir,
                                       boolean _recursive,
                                       boolean _personal,
                                       java.util.Map<java.lang.String,java.lang.String> _properties,
                                       boolean _async_check)
                                throws ShareException
Throws:
ShareException

ShareResourceDirContentsImpl

protected ShareResourceDirContentsImpl(ShareManagerImpl _manager,
                                       java.io.File _dir,
                                       boolean _recursive,
                                       java.util.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 java.util.List checkConsistency(java.io.File dir)
                                   throws ShareException
Throws:
ShareException

deleteInternal

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

serialiseResource

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

deserialiseResource

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

getName

public java.lang.String getName()
Specified by:
getName in interface ShareResource

getRoot

public java.io.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 java.util.Map<java.lang.String,java.lang.String> getProperties()
Specified by:
getProperties in interface ShareResource