Java Doc for LinkedRemoteFile.java in  » Net » DrFTPD » org » drftpd » remotefile » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » DrFTPD » org.drftpd.remotefile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.drftpd.remotefile.LinkedRemoteFile

LinkedRemoteFile
public class LinkedRemoteFile implements Serializable,Comparable,LinkedRemoteFileInterface(Code)
Represents the file attributes of a remote file.
author:
   mog
version:
   $Id: LinkedRemoteFile.java 1541 2006-12-16 17:42:04Z zubov $

Inner Class :public static class NonExistingFile

Field Summary
protected  SFVFile_sfvFile
    
protected  List<RemoteSlave>_slaves
    
protected  ID3Tagmp3tag
    
final static  longserialVersionUID
    

Constructor Summary
public  LinkedRemoteFile(ConfigInterface ftpConfig)
     Creates an empty RemoteFile directory, usually used as an empty root directory that {merge()} can be called on.
public  LinkedRemoteFile(RemoteFileInterface file, FtpConfig cfg)
     Creates a root directory (parent == null) that FileRemoteFile or JDOMRemoteFile is merged on.

Method Summary
public  LinkedRemoteFileaddFile(RemoteFileInterface file)
     Updates lastModified() on this directory, use putFile() to avoid it.
protected  voidaddSize(long size)
    
public  voidaddSlave(RemoteSlave slave)
    
public  intcompareTo(Object o)
    
public  LinkedRemoteFilecreateDirectories(String path)
    
public  LinkedRemoteFilecreateDirectory(String fileName)
    
public  LinkedRemoteFilecreateDirectory(String owner, String group, String fileName)
    
public  voiddelete()
     Deletes a file or directory, RemoteSlave handles issues with slaves being offline and queued deletes Trying to lookupFile() or getFile() a deleted file throws FileNotFoundException.
public  voiddeleteFromSlave(RemoteSlave rslave)
    
public  longdirSize()
    
public  booleanequals(Object obj)
    
public static  LinkedRemoteFilefindLatestDir(ConnectionManager conn, LinkedRemoteFileInterface dir, User user, String searchstring)
    
public  List<LinkedRemoteFileInterface>getAllParentFiles()
    
public  Collection<RemoteSlave>getAvailableSlaves()
    
public  longgetCheckSum()
    
public  longgetCheckSumCached()
     Returns the cached checksum or 0 if no checksum was cached.
public  longgetCheckSumFromSlave()
     Returns 0 if the checksum cannot be read.
public  Collection<LinkedRemoteFileInterface>getDirectories()
    
public  LinkedRemoteFileInterfacegetFile(String fileName)
     Returns fileName contained in this directory.
public  Collection<RemoteFileInterface>getFiles()
    
public  Collection<LinkedRemoteFileInterface>getFiles2()
     Returns a Collection of all the LinkedRemoteFile objects in this directory, with all .isDeleted() files removed.
public  StringgetGroupname()
    
public synchronized  ID3TaggetID3v1Tag()
    
public  LinkedRemoteFilegetLink()
    
public  StringgetLinkPath()
    
public  MapgetMap()
     Returns the underlying Map for this directory. It is dangerous to modify without knowing what you're doing.
public  StringgetName()
    
public  StringgetParent()
    
public  LinkedRemoteFilegetParentFile()
    
public  LinkedRemoteFilegetParentFileNull()
    
public  StringgetPath()
    
public  LinkedRemoteFilegetRoot()
    
public synchronized  SFVFilegetSFVFile()
    
public  List<RemoteSlave>getSlaves()
     returns slaves.
public  StringgetUsername()
    
public  longgetXferspeed()
    
public  longgetXfertime()
    
public  booleanhasFile(String filename)
     Returns true if this directory contains a file named filename, this is case sensitive.
public  booleanhasOfflineSlaves()
     Returns true if this file or directory uses slaves that are currently offline.
public  booleanhasSlave(RemoteSlave slave)
    
public  inthashCode()
    
public  booleanisAvailable()
    
public  booleanisDeleted()
    
public  booleanisDirectory()
    
public  booleanisFile()
    
public  booleanisLink()
    
public  booleanisValid()
    
public  longlastModified()
    
public  longlength()
    
public  LinkedRemoteFilelookupFile(String path)
    
public  LinkedRemoteFilelookupFile(String path, boolean followLinks)
    
public  StringlookupMP3File()
    
public  NonExistingFilelookupNonExistingFile(String path)
    
public  NonExistingFilelookupNonExistingFile(String path, boolean followLinks)
    
public  StringlookupPath(String path)
     Returns path for a non-existing file.
public  SFVFilelookupSFVFile()
    
public  LinkedRemoteFileputFile(RemoteFileInterface file)
     Use addFile() if you want lastModified to be updated.
public  voidremerge(CaseInsensitiveHashtable lightRemoteFiles, RemoteSlave rslave)
    
public  booleanremoveSlave(RemoteSlave slave)
     Shorthand for _slaves.remove() that checks if _slaves is empty and calls .delete() if it is.
public  voidrenameTo(String toDirPath, String toName)
    
public  voidsetCheckSum(long checkSum)
    
public  voidsetGroup(String group)
    
public  voidsetLastModified(long lastModified)
    
public  voidsetLength(long length)
    
public  voidsetOwner(String owner)
    
public  voidsetXfertime(long xfertime)
    
public  StringtoString()
    
public synchronized  voidunmergeDir(RemoteSlave rslave)
    
public  voidunmergeFile(RemoteSlave rslave)
    

Field Detail
_sfvFile
protected SFVFile _sfvFile(Code)



_slaves
protected List<RemoteSlave> _slaves(Code)



mp3tag
protected ID3Tag mp3tag(Code)



serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
LinkedRemoteFile
public LinkedRemoteFile(ConfigInterface ftpConfig)(Code)
Creates an empty RemoteFile directory, usually used as an empty root directory that {merge()} can be called on. Used if no file database exists to start a tree from scratch.



LinkedRemoteFile
public LinkedRemoteFile(RemoteFileInterface file, FtpConfig cfg) throws IOException(Code)
Creates a root directory (parent == null) that FileRemoteFile or JDOMRemoteFile is merged on. Also called with null ConnectionManager from slave




Method Detail
addFile
public LinkedRemoteFile addFile(RemoteFileInterface file)(Code)
Updates lastModified() on this directory, use putFile() to avoid it.



addSize
protected void addSize(long size)(Code)



addSlave
public void addSlave(RemoteSlave slave)(Code)



compareTo
public int compareTo(Object o)(Code)

throws:
  ClassCastException - if object is not an instance of RemoteFileInterface.
See Also:   java.lang.Comparable.compareTo(java.lang.Object)



createDirectories
public LinkedRemoteFile createDirectories(String path)(Code)
Follows links



createDirectory
public LinkedRemoteFile createDirectory(String fileName) throws FileExistsException(Code)



createDirectory
public LinkedRemoteFile createDirectory(String owner, String group, String fileName) throws FileExistsException(Code)



delete
public void delete()(Code)
Deletes a file or directory, RemoteSlave handles issues with slaves being offline and queued deletes Trying to lookupFile() or getFile() a deleted file throws FileNotFoundException.



deleteFromSlave
public void deleteFromSlave(RemoteSlave rslave)(Code)



dirSize
public long dirSize()(Code)



equals
public boolean equals(Object obj)(Code)



findLatestDir
public static LinkedRemoteFile findLatestDir(ConnectionManager conn, LinkedRemoteFileInterface dir, User user, String searchstring) throws ObjectNotFoundException(Code)



getAllParentFiles
public List<LinkedRemoteFileInterface> getAllParentFiles()(Code)



getAvailableSlaves
public Collection<RemoteSlave> getAvailableSlaves() throws NoAvailableSlaveException(Code)



getCheckSum
public long getCheckSum() throws NoAvailableSlaveException(Code)
Uses cached checksum if the cached checksum is not 0



getCheckSumCached
public long getCheckSumCached()(Code)
Returns the cached checksum or 0 if no checksum was cached.

Use {getCheckSum()} to automatically calculate checksum if no cached checksum is available.




getCheckSumFromSlave
public long getCheckSumFromSlave()(Code)
Returns 0 if the checksum cannot be read.



getDirectories
public Collection<LinkedRemoteFileInterface> getDirectories()(Code)



getFile
public LinkedRemoteFileInterface getFile(String fileName) throws FileNotFoundException(Code)
Returns fileName contained in this directory.
Parameters:
  fileName -
throws:
  FileNotFoundException - if fileName doesn't exist in the files Map



getFiles
public Collection<RemoteFileInterface> getFiles()(Code)



getFiles2
public Collection<LinkedRemoteFileInterface> getFiles2()(Code)
Returns a Collection of all the LinkedRemoteFile objects in this directory, with all .isDeleted() files removed.

NOTE: Since DrFTPD 1.2, the collection returned can no longer be directly modified.

Since this method overrides FileRemoteFile which is part of the classes that keep 1.4 compatibility for the slaves it cannot use generics.

a Collection of all the LinkedRemoteFile objects in thisdirectory.



getGroupname
public String getGroupname()(Code)



getID3v1Tag
public synchronized ID3Tag getID3v1Tag() throws NoAvailableSlaveException, FileNotFoundException, IOException(Code)



getLink
public LinkedRemoteFile getLink() throws FileNotFoundException(Code)



getLinkPath
public String getLinkPath()(Code)



getMap
public Map getMap()(Code)
Returns the underlying Map for this directory. It is dangerous to modify without knowing what you're doing. Dirsize needs to be taken into account as well as sending approperiate commands to the slaves. the underlying Map for this directory.



getName
public String getName()(Code)



getParent
public String getParent() throws FileNotFoundException(Code)



getParentFile
public LinkedRemoteFile getParentFile() throws FileNotFoundException(Code)



getParentFileNull
public LinkedRemoteFile getParentFileNull()(Code)



getPath
public String getPath()(Code)



getRoot
public LinkedRemoteFile getRoot()(Code)



getSFVFile
public synchronized SFVFile getSFVFile() throws IOException, FileNotFoundException, NoAvailableSlaveException, FileStillTransferringException(Code)



getSlaves
public List<RemoteSlave> getSlaves()(Code)
returns slaves. throws exception if a directory.



getUsername
public String getUsername()(Code)



getXferspeed
public long getXferspeed()(Code)



getXfertime
public long getXfertime()(Code)
xfertime in milliseconds



hasFile
public boolean hasFile(String filename)(Code)
Returns true if this directory contains a file named filename, this is case sensitive.
Parameters:
  filename - The name of the file true if this directory contains a file named filename, this iscase sensitive.



hasOfflineSlaves
public boolean hasOfflineSlaves()(Code)
Returns true if this file or directory uses slaves that are currently offline. true if this file or directory uses slaves that are currentlyoffline.



hasSlave
public boolean hasSlave(RemoteSlave slave)(Code)



hashCode
public int hashCode()(Code)



isAvailable
public boolean isAvailable()(Code)
Does file have online slaves? Always true for directories



isDeleted
public boolean isDeleted()(Code)



isDirectory
public boolean isDirectory()(Code)



isFile
public boolean isFile()(Code)



isLink
public boolean isLink()(Code)



isValid
public boolean isValid()(Code)



lastModified
public long lastModified()(Code)



length
public long length()(Code)



lookupFile
public LinkedRemoteFile lookupFile(String path) throws FileNotFoundException(Code)



lookupFile
public LinkedRemoteFile lookupFile(String path, boolean followLinks) throws FileNotFoundException(Code)



lookupMP3File
public String lookupMP3File() throws IOException, FileNotFoundException, NoAvailableSlaveException(Code)



lookupNonExistingFile
public NonExistingFile lookupNonExistingFile(String path)(Code)



lookupNonExistingFile
public NonExistingFile lookupNonExistingFile(String path, boolean followLinks)(Code)



lookupPath
public String lookupPath(String path)(Code)
Returns path for a non-existing file. Performs path normalization and returns an absolute path, follows links



lookupSFVFile
public SFVFile lookupSFVFile() throws IOException, FileNotFoundException, NoAvailableSlaveException, FileStillTransferringException(Code)



putFile
public LinkedRemoteFile putFile(RemoteFileInterface file)(Code)
Use addFile() if you want lastModified to be updated.



remerge
public void remerge(CaseInsensitiveHashtable lightRemoteFiles, RemoteSlave rslave) throws IOException(Code)



removeSlave
public boolean removeSlave(RemoteSlave slave)(Code)
Shorthand for _slaves.remove() that checks if _slaves is empty and calls .delete() if it is.



renameTo
public void renameTo(String toDirPath, String toName) throws IOException, FileNotFoundException(Code)
Renames this file



setCheckSum
public void setCheckSum(long checkSum)(Code)



setGroup
public void setGroup(String group)(Code)



setLastModified
public void setLastModified(long lastModified)(Code)



setLength
public void setLength(long length)(Code)



setOwner
public void setOwner(String owner)(Code)



setXfertime
public void setXfertime(long xfertime)(Code)



toString
public String toString()(Code)



unmergeDir
public synchronized void unmergeDir(RemoteSlave rslave)(Code)



unmergeFile
public void unmergeFile(RemoteSlave rslave)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.