Package com.mks.tm.api
Interface IItemDelta
public interface IItemDelta
A record of the modifications that will be made to an item.
-
Method Summary
Modifier and TypeMethodDescriptionaddAttachment
(String fieldName, File file, String name, String summary) Add an attachment.addRelationship
(String fieldName, int itemID, Set<String> flags) Add a relationship.void
editItem()
Commit this delta of changes to the item into the repository.Get the collection of attachment deltas for the attachments that will be added to the item.Get the collection of relationship deltas for the relationships that will be added to the item.Get the new field values contained in this delta.int
getID()
Get the ID of the item this delta is for.Get the collection of attachment deltas for the attachments that will be removed from the item.Get the collection of relationship deltas for the relationships that will be removed from the item.Get the new rich content field values contained in this delta.removeAttachment
(String fieldName, String attachmentName) Remove an attachment from an attachment field.removeRelationship
(String fieldName, int itemID) Remove a relationship from a relationship field.void
setFieldValue
(String fieldName, String value) Set a field value.void
setRichContentFieldValue
(String fieldName, String value) Set a rich content field value.
-
Method Details
-
getID
Get the ID of the item this delta is for.- Returns:
- The ID of the item.
- Throws:
TMAPIException
- Reserved exception.
-
setFieldValue
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
Get the new field values contained in this delta.- Returns:
- The map of field name to new field values.
- Throws:
TMAPIException
- Reserved exception.
-
setRichContentFieldValue
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
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
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
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
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
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
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
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.
-