com.adobe.repository.bindings
Class DeltaInfo

java.lang.Object
  extended by com.adobe.repository.bindings.DeltaInfo
All Implemented Interfaces:
java.io.Serializable

public class DeltaInfo
extends java.lang.Object
implements java.io.Serializable

This class maintains information helpful to synchronizing local copies of resources with those in the Repository.

It provides status constants that store bitmasks used to determine whether there are changes to content and metadata, as well as information about resource locking. It also provides methods that can be used to specify and retrieve resources and their status.

See Also:
Serialized Form

Field Summary
static short CHANGE_TO_CONTENT
          There have been changes to the content.
static short CHANGE_TO_METADATA
          There have been changes to the metadata.
static short LOCKED_BY_OTHERS
          The resource is locked by others.
static short LOCKED_BY_USER
          The resource is locked by the user.
static short NO_CHANGE_AND_NO_LOCKS
          There have been no changes to metadata or content, and there are no locks.
 
Constructor Summary
DeltaInfo()
           
 
Method Summary
 void addResource(Resource resource)
          Sets the resource to be synchronized.
 Resource getResource()
          Retrieves the resource being synchronized.
 short getStatus()
          Retrieves the status of the resource.
 void initStatus()
          Resets the status to indicate that the resource is not locked and that there have been no changes to content or metadata.
 void setStatus(short mask)
          Sets the status of the resource.
 boolean testStatus(short mask)
          Compares the current status with the status specified in mask.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CHANGE_AND_NO_LOCKS

public static final short NO_CHANGE_AND_NO_LOCKS
There have been no changes to metadata or content, and there are no locks.

See Also:
Constant Field Values

CHANGE_TO_CONTENT

public static final short CHANGE_TO_CONTENT
There have been changes to the content.

See Also:
Constant Field Values

CHANGE_TO_METADATA

public static final short CHANGE_TO_METADATA
There have been changes to the metadata.

See Also:
Constant Field Values

LOCKED_BY_USER

public static final short LOCKED_BY_USER
The resource is locked by the user.

See Also:
Constant Field Values

LOCKED_BY_OTHERS

public static final short LOCKED_BY_OTHERS
The resource is locked by others.

See Also:
Constant Field Values
Constructor Detail

DeltaInfo

public DeltaInfo()
Method Detail

addResource

public void addResource(Resource resource)
Sets the resource to be synchronized.

Parameters:
resource - The resource to be synchronized.

getResource

public Resource getResource()
Retrieves the resource being synchronized.

Returns:
A Resource object containing the resource.

getStatus

public short getStatus()
Retrieves the status of the resource.

Returns:
A bitmask whose value is the logical OR of one or more of the status constants contained in this class.

setStatus

public void setStatus(short mask)
Sets the status of the resource. This method can be called more than once so that you may specify multiple status values.

Parameters:
mask - The bitmask status value, which must be equal to one of the status constants contained in this class.

testStatus

public boolean testStatus(short mask)
Compares the current status with the status specified in mask.

Parameters:
mask - The status value to be compared with the stored status value.
Returns:
true if the values match, false otherwise.

initStatus

public void initStatus()
Resets the status to indicate that the resource is not locked and that there have been no changes to content or metadata.