com.starteam
Class File.SyncRecord

java.lang.Object
  extended by com.starteam.File.SyncRecord
All Implemented Interfaces:
File.Digest, File.Revision, File.WorkspaceSync
Enclosing class:
File

public static final class File.SyncRecord
extends java.lang.Object
implements File.WorkspaceSync, File.Digest, File.Revision

a stock Sync Record Implementation to create sync records in syncdb


Constructor Summary
File.SyncRecord(GUID serverID)
          default constructor
 
Method Summary
 int getContentRevision()
          return the content reviison
 DotNotation getDotNotation()
          return the dot notation
 File.Digest getFileDigest()
          return the digest
 MD5 getFileMD5()
          return the file md5
 long getFileSize()
          return the file size
 DateTime getFileTime()
          return the file time
 int getObjectID()
          return the object id
 int getRecordID()
          return the record id
 double getRecordTime()
          return the record time
 GUID getRepositoryID()
          return the server GUID
 File.Revision getRevisionIdentifier()
          return the file revision
 int getRevisionNumber()
          return the revision number
 int getRootObjectID()
          return the root object id
 void initFromFile(File file)
          initialize this record from a File instance
 boolean isValid()
          return true if this sync record is valid
 void setContentRevision(int rev)
          set the content revision
 void setDotNotation(DotNotation dot)
          set the dot notation
 void setFileMD5(MD5 md5)
          set the file md5
 void setFileSize(long size)
          set the file size
 void setFileTime(DateTime time)
          set the file time
 void setLocalFileInfo(java.io.File file)
          set file information from a disk file
 void setObjectID(int id)
          set the object id
 void setRecordID(int id)
          set the record id
 void setRevisionNumber(int id)
          return the revision number
 void setRootObjectID(int id)
          set the root object id
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

File.SyncRecord

public File.SyncRecord(GUID serverID)
default constructor

Parameters:
serverID - the server GUID
Method Detail

getFileDigest

public File.Digest getFileDigest()
return the digest

Specified by:
getFileDigest in interface File.WorkspaceSync
Returns:
The Digest for the file in question.

getFileSize

public long getFileSize()
return the file size

Specified by:
getFileSize in interface File.Digest
Returns:
The file's size, in bytes.

setFileSize

public void setFileSize(long size)
set the file size

Specified by:
setFileSize in interface File.Digest
Parameters:
size - The file's size, in bytes.

getFileTime

public DateTime getFileTime()
return the file time

Specified by:
getFileTime in interface File.Digest
Returns:
The file's last modified time, as the number days from midnight, 30 December 1899, in UTC.

setFileTime

public void setFileTime(DateTime time)
set the file time

Specified by:
setFileTime in interface File.Digest
Parameters:
time - The file's last modified time, as the number days from midnight, 30 December 1899, in UTC.

getFileMD5

public MD5 getFileMD5()
return the file md5

Specified by:
getFileMD5 in interface File.Digest
Returns:
The MD5 cryptographic hash of the file's content.

setFileMD5

public void setFileMD5(MD5 md5)
set the file md5

Specified by:
setFileMD5 in interface File.Digest
Parameters:
md5 - The MD5 cryptographic hash of the file's content.

getRevisionIdentifier

public File.Revision getRevisionIdentifier()
return the file revision

Specified by:
getRevisionIdentifier in interface File.WorkspaceSync
Returns:
The Revision for the file in question.

getRepositoryID

public GUID getRepositoryID()
return the server GUID

Specified by:
getRepositoryID in interface File.Revision
Returns:
An ID that uniquely identifies the repository in which the object in question exists.

getRootObjectID

public int getRootObjectID()
return the root object id

Specified by:
getRootObjectID in interface File.Revision
Returns:
The RootObjectID of the repository object.

setRootObjectID

public void setRootObjectID(int id)
set the root object id

Specified by:
setRootObjectID in interface File.Revision
Parameters:
id - The RootObjectID of the repository object.

getContentRevision

public int getContentRevision()
return the content reviison

Specified by:
getContentRevision in interface File.Revision
Returns:
The content version of this item revision.

setContentRevision

public void setContentRevision(int rev)
set the content revision

Specified by:
setContentRevision in interface File.Revision
Parameters:
rev - The content version of this item revision.

getDotNotation

public DotNotation getDotNotation()
return the dot notation

Specified by:
getDotNotation in interface File.Revision
Returns:
The dot notation of this revision of the repository object.

setDotNotation

public void setDotNotation(DotNotation dot)
set the dot notation

Specified by:
setDotNotation in interface File.Revision
Parameters:
dot - The dot notation of this revision of the repository object.

setRecordID

public void setRecordID(int id)
set the record id

Parameters:
id -

getRecordID

public int getRecordID()
return the record id

Returns:
the record id

getRecordTime

public double getRecordTime()
return the record time

Returns:
the record time

setObjectID

public void setObjectID(int id)
set the object id

Specified by:
setObjectID in interface File.Revision
Parameters:
id - The objectID of this revision of the repository object.

getObjectID

public int getObjectID()
return the object id

Specified by:
getObjectID in interface File.Revision
Returns:
The objectID of this revision of the repository object.

setRevisionNumber

public void setRevisionNumber(int id)
return the revision number

Specified by:
setRevisionNumber in interface File.Revision
Parameters:
id - The version number of this revision of the repository object.

getRevisionNumber

public int getRevisionNumber()
return the revision number

Specified by:
getRevisionNumber in interface File.Revision
Returns:
The version number of this revision of the repository object within its branch.
See Also:
VersionedObject.getRevisionNumber()

initFromFile

public void initFromFile(File file)
initialize this record from a File instance

Parameters:
file - the file

setLocalFileInfo

public void setLocalFileInfo(java.io.File file)
                      throws java.io.IOException
set file information from a disk file

Parameters:
file -
Throws:
java.io.IOException

isValid

public boolean isValid()
return true if this sync record is valid

Returns:
true if this sync record is valid


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.