kaos.core.csi.registration
Class ModificationResultImpl

java.lang.Object
  extended by kaos.core.csi.registration.ModificationResultImpl
All Implemented Interfaces:
java.io.Serializable, ModificationResult

public class ModificationResultImpl
extends java.lang.Object
implements ModificationResult

Contains the modification type, its succes/failure flag and the description and error code for the modification failure.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface kaos.core.csi.registration.ModificationResult
ADD, ADD_ELEMENT_TO_LIST, ADD_ELEMENT_TO_TABLE, ADD_ELEMENTS_TO_LIST, ADD_ELEMENTS_TO_TABLE, DELETE, DELETE_ELEMENT_FROM_LIST, DELETE_ELEMENT_FROM_TABLE, DELETE_ELEMENTS_FROM_LIST, DELETE_ELEMENTS_FROM_TABLE, REPLACE
 
Constructor Summary
ModificationResultImpl()
          Constructor.
 
Method Summary
 int getModificationFailureCode()
          Return the error code of the modification failure.
 java.lang.String getModificationFailureDescription()
          Return the description of modification failure.
 java.lang.String getModificationType()
          Returns a String specifying the type of modification.
 boolean isSuccess()
          Obtain the success/failure status of the modification.
 void setModificationFailureCode(int code)
          Store the error code of the modification failure.
 void setModificationFailureDescription(java.lang.String desc)
          Store the description of modification failure.
 void setModificationType(java.lang.String type)
          Set the type of the modification.
 void setSuccess(boolean flag)
          Set the success/failure status of the modification.
 java.lang.String toString()
          A utility method to create a String representation of the ModificationResult.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModificationResultImpl

public ModificationResultImpl()
Constructor.

Method Detail

getModificationType

public java.lang.String getModificationType()
Returns a String specifying the type of modification. The possible values are: ADD - a new key-value pair to the properties Hashtable. The key is the name of the property, the value is the value of the property. ADD_ELEMENT_TO_LIST - add the specified property value to the existing property, whose value is a List, for example, to add a domain name to the existing List of domain names. ADD_ELEMENTS_TO_LIST - to add the specified property value (which is a List) to the existing property, whose value is a List , for example, to add a List of new domain names to the existing List of domain names. REPLACE - to replace a value of the existing key-value pair with the specified property value. DELETE - delete the key-value pair from the properties Hashtable. DELETE_ELEMENT_FROM_LIST - to delete the specified property value from the existing property, whose value is a List, for example, to remove an ontological type from the existing List of types. DELETE_ELEMENTS_FROM_LIST - to remove the specified property value (which is a List) from the existing property, whose value is a List , for example, to remove a List of ontological types from the existing List of types. ADD_ELEMENT_TO_TABLE - add the specified property value ( a 1-element Hashtable)to the existing property, whose value is a Table, for example, to add an ontological type and its description to the existing Table of types and their descriptions. ADD_ELEMENTS_TO_TABLE - to add the specified property value (which is a Hashtable)) to the existing property, whose value is a Hashtable , for example, to add a Hashtable of new ontological types and their descriptions to the existing Hashtable of types and their descriptions. DELETE_ELEMENT_FROM_TABLE - to delete the specified property value from the existing property, whose value is a Hashtable, for example, to remove an ontological type and its description from the existing Hashtable of types. DELETE_ELEMENTS_FROM_TABLE - to remove the specified property value, which is a Collection of keys to remove from the existing property, whose value is a Hashtable, for example, to remove a Collection of ontological types from the existing Hashtable of types->descriptions.

Specified by:
getModificationType in interface ModificationResult
Returns:
String describing the type of the modification.

setModificationType

public void setModificationType(java.lang.String type)
Set the type of the modification.

Specified by:
setModificationType in interface ModificationResult
Parameters:
type - String containing the type of modification.

setSuccess

public void setSuccess(boolean flag)
Set the success/failure status of the modification.

Specified by:
setSuccess in interface ModificationResult
Parameters:
flag - boolean indicating modification success/failure; true means success.

isSuccess

public boolean isSuccess()
Obtain the success/failure status of the modification.

Specified by:
isSuccess in interface ModificationResult
Returns:
boolean indicating modification success/failure; true means success

getModificationFailureDescription

public java.lang.String getModificationFailureDescription()
Return the description of modification failure.

Specified by:
getModificationFailureDescription in interface ModificationResult
Returns:
String describing modification failure.

setModificationFailureDescription

public void setModificationFailureDescription(java.lang.String desc)
Store the description of modification failure.

Specified by:
setModificationFailureDescription in interface ModificationResult
Parameters:
desc - String containing the description of modification failure.

getModificationFailureCode

public int getModificationFailureCode()
Return the error code of the modification failure.

Specified by:
getModificationFailureCode in interface ModificationResult
Returns:
int describing modification failure.

setModificationFailureCode

public void setModificationFailureCode(int code)
Store the error code of the modification failure.

Specified by:
setModificationFailureCode in interface ModificationResult
Parameters:
code - int containing the error code of the modification failure.

toString

public java.lang.String toString()
A utility method to create a String representation of the ModificationResult.

Overrides:
toString in class java.lang.Object
Returns:
String representing the ModificationResult.