Class ShareResourceDirContentsImpl.shareNode
- java.lang.Object
-
- com.biglybt.pifimpl.local.sharing.ShareResourceDirContentsImpl.shareNode
-
- All Implemented Interfaces:
ShareResource
,ShareResourceDirContents
- Enclosing class:
- ShareResourceDirContentsImpl
protected class ShareResourceDirContentsImpl.shareNode extends java.lang.Object implements ShareResourceDirContents
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.File
node
protected ShareResource[]
node_children
protected ShareResourceDirContents
node_parent
-
Fields inherited from interface com.biglybt.pif.sharing.ShareResource
ST_DIR, ST_DIR_CONTENTS, ST_FILE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
shareNode(ShareResourceDirContents _parent, java.io.File _node, java.util.List kids)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 resourceShareResource[]
getChildren()
java.lang.String
getName()
ShareResourceDirContents
getParent()
java.util.Map<java.lang.String,java.lang.String>
getProperties()
java.io.File
getRoot()
int
getType()
boolean
isDeleted()
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)
void
setProperties(java.util.Map<java.lang.String,java.lang.String> props, boolean internal)
-
-
-
Field Detail
-
node_parent
protected ShareResourceDirContents node_parent
-
node
protected java.io.File node
-
node_children
protected ShareResource[] node_children
-
-
Constructor Detail
-
shareNode
protected shareNode(ShareResourceDirContents _parent, java.io.File _node, java.util.List kids)
-
-
Method Detail
-
getParent
public ShareResourceDirContents getParent()
- Specified by:
getParent
in interfaceShareResource
-
setParent
protected void setParent(ShareResourceDirContents _parent)
-
getType
public int getType()
- Specified by:
getType
in interfaceShareResource
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceShareResource
-
setAttribute
public void setAttribute(TorrentAttribute attribute, java.lang.String value)
- Specified by:
setAttribute
in interfaceShareResource
-
getAttribute
public java.lang.String getAttribute(TorrentAttribute attribute)
- Specified by:
getAttribute
in interfaceShareResource
- 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 interfaceShareResource
- Returns:
-
delete
public void delete() throws ShareResourceDeletionVetoException
- Specified by:
delete
in interfaceShareResource
- Throws:
ShareResourceDeletionVetoException
-
delete
public void delete(boolean force) throws ShareException, ShareResourceDeletionVetoException
- Specified by:
delete
in interfaceShareResource
- Throws:
ShareException
ShareResourceDeletionVetoException
-
canBeDeleted
public boolean canBeDeleted() throws ShareResourceDeletionVetoException
- Specified by:
canBeDeleted
in interfaceShareResource
- Throws:
ShareResourceDeletionVetoException
-
isDeleted
public boolean isDeleted()
- Specified by:
isDeleted
in interfaceShareResource
-
getRoot
public java.io.File getRoot()
- Specified by:
getRoot
in interfaceShareResourceDirContents
-
isRecursive
public boolean isRecursive()
- Specified by:
isRecursive
in interfaceShareResourceDirContents
-
getChildren
public ShareResource[] getChildren()
- Specified by:
getChildren
in interfaceShareResourceDirContents
-
getProperties
public java.util.Map<java.lang.String,java.lang.String> getProperties()
- Specified by:
getProperties
in interfaceShareResource
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String> props, boolean internal)
- Specified by:
setProperties
in interfaceShareResource
-
isPersistent
public boolean isPersistent()
- Specified by:
isPersistent
in interfaceShareResource
-
addChangeListener
public void addChangeListener(ShareResourceListener l)
- Specified by:
addChangeListener
in interfaceShareResource
-
removeChangeListener
public void removeChangeListener(ShareResourceListener l)
- Specified by:
removeChangeListener
in interfaceShareResource
-
addDeletionListener
public void addDeletionListener(ShareResourceWillBeDeletedListener l)
- Specified by:
addDeletionListener
in interfaceShareResource
-
removeDeletionListener
public void removeDeletionListener(ShareResourceWillBeDeletedListener l)
- Specified by:
removeDeletionListener
in interfaceShareResource
-
-