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

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

protected class ShareResourceDirContentsImpl.shareNode
extends Object
implements ShareResourceDirContents


Field Summary
protected  File node
           
protected  ShareResource[] node_children
           
protected  ShareResourceDirContents node_parent
           
 
Fields inherited from interface org.gudy.azureus2.plugins.sharing.ShareResource
ST_DIR, ST_DIR_CONTENTS, ST_FILE
 
Constructor Summary
protected ShareResourceDirContentsImpl.shareNode(ShareResourceDirContents _parent, File _node, List kids)
           
 
Method Summary
 void addChangeListener(ShareResourceListener l)
           
 void addDeletionListener(ShareResourceWillBeDeletedListener l)
           
 boolean canBeDeleted()
           
 void delete()
           
 void delete(boolean force)
           
 String getAttribute(TorrentAttribute attribute)
           
 TorrentAttribute[] getAttributes()
          get the defined attributes for this resource
 ShareResource[] getChildren()
           
 String getName()
           
 ShareResourceDirContents getParent()
           
 Map<String,String> getProperties()
           
 File getRoot()
           
 int getType()
           
 boolean isPersistent()
           
 boolean isRecursive()
           
 void removeChangeListener(ShareResourceListener l)
           
 void removeDeletionListener(ShareResourceWillBeDeletedListener l)
           
 void setAttribute(TorrentAttribute attribute, String value)
           
protected  void setParent(ShareResourceDirContents _parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node_parent

protected ShareResourceDirContents node_parent

node

protected File node

node_children

protected ShareResource[] node_children
Constructor Detail

ShareResourceDirContentsImpl.shareNode

protected ShareResourceDirContentsImpl.shareNode(ShareResourceDirContents _parent,
                                                 File _node,
                                                 List kids)
Method Detail

getParent

public ShareResourceDirContents getParent()
Specified by:
getParent in interface ShareResource

setParent

protected void setParent(ShareResourceDirContents _parent)

getType

public int getType()
Specified by:
getType in interface ShareResource

getName

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

setAttribute

public void setAttribute(TorrentAttribute attribute,
                         String value)
Specified by:
setAttribute in interface ShareResource

getAttribute

public String getAttribute(TorrentAttribute attribute)
Specified by:
getAttribute in interface ShareResource
Returns:
null if no value defined

getAttributes

public TorrentAttribute[] getAttributes()
Description copied from interface: ShareResource
get the defined attributes for this resource

Specified by:
getAttributes in interface ShareResource
Returns:

delete

public void delete()
            throws ShareResourceDeletionVetoException
Specified by:
delete in interface ShareResource
Throws:
ShareResourceDeletionVetoException

delete

public void delete(boolean force)
            throws ShareException,
                   ShareResourceDeletionVetoException
Specified by:
delete in interface ShareResource
Throws:
ShareException
ShareResourceDeletionVetoException

canBeDeleted

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

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

getProperties

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

isPersistent

public boolean isPersistent()
Specified by:
isPersistent in interface ShareResource

addChangeListener

public void addChangeListener(ShareResourceListener l)
Specified by:
addChangeListener in interface ShareResource

removeChangeListener

public void removeChangeListener(ShareResourceListener l)
Specified by:
removeChangeListener in interface ShareResource

addDeletionListener

public void addDeletionListener(ShareResourceWillBeDeletedListener l)
Specified by:
addDeletionListener in interface ShareResource

removeDeletionListener

public void removeDeletionListener(ShareResourceWillBeDeletedListener l)
Specified by:
removeDeletionListener in interface ShareResource