allensoft.javacvs.client
Class FileEntry

java.lang.Object
  |
  +--allensoft.javacvs.client.Entry
        |
        +--allensoft.javacvs.client.FileEntry
All Implemented Interfaces:
java.lang.Comparable

public final class FileEntry
extends Entry

Represents an entry in the "CVS/Entries" file for a file.


Inner Class Summary
static class FileEntry.Status
          Defines the status of a FileEntry.
 
Field Summary
static java.lang.String KEYWORD_SUBSTITUTION_MODE_PROPERTY
           
static java.lang.String MODIFIED_PROPERTY
           
static java.lang.String REVISION_PROPERTY
           
static java.lang.String STATUS_PROPERTY
           
static java.lang.String STICKY_DATE_PROPERTY
           
static java.lang.String STICKY_TAG_PROPERTY
           
 
Fields inherited from class allensoft.javacvs.client.Entry
m_sName
 
Method Summary
 boolean equals(java.lang.Object o)
           
static FileEntry getFileEntry(java.io.File file)
          Gets the FileEntry for the specified file.
 KeywordSubstitutionMode getKeywordSubstitutionMode()
          Gets the keyword substitution mode for this file entry.
 java.lang.String getRevision()
          Gets the revision of this file entry.
 FileEntry.Status getStatus()
          Gets the status of this file entry.
 java.util.Date getStickyDate()
          Gets the sticky date for this file entry.
 java.lang.String getStickyTag()
          Gets the sticky tag for this file entry.
 boolean isBinary()
          A convienience method to see if this file entry is binary.
 boolean isModified()
          Checks if this file has been modified.
 void markAsModified()
           
 void markAsUnmodified()
          Marks this file entry as unmodified by updating its timestamp to that of when the file was last modified.
 void setKeywordSubstitutionMode(KeywordSubstitutionMode mode)
          Sets the options for this file entry.
 void setRevision(java.lang.String sRevision)
          Sets the revision of this file entry.
 void setStatus(FileEntry.Status status)
          Sets the status of this file entry.
 void setStatus(java.lang.String sStatus)
           
 void setStickyDate(java.util.Date date)
          Sets the sticky date for this file entry.
 void setStickyTag(java.lang.String sTag)
          Sets the sticky tag for this file entry.
 java.lang.String toString()
          Converts this file entry to a string in the format represented in a "Entries" file.
 void write(java.io.PrintWriter out)
          Writes this file entry to the supplied output in the format expected in an "Entries" file.
 
Methods inherited from class allensoft.javacvs.client.Entry
addPropertyChangeListener, addPropertyChangeListener, compareTo, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAbsoluteRepositoryPath, getEntry, getEntry, getFile, getName, getWorkingDirectory, hashCode, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_PROPERTY

public static final java.lang.String STATUS_PROPERTY

REVISION_PROPERTY

public static final java.lang.String REVISION_PROPERTY

STICKY_TAG_PROPERTY

public static final java.lang.String STICKY_TAG_PROPERTY

STICKY_DATE_PROPERTY

public static final java.lang.String STICKY_DATE_PROPERTY

MODIFIED_PROPERTY

public static final java.lang.String MODIFIED_PROPERTY

KEYWORD_SUBSTITUTION_MODE_PROPERTY

public static final java.lang.String KEYWORD_SUBSTITUTION_MODE_PROPERTY
Method Detail

getFileEntry

public static FileEntry getFileEntry(java.io.File file)
                              throws CVSException,
                                     java.io.IOException
Gets the FileEntry for the specified file.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getRevision

public java.lang.String getRevision()
Gets the revision of this file entry.

setRevision

public void setRevision(java.lang.String sRevision)
Sets the revision of this file entry.

isModified

public boolean isModified()
Checks if this file has been modified.

markAsUnmodified

public void markAsUnmodified()
Marks this file entry as unmodified by updating its timestamp to that of when the file was last modified.

markAsModified

public void markAsModified()

getStatus

public FileEntry.Status getStatus()
Gets the status of this file entry.

setStatus

public void setStatus(FileEntry.Status status)
Sets the status of this file entry.

setStatus

public void setStatus(java.lang.String sStatus)

getStickyTag

public java.lang.String getStickyTag()
Gets the sticky tag for this file entry.

setStickyTag

public void setStickyTag(java.lang.String sTag)
Sets the sticky tag for this file entry.

getStickyDate

public java.util.Date getStickyDate()
Gets the sticky date for this file entry.

setStickyDate

public void setStickyDate(java.util.Date date)
Sets the sticky date for this file entry.

getKeywordSubstitutionMode

public KeywordSubstitutionMode getKeywordSubstitutionMode()
Gets the keyword substitution mode for this file entry.

setKeywordSubstitutionMode

public void setKeywordSubstitutionMode(KeywordSubstitutionMode mode)
Sets the options for this file entry.

isBinary

public boolean isBinary()
A convienience method to see if this file entry is binary. This is done by checking if the keyword substitution mode is -kb .

write

public void write(java.io.PrintWriter out)
Writes this file entry to the supplied output in the format expected in an "Entries" file.
Overrides:
write in class Entry

toString

public java.lang.String toString()
Converts this file entry to a string in the format represented in a "Entries" file.
Overrides:
toString in class java.lang.Object