Class ShareResourceDirContentsImpl
- java.lang.Object
-
- com.biglybt.pifimpl.local.sharing.ShareResourceImpl
-
- com.biglybt.pifimpl.local.sharing.ShareResourceDirContentsImpl
-
- All Implemented Interfaces:
ShareResource
,ShareResourceDirContents
public class ShareResourceDirContentsImpl extends ShareResourceImpl implements ShareResourceDirContents
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ShareResourceDirContentsImpl.shareNode
-
Field Summary
Fields Modifier and Type Field Description protected ShareResource[]
children
private byte[]
personal_key
private java.util.Map<java.lang.String,java.lang.String>
properties
private boolean
recursive
private java.io.File
root
-
Fields inherited from class com.biglybt.pifimpl.local.sharing.ShareResourceImpl
attributes, change_listeners, deletion_listeners, hasher, manager, parent, type
-
Fields inherited from interface com.biglybt.pif.sharing.ShareResource
ST_DIR, ST_DIR_CONTENTS, ST_FILE
-
-
Constructor Summary
Constructors Modifier Constructor Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
void
setProperties(java.util.Map<java.lang.String,java.lang.String> props, boolean internal)
-
Methods inherited from class com.biglybt.pifimpl.local.sharing.ShareResourceImpl
addChangeListener, addDeletionListener, delete, delete, delete, deleteTorrent, fireChangeEvent, getAttribute, getAttributes, getFingerPrint, getFingerPrintSupport, getNewTorrentLocation, getParent, getTorrentFile, getType, inheritAttributes, isDeleted, 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 com.biglybt.pif.sharing.ShareResource
addChangeListener, addDeletionListener, delete, delete, getAttribute, getAttributes, getParent, getType, isDeleted, isPersistent, removeChangeListener, removeDeletionListener, setAttribute
-
-
-
-
Field Detail
-
root
private final java.io.File root
-
recursive
private final boolean recursive
-
properties
private final java.util.Map<java.lang.String,java.lang.String> properties
-
personal_key
private final byte[] personal_key
-
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 interfaceShareResource
- Specified by:
canBeDeleted
in classShareResourceImpl
- Throws:
ShareResourceDeletionVetoException
-
checkConsistency
protected void checkConsistency() throws ShareException
- Specified by:
checkConsistency
in classShareResourceImpl
- Throws:
ShareException
-
checkConsistency
protected java.util.List checkConsistency(java.io.File dir) throws ShareException
- Throws:
ShareException
-
deleteInternal
protected void deleteInternal()
- Overrides:
deleteInternal
in classShareResourceImpl
-
serialiseResource
protected void serialiseResource(java.util.Map map)
- Overrides:
serialiseResource
in classShareResourceImpl
-
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 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
- Overrides:
getChildren
in classShareResourceImpl
-
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
-
-