com.xmatters.ibm.tivoli.datasync
Enum SyncAction

java.lang.Object
  extended by java.lang.Enum<SyncAction>
      extended by com.xmatters.ibm.tivoli.datasync.SyncAction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SyncAction>

public enum SyncAction
extends java.lang.Enum<SyncAction>

Contains all possible actions the can be taken during synchronization

Author:
bneate

Enum Constant Summary
ADD
           
DELETE
           
EXCLUDED
           
FAILED
           
NO_ACTION
           
NOT_DELETABLE
           
SEED_ONLY
           
UPDATE
           
 
Method Summary
 SyncMessage getMessage(java.lang.String object, java.lang.String name)
          Retrieve a SyncMessage object containing an appropriate message to be logged.
 SyncMessage getMessage(java.lang.String object, java.lang.String name, java.lang.Exception reason)
          Retrieve a SyncMessage object containing an appropriate message to be logged and the exception causing it.
 boolean succeeded()
          Decided if the specified SyncAction is considered a success or a failure
static SyncAction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SyncAction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADD

public static final SyncAction ADD

UPDATE

public static final SyncAction UPDATE

DELETE

public static final SyncAction DELETE

SEED_ONLY

public static final SyncAction SEED_ONLY

NOT_DELETABLE

public static final SyncAction NOT_DELETABLE

EXCLUDED

public static final SyncAction EXCLUDED

FAILED

public static final SyncAction FAILED

NO_ACTION

public static final SyncAction NO_ACTION
Method Detail

values

public static SyncAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SyncAction c : SyncAction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SyncAction valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getMessage

public SyncMessage getMessage(java.lang.String object,
                              java.lang.String name,
                              java.lang.Exception reason)
Retrieve a SyncMessage object containing an appropriate message to be logged and the exception causing it.

Parameters:
object - The object this synchronization was for ('Person' for example)
name - The identifier for this object ('BSmith' for example)
reason - An Exception containing the reason the synchronization failed
Returns:
All the information to be logged caused by the synchronization

getMessage

public SyncMessage getMessage(java.lang.String object,
                              java.lang.String name)
Retrieve a SyncMessage object containing an appropriate message to be logged.

Parameters:
object - The object this synchronization was for ('Person' for example)
name - The identifier for this object ('BSmith' for example)
Returns:
All the information to be logged caused by the synchronization

succeeded

public boolean succeeded()
Decided if the specified SyncAction is considered a success or a failure

Returns:
True if the synchronization was successful and false otherwise.