mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Implementing (some of) transfer service review rework.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19000 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,7 +24,7 @@ import org.alfresco.service.cmr.transfer.TransferEvent;
|
||||
|
||||
/**
|
||||
* An abstract implementation of TransferEvent.
|
||||
* Also implements RangedTransferEvent.
|
||||
* Also implements the operations required by RangedTransferEvent.
|
||||
* @see TransferEvent
|
||||
* @see RangedTransferEvent
|
||||
*/
|
||||
@@ -105,23 +105,31 @@ public abstract class TransferEventImpl implements TransferEvent
|
||||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple human readable summary of this event, the format of this string is
|
||||
* not guaranteed and is liable to change.
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return "TransferEventImpl : " + this.getTime() + ", " + this.getTransferState();
|
||||
return this.getClass().getSimpleName() + ", " + this.getTime() + ", " + this.getTransferState();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if(obj instanceof TransferEventImpl)
|
||||
if(obj != null)
|
||||
{
|
||||
TransferEventImpl other = (TransferEventImpl)obj;
|
||||
if(other.getTransferState().equals(this.getTransferState()) &&
|
||||
other.getPosition() == this.getPosition() &&
|
||||
other.getTime().equals(this.getTime()))
|
||||
if(this.getClass().equals(obj.getClass()))
|
||||
{
|
||||
return true;
|
||||
TransferEventImpl other = (TransferEventImpl)obj;
|
||||
if(other.getTransferState().equals(this.getTransferState()) &&
|
||||
other.getPosition() == this.getPosition() &&
|
||||
other.getTime().equals(this.getTime()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// not a match
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user