net.sf.jfilesync.engine
Class TFileProperties

java.lang.Object
  extended by net.sf.jfilesync.engine.TFileProperties
All Implemented Interfaces:
java.lang.Cloneable

public class TFileProperties
extends java.lang.Object
implements java.lang.Cloneable

This class is basically for storing properties of files. We need that to build a layer on top of the file property classes of different protocol implementations.


Field Summary
private  java.lang.String absoluteFileName
           
private  TFileAttributes attr
           
private  boolean directoryFlag
           
private  long fileModTime
           
private  java.lang.String fileName
           
private  java.math.BigInteger fileSize
           
private  boolean hiddenFlag
           
private  boolean linkFlag
           
private static int NUM_OF_PUBLISHABLE_PROPERTIES
           
private static int[] propertyOrder
           
private  boolean selectedForSync
           
static int TFILE_PROPERTY_ABSOLUTE_NAME
           
static int TFILE_PROPERTY_MOD_TIME
           
static int TFILE_PROPERTY_NAME
           
static int TFILE_PROPERTY_SIZE
           
 
Constructor Summary
TFileProperties()
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getAbsoluteFileName()
           
 TFileAttributes getAttributes()
           
 long getFileModTime()
           
 java.lang.String getFileName()
           
static java.lang.String getFilePropertyName(int propertyId)
           
 java.math.BigInteger getFileSize()
           
static int getNumberOfPublishableProperties()
          We don't want to publish all.
static int[] getPublishableProperties()
           
 boolean hasPermissions()
           
 boolean isDirectory()
           
 boolean isHidden()
           
 boolean isLink()
           
 boolean isSelectedForSync()
           
 void setAbsoluteFileName(java.lang.String name)
           
 void setAttributes(TFileAttributes attrs)
           
 void setDirectoryFlag(boolean flag)
           
 void setFileModTime(long fModTime)
           
 void setFileName(java.lang.String fName)
           
 void setFileSize(java.math.BigInteger fSize)
           
 void setHiddenFlag(boolean flag)
           
 void setLinkFlag(boolean flag)
           
 void toggleSelectedForSync()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TFILE_PROPERTY_NAME

public static final int TFILE_PROPERTY_NAME
See Also:
Constant Field Values

TFILE_PROPERTY_SIZE

public static final int TFILE_PROPERTY_SIZE
See Also:
Constant Field Values

TFILE_PROPERTY_MOD_TIME

public static final int TFILE_PROPERTY_MOD_TIME
See Also:
Constant Field Values

TFILE_PROPERTY_ABSOLUTE_NAME

public static final int TFILE_PROPERTY_ABSOLUTE_NAME
See Also:
Constant Field Values

propertyOrder

private static final int[] propertyOrder

fileName

private java.lang.String fileName

absoluteFileName

private java.lang.String absoluteFileName

fileSize

private java.math.BigInteger fileSize

fileModTime

private long fileModTime

directoryFlag

private boolean directoryFlag

linkFlag

private boolean linkFlag

hiddenFlag

private boolean hiddenFlag

attr

private TFileAttributes attr

selectedForSync

private boolean selectedForSync

NUM_OF_PUBLISHABLE_PROPERTIES

private static final int NUM_OF_PUBLISHABLE_PROPERTIES
Constructor Detail

TFileProperties

public TFileProperties()
Method Detail

getNumberOfPublishableProperties

public static int getNumberOfPublishableProperties()
We don't want to publish all. GUI elements want to know this number at the time of their creation.


setFileName

public final void setFileName(java.lang.String fName)

getFileName

public final java.lang.String getFileName()

setAbsoluteFileName

public final void setAbsoluteFileName(java.lang.String name)

getAbsoluteFileName

public final java.lang.String getAbsoluteFileName()

setFileSize

public final void setFileSize(java.math.BigInteger fSize)

getFileSize

public final java.math.BigInteger getFileSize()

setFileModTime

public final void setFileModTime(long fModTime)

getFileModTime

public final long getFileModTime()

setDirectoryFlag

public final void setDirectoryFlag(boolean flag)

isDirectory

public boolean isDirectory()

setLinkFlag

public void setLinkFlag(boolean flag)

isLink

public boolean isLink()

setHiddenFlag

public void setHiddenFlag(boolean flag)

isHidden

public boolean isHidden()

getPublishableProperties

public static int[] getPublishableProperties()

getFilePropertyName

public static java.lang.String getFilePropertyName(int propertyId)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getAttributes

public TFileAttributes getAttributes()

setAttributes

public void setAttributes(TFileAttributes attrs)

hasPermissions

public boolean hasPermissions()

toggleSelectedForSync

public void toggleSelectedForSync()

isSelectedForSync

public boolean isSelectedForSync()