public class SynchronizationInfo extends Object implements Serializable
state
of the
file. Does it exist only in the workspace or the repository? Does it exist in both places? Was the file synchronized
with the repository file at some point? If so, which version of the repository file? Is the file still in sync with
the repository file or has the repository file changed? Or has the workspace file changed?
All of these questions can be answered with these details. It provides information about the state of the file in the workspace (if it exists). It provides information about the state of the file in the repository (if it exists). It provides information about the synchronization state between the workspace and the repository to tell the user if the file has been retrieved from the repository. It also provides detailed information about the state of the files in case they are out-of-sync, details are provided to determine if the file in the workspace has changed or the file in the repository has changed, or both.
With this information, end-users can determine if they are out-of-sync with the repository file and decide if they should pull changes from the repository into the workspace or push changes from the workspace into the repository; or decide to do nothing at all and continue working with the file contents they have.
Modifier and Type | Class and Description |
---|---|
static class |
SynchronizationInfo.CheckoutStatus
Enumeration describing the
checkin status of the file. |
static class |
SynchronizationInfo.FileStatus
Enumeration which describes where the file exists.
|
static class |
SynchronizationInfo.SynchronizationStatus
Enumeration which describes whether the file has been synchronized between the workspace and repository or not.
|
Constructor and Description |
---|
SynchronizationInfo(String path,
RepositoryFileInfo repositoryFileInfo,
SynchronizationFileInfo synchronizationFileInfo,
WorkspaceFileInfo workspaceFileInfo,
SynchronizationInfo.FileStatus fileStatus,
SynchronizationInfo.SynchronizationStatus synchronizationStatus,
SynchronizationInfo.CheckoutStatus checkoutStatus)
Initializing constructor which sets the values of all variables.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Indicate whether some other object is "equal to" this one.
|
SynchronizationInfo.CheckoutStatus |
getCheckoutStatus()
Returns the checkout status for this file.
|
SynchronizationInfo.FileStatus |
getFileStatus()
Returns where the file exists.
|
String |
getPath()
Returns the file path associated with this synchronization information.
|
RepositoryFileInfo |
getRepositoryFileInfo()
Return the repository file information if the file exists in the repository, if it does not exist then this
returns
null . |
SynchronizationFileInfo |
getSynchronizationFileInfo()
Returns the synchronization file information if the file was synchronized between the workspace and repository,
if it was not synchronized then this returns
null . |
SynchronizationInfo.SynchronizationStatus |
getSynchronizationStatus()
Returns the synchronization status between the repository and workspace files.
|
WorkspaceFileInfo |
getWorkspaceFileInfo()
Returns the workspace file information if the file exists in the workspace, if it does not exist then this
returns
null . |
int |
hashCode()
Return a hash code value for the object.
|
String |
toString()
Return a string representation of the object.
|
public SynchronizationInfo(String path, RepositoryFileInfo repositoryFileInfo, SynchronizationFileInfo synchronizationFileInfo, WorkspaceFileInfo workspaceFileInfo, SynchronizationInfo.FileStatus fileStatus, SynchronizationInfo.SynchronizationStatus synchronizationStatus, SynchronizationInfo.CheckoutStatus checkoutStatus)
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)
.
path
- The full path of the file.repositoryFileInfo
- The repository file information if the file exists in the repository.synchronizationFileInfo
- The synchronization details for this file.workspaceFileInfo
- The workspace file information if the file exists in the workspace.fileStatus
- Where the file exists.synchronizationStatus
- The synchronization status for the file.checkoutStatus
- The checkout status for the file.public String getPath()
public RepositoryFileInfo getRepositoryFileInfo()
null
.null
.public SynchronizationFileInfo getSynchronizationFileInfo()
null
.null
.public WorkspaceFileInfo getWorkspaceFileInfo()
null
.null
.public SynchronizationInfo.FileStatus getFileStatus()
public SynchronizationInfo.SynchronizationStatus getSynchronizationStatus()
public SynchronizationInfo.CheckoutStatus getCheckoutStatus()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
Copyright (c) 2017, SAS Institute Inc., Cary, NC, USA