public class

AttachmentManager

extends Object
java.lang.Object
   ↳ com.esri.android.map.AttachmentManager

Summary

Nested Classes
interface AttachmentManager.AttachmentDownloadListener  
interface AttachmentManager.AttachmentRetrievalListener  
Public Constructors
AttachmentManager(Context context, String url, UserCredentials credentials, File attachmentDownloadDir)
The Constructor.
Public Methods
boolean deleteAttachment(String attachmentFileName)
Delete attachment.
Future<File> downloadAttachment(long objectID, int attachmentId, String attachmentFileName, AttachmentManager.AttachmentDownloadListener downloadListener)
Downloads an attachment asynchronously.
File getAttachmentDownloadDir()
Gets the attachment download dir.
File getAttachmentFile(String attachmentFileName)
Gets the attachment file.
Future<List<AttachmentInfo>> retrieveAttachmentInfos(long objectId, AttachmentManager.AttachmentRetrievalListener attachmentListener)
Retrieves attachment information asynchronously.
void setAttachmentDownloadDir(File attachmentDownloadDir)
Sets the attachment download dir.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AttachmentManager (Context context, String url, UserCredentials credentials, File attachmentDownloadDir)

The Constructor.

Parameters
context Context: the context
url String: the url
credentials UserCredentials: the credentials
attachmentDownloadDir File: the attachment download dir

Public Methods

public boolean deleteAttachment (String attachmentFileName)

Delete attachment.

Parameters
attachmentFileName String: the attachment file name
Returns
boolean true, if delete attachment

public Future<File> downloadAttachment (long objectID, int attachmentId, String attachmentFileName, AttachmentManager.AttachmentDownloadListener downloadListener)

Downloads an attachment asynchronously.

Parameters
objectID long: the object id
attachmentId int: the attachment id
attachmentFileName String: the attachment file name
downloadListener AttachmentManager.AttachmentDownloadListener: the download listener
Returns
Future<File> a Future with a File object if it is downloaded successfully.
Throws
IllegalArgumentException if the url is invalid.

public File getAttachmentDownloadDir ()

Gets the attachment download dir.

Returns
File the attachment download dir

public File getAttachmentFile (String attachmentFileName)

Gets the attachment file.

Parameters
attachmentFileName String: the attachment file name
Returns
File the attachment file

public Future<List<AttachmentInfo>> retrieveAttachmentInfos (long objectId, AttachmentManager.AttachmentRetrievalListener attachmentListener)

Retrieves attachment information asynchronously.

Parameters
objectId long: the object id
attachmentListener AttachmentManager.AttachmentRetrievalListener: the attachment listener
Returns
Future<List<AttachmentInfo>> a Future object with a list of AttachmentInfo.
Throws
IllegalArgumentException if the url is invalid.

public void setAttachmentDownloadDir (File attachmentDownloadDir)

Sets the attachment download dir.

Parameters
attachmentDownloadDir File: the attachment download dir