net.sourceforge.cvsgrab
Class RemoteFile

java.lang.Object
  extended by net.sourceforge.cvsgrab.RemoteFile

public class RemoteFile
extends Object

Represents a file stored in the remote repository

Version:
$Revision: 1.12 $ $Date: 2005/06/22 19:18:37 $
Author:
Ludovic Claude
Created:
on 12 oct. 2003

Field Summary
static String BINARY_TYPE
          File is a binary file
static String TEXT_TYPE
          File is a text file
 
Constructor Summary
RemoteFile(String name, String version)
          Constructor for RemoteFile
 
Method Summary
 void diff(LocalRepository repository, PrintWriter writer, CVSGrab grabber)
           
 RemoteDirectory getDirectory()
           
 Date getLastModified()
           
 String getName()
           
 String getVersion()
           
 void grab(LocalRepository repository)
           
 boolean isBinary()
           
 boolean isInAttic()
           
 void setDirectory(RemoteDirectory directory)
          Sets the directory
static void setFileTypes(Properties fileTypes)
          Sets the file types recognized by CVSGrab.
 void setInAttic(boolean inAttic)
           
 void setName(String name)
           
 String toString()
          
protected  void upload()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT_TYPE

public static final String TEXT_TYPE
File is a text file

See Also:
Constant Field Values

BINARY_TYPE

public static final String BINARY_TYPE
File is a binary file

See Also:
Constant Field Values
Constructor Detail

RemoteFile

public RemoteFile(String name,
                  String version)
Constructor for RemoteFile

Method Detail

setFileTypes

public static void setFileTypes(Properties fileTypes)
Sets the file types recognized by CVSGrab. Valid file types are text and binary. The key is the pattern for the file type, and takes the form FileName or *.ext, the value is the type of the file, text or binary.

Parameters:
fileTypes - The new file types

getName

public String getName()
Returns:
the name

getVersion

public String getVersion()
Returns:
the version

getDirectory

public RemoteDirectory getDirectory()
Returns:
the directory

isInAttic

public boolean isInAttic()
Returns:
true if the file is stored in the Attic (after delection or recovery from deletion)

setName

public void setName(String name)
Parameters:
name -

setInAttic

public void setInAttic(boolean inAttic)
Parameters:
inAttic -

setDirectory

public void setDirectory(RemoteDirectory directory)
Sets the directory

Parameters:
directory -

getLastModified

public Date getLastModified()

grab

public void grab(LocalRepository repository)
Parameters:
repository -

diff

public void diff(LocalRepository repository,
                 PrintWriter writer,
                 CVSGrab grabber)
Parameters:
repository -
diffFile -

isBinary

public boolean isBinary()
Returns:
true if the file is binary, false if it's a text file

toString

public String toString()

Overrides:
toString in class Object
Returns:
a string representation

upload

protected void upload()


Copyright © 2002-2005 Ludovic Claude. All Rights Reserved.