com.microsoft.tfs.core.clients.workitem.files
Interface AttachmentCollection

All Superinterfaces:
java.lang.Iterable<Attachment>

public interface AttachmentCollection
extends java.lang.Iterable<Attachment>

Stores the collection of attachments that is associated with a work item.

Since:
TEE-SDK-10.1

Method Summary
 boolean add(Attachment attachment)
          Adds the specified attachment to this collection.
 Attachment getAttachmentByFileID(int fileId)
          Gets the attachment by file ID.
 java.util.Iterator<Attachment> iterator()
           
 void remove(Attachment attachment)
          Removes the specified attachment from this collection.
 int size()
           
 

Method Detail

iterator

java.util.Iterator<Attachment> iterator()
Specified by:
iterator in interface java.lang.Iterable<Attachment>
Returns:
an iterator for this collection

size

int size()
Returns:
the number of Attachments in the collection.

add

boolean add(Attachment attachment)
Adds the specified attachment to this collection.

Parameters:
attachment - the attachment to add (must not be null)
Returns:
true if the attachment was not already in this collection and was added, false if this collection already contained the attachment.

remove

void remove(Attachment attachment)
Removes the specified attachment from this collection.

Parameters:
attachment - the attachment to remove (must not be null)

getAttachmentByFileID

Attachment getAttachmentByFileID(int fileId)
Gets the attachment by file ID.

Parameters:
fileId - the file ID to find in this collection
Returns:
the Attachment with the specified ID or null if no matching attachment was found


© 2015 Microsoft. All rights reserved.