org.alfresco.service.cmr.avmsync
Class AVMDifference

java.lang.Object
  extended by org.alfresco.service.cmr.avmsync.AVMDifference
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class AVMDifference
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Represents the difference between corresponding nodes in parallel avm node trees. It it indicates for the difference whether the source is older, newer, or in conflict with the destination.

See Also:
Serialized Form

Field Summary
static int CONFLICT
           
static int DIRECTORY
           
static int NEWER
           
static int OLDER
           
static int SAME
           
 
Constructor Summary
AVMDifference(int srcVersion, java.lang.String srcPath, int dstVersion, java.lang.String dstPath, int diffCode)
          Make one up.
 
Method Summary
 int compareTo(AVMDifference other)
           
 java.lang.String getDestinationPath()
          Get the destination path.
 int getDestinationVersion()
          Get the destination version number.
 int getDifferenceCode()
          Get the difference code, NEWER, OLDER, CONFLICT.
 int getOrderValue()
           
 java.lang.String getSourcePath()
          Get the source path.
 int getSourceVersion()
          Get the source version number.
 boolean isValid()
          Check for improperly initialized instances.
 java.lang.String toString()
          Get as String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEWER

public static final int NEWER
See Also:
Constant Field Values

OLDER

public static final int OLDER
See Also:
Constant Field Values

CONFLICT

public static final int CONFLICT
See Also:
Constant Field Values

DIRECTORY

public static final int DIRECTORY
See Also:
Constant Field Values

SAME

public static final int SAME
See Also:
Constant Field Values
Constructor Detail

AVMDifference

public AVMDifference(int srcVersion,
                     java.lang.String srcPath,
                     int dstVersion,
                     java.lang.String dstPath,
                     int diffCode)
Make one up.

Parameters:
srcVersion - The source version.
srcPath - the source path.
dstVersion - The destination version.
dstPath - The destination path.
diffCode - The difference code, NEWER, OLDER, CONFLICT
Method Detail

getSourceVersion

public int getSourceVersion()
Get the source version number.

Returns:
The source version number.

getSourcePath

public java.lang.String getSourcePath()
Get the source path.

Returns:
The source path.

getDestinationVersion

public int getDestinationVersion()
Get the destination version number.

Returns:
The destination version number.

getDestinationPath

public java.lang.String getDestinationPath()
Get the destination path.

Returns:
The destination path.

getDifferenceCode

public int getDifferenceCode()
Get the difference code, NEWER, OLDER, CONFLICT.

Returns:
The difference code.

isValid

public boolean isValid()
Check for improperly initialized instances.

Returns:
Whether source and destination are non null.

toString

public java.lang.String toString()
Get as String.

Overrides:
toString in class java.lang.Object
Returns:
A String representation of this.

compareTo

public int compareTo(AVMDifference other)
Specified by:
compareTo in interface java.lang.Comparable

getOrderValue

public int getOrderValue()


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.