Interface IItemDelta


public interface IItemDelta
A record of the modifications that will be made to an item.
  • Method Details

    • getID

      int getID() throws TMAPIException
      Get the ID of the item this delta is for.
      Returns:
      The ID of the item.
      Throws:
      TMAPIException - Reserved exception.
    • setFieldValue

      void setFieldValue(String fieldName, String value) throws TMAPIException
      Set a field value.
      Parameters:
      fieldName - The name of the field to set the value for.
      value - The new value for the field.
      Throws:
      TMAPIException - Reserved exception.
    • getFieldValues

      Map<String,String> getFieldValues() throws TMAPIException
      Get the new field values contained in this delta.
      Returns:
      The map of field name to new field values.
      Throws:
      TMAPIException - Reserved exception.
    • setRichContentFieldValue

      void setRichContentFieldValue(String fieldName, String value) throws TMAPIException
      Set a rich content field value.
      Parameters:
      fieldName - The name of the field to set the value for.
      value - The new rich content value for the field.
      Throws:
      TMAPIException - Reserved exception.
    • getRichContentFieldValues

      Map<String,String> getRichContentFieldValues() throws TMAPIException
      Get the new rich content field values contained in this delta.
      Returns:
      The map of field name to new rich content field values.
      Throws:
      TMAPIException - Reserved exception.
    • removeAttachment

      IItemAttachmentDelta removeAttachment(String fieldName, String attachmentName) throws TMAPIException
      Remove an attachment from an attachment field.
      Parameters:
      fieldName - The name of the attachment field.
      attachmentName - The name of the attachment to remove from the field on the item.
      Returns:
      The attachment delta which records the removal of the attachment.
      Throws:
      TMAPIException - Reserved exception.
    • getRemovedAttachments

      Collection<IItemAttachmentDelta> getRemovedAttachments() throws TMAPIException
      Get the collection of attachment deltas for the attachments that will be removed from the item.
      Returns:
      The collection of attachment deltas for the attachments that will be removed from the item.
      Throws:
      TMAPIException - Reserved exception.
    • addAttachment

      IItemAttachmentDelta addAttachment(String fieldName, File file, String name, String summary) throws TMAPIException
      Add an attachment.
      Parameters:
      fieldName - The name of the attachment field.
      file - The local file that contains the content.
      name - The name for the attachment.
      summary - The summary for the attachment.
      Returns:
      The attachment delta which records the addition of the attachment.
      Throws:
      TMAPIException - Reserved exception.
    • getAddedAttachments

      Collection<IItemAttachmentDelta> getAddedAttachments() throws TMAPIException
      Get the collection of attachment deltas for the attachments that will be added to the item.
      Returns:
      The collection of attachment deltas for the attachments that will be added to the item.
      Throws:
      TMAPIException - Reserved exception.
    • removeRelationship

      IItemRelationshipDelta removeRelationship(String fieldName, int itemID) throws TMAPIException
      Remove a relationship from a relationship field.
      Parameters:
      fieldName - The name of the relationship field.
      itemID - The ID of the item to remove from the relationship field.
      Returns:
      The relationship delta which records the removal of the relationship.
      Throws:
      TMAPIException - Reserved exception.
    • getRemovedRelationships

      Collection<IItemRelationshipDelta> getRemovedRelationships() throws TMAPIException
      Get the collection of relationship deltas for the relationships that will be removed from the item.
      Returns:
      The collection of relationship deltas for the relationships that will be removed from the item.
      Throws:
      TMAPIException - Reserved exception.
    • addRelationship

      IItemRelationshipDelta addRelationship(String fieldName, int itemID, Set<String> flags) throws TMAPIException
      Add a relationship.
      Parameters:
      fieldName - The name of the relationship field.
      itemID - The ID of the item to add to the relationship field.
      flags - The relationship flags.
      Returns:
      The relationship delta which records the addition of the relationship.
      Throws:
      TMAPIException - Reserved exception.
    • getAddedRelationships

      Collection<IItemRelationshipDelta> getAddedRelationships() throws TMAPIException
      Get the collection of relationship deltas for the relationships that will be added to the item.
      Returns:
      The collection of relationship deltas for the relationships that will be added to the item.
      Throws:
      TMAPIException - Reserved exception.
    • editItem

      void editItem() throws TMAPIException
      Commit this delta of changes to the item into the repository.

      This method invokes the 'im editissue' command via the underlying API session back into the server. The API session user must have ACL permission to Login as well as sufficient workflow permissions to edit the item (all fields requested to be modified).

      Throws:
      TMAPIException - If the changes could not be committed into the repository.