com.sas.hls.resource.repository
Class SynchronizationFileInfo

java.lang.Object
  extended by com.sas.hls.resource.repository.SynchronizationFileInfo
All Implemented Interfaces:
Serializable

public class SynchronizationFileInfo
extends Object
implements Serializable

Provides information about the repository file when it was synchronized to the workspace. This information is a snapshot of the repository file information when the user retrieved the repository file and stored it in their workspace. This information is captured when a user calls such methods as RepositoryResourceService.getFileVersionToWorkspace(String, String) or RepositoryResourceService.getLatestFileVersionToWorkspace(String) or RepositoryResourceService.checkoutFileToWorkspace(String) for example.

Since:
1.7
See Also:
RepositoryResourceService.getSynchronizationInfo(String), SynchronizationInfo.getSynchronizationFileInfo(), Serialized Form

Constructor Summary
SynchronizationFileInfo(String path, String version, Date synchronizationDate, Date repositoryFileLastModifiedDate, long repositoryFileSize)
          Initializing constructor which sets the values of all variables.
 
Method Summary
 boolean equals(Object obj)
          Indicate whether some other object is "equal to" this one.
 String getPath()
          Returns the full path of the repository file.
 Date getRepositoryFileLastModifiedDate()
          Returns the last modification date of the repository file synchronized to the workspace.
 long getRepositoryFileSize()
          Returns the size of the repository file (in bytes) synchronized to the workspace.
 Date getSynchronizationDate()
          Returns the date this repository file was synchronized to the workspace.
 String getVersion()
          Returns the version of the repository file that was synchronized to the workspace.
 int hashCode()
          Return a hash code value for the object.
 String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronizationFileInfo

public SynchronizationFileInfo(String path,
                               String version,
                               Date synchronizationDate,
                               Date repositoryFileLastModifiedDate,
                               long repositoryFileSize)
Initializing constructor which sets the values of all variables.

It is not intended or recommended that the consumer of the API construct these objects. They should only be retrieved from service calls such as RepositoryResourceService.getSynchronizationInfo(String).

Parameters:
path - The full path of the repository file.
version - The version of the repository file synchronized to the workspace.
synchronizationDate - The date the repository file was synchronized to the workspace.
repositoryFileLastModifiedDate - The date the repository file version that was synchronized to the workspace was last modified.
repositoryFileSize - The size of the repository file version that was synchronized to the workspace.
Method Detail

getPath

public String getPath()
Returns the full path of the repository file.

Returns:
The full path of the repository file.

getVersion

public String getVersion()
Returns the version of the repository file that was synchronized to the workspace.

Returns:
The version of the repository file that was synchronized to the workspace.

getSynchronizationDate

public Date getSynchronizationDate()
Returns the date this repository file was synchronized to the workspace.

Returns:
The date this repository file was synchronized to the workspace.

getRepositoryFileLastModifiedDate

public Date getRepositoryFileLastModifiedDate()
Returns the last modification date of the repository file synchronized to the workspace.

This date corresponds to the last modification date of the repository file version that was synchronized to the workspace. For example, if version 1 of the repository file was last modified on 1/1/2011 and version 2 was last modified on 2/2/2012 and version 1 was synchronized to the workspace then this value would be 1/1/2011. To be clear, this is not necessarily the last modification date of the current version of the repository file, this is the last modification date of the repository file that was synchronized to the workspace.

Returns:
The last modification date of the repository file synchronized to the workspace.

getRepositoryFileSize

public long getRepositoryFileSize()
Returns the size of the repository file (in bytes) synchronized to the workspace.

This file size corresponds to the size of the repository file version that was synchronized to the workspace. For example, if version 1 of the repository file has a size of 111 (bytes) and version 2 has a size of 222 (bytes) and version 1 was synchronized to the workspace then this value would be 111 (bytes). To be clear, this is not necessarily the file size of the current version of the repository file, this is the file size of the repository file that was synchronized to the workspace.

Returns:
The size of the repository file (in bytes) synchronized to the workspace.

hashCode

public int hashCode()
Return a hash code value for the object.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Indicate whether some other object is "equal to" this one.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Return a string representation of the object.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright (c) 2016, SAS Institute Inc., Cary, NC, USA