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 java.lang.Object
implements ShareResourceDirContents


Field Summary
protected  java.io.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, java.io.File _node, java.util.List kids)
           
 
Method Summary
 void addChangeListener(ShareResourceListener l)
           
 void addDeletionListener(ShareResourceWillBeDeletedListener l)
           
 boolean canBeDeleted()
           
 void delete()
           
 void delete(boolean force)
           
 java.lang.String getAttribute(TorrentAttribute attribute)
           
 TorrentAttribute[] getAttributes()
          get the defined attributes for this resource
 ShareResource[] getChildren()
           
 java.lang.String getName()
           
 ShareResourceDirContents getParent()
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 java.io.File getRoot()
           
 int getType()
           
 boolean isPersistent()
           
 boolean isRecursive()
           
 void removeChangeListener(ShareResourceListener l)
           
 void removeDeletionListener(ShareResourceWillBeDeletedListener l)
           
 void setAttribute(TorrentAttribute attribute, java.lang.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 java.io.File node

node_children

protected ShareResource[] node_children
Constructor Detail

ShareResourceDirContentsImpl.shareNode

protected ShareResourceDirContentsImpl.shareNode(ShareResourceDirContents _parent,
                                                 java.io.File _node,
                                                 java.util.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 java.lang.String getName()
Specified by:
getName in interface ShareResource

setAttribute

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

getAttribute

public java.lang.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 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

getProperties

public java.util.Map<java.lang.String,java.lang.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