public class MissionPackageFileIO
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Constructor and Description |
---|
MissionPackageFileIO(MissionPackageReceiver receiver,
android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
static void |
deletePackage(java.lang.String path,
MapGroup rootGroup)
Remove mission package and its contents
|
static void |
deletePackageFile(java.io.File packageZip)
Proper way to delete mission package file
Move to temporary storage and delete there so the file observer
doesn't attempt to extract it
|
void |
disableFileWatching()
Stop watching for file changes
|
void |
enableFileWatching()
Begin watching for file changes
|
static java.util.Set<java.lang.String> |
getFileShareMountPoints() |
java.lang.String |
getMissionPackageFilesPath() |
static java.lang.String |
getMissionPackageFilesPath(java.lang.String atakMapDataPath) |
java.lang.String |
getMissionPackageIncomingDownloadPath() |
static java.lang.String |
getMissionPackageIncomingDownloadPath(java.lang.String atakMapDataPath) |
java.lang.String |
getMissionPackagePath() |
static java.lang.String |
getMissionPackagePath(java.lang.String atakMapDataPath) |
java.lang.String |
getMissionPackageTransferPath() |
static java.lang.String |
getMissionPackageTransferPath(java.lang.String atakMapDataPath) |
void |
save(MissionPackageManifest contents,
boolean persist,
MissionPackageBaseTask.Callback callback)
Save the Mission Package via an asynchronous task.
|
void |
save(MissionPackageManifest contents,
MissionPackageBaseTask.Callback callback)
Saves and persists the Mission Package via an asynchronous task.
|
void |
saveAndSend(MissionPackageManifest contents,
MissionPackageBaseTask.Callback callback)
Save Mission Package and then Copy/deploy the Mission Package to the built in Web Server and
then invoke callback
|
void |
saveAndSend(MissionPackageManifest contents,
MissionPackageBaseTask.Callback callback,
boolean bSenderDeleteUponError,
Contact[] netContacts)
Save Mission Package and then Copy/deploy the Mission Package to the built in Web Server and
then launch Contact List to send the package to another ATAK user
|
void |
saveAndSendUIDs(MissionPackageManifest contents,
MissionPackageBaseTask.Callback callback,
boolean bSenderDeleteUponError,
java.lang.String[] toUIDs)
Save Mission Package and then Copy/deploy the Mission Package to the built in Web Server and
then launch Contact List to send the package to another ATAK user
|
void |
send(MissionPackageManifest contents,
Contact[] netContacts,
MissionPackageBaseTask.Callback callback)
Copy/deploy the Mission Package to the built in Web Server and then launch Contact List to
send the package to another ATAK user.
|
void |
send(MissionPackageManifest contents,
MissionPackageBaseTask.Callback callback)
Copy/deploy the Mission Package to the built in Web Server and
then invoke callback
|
void |
send(MissionPackageManifest contents,
java.lang.String[] toUIDs,
MissionPackageBaseTask.Callback callback)
Copy/deploy the Mission Package to the built in Web Server and then launch Contact List to
send the package to another ATAK user.
|
public static final java.lang.String TAG
public MissionPackageFileIO(MissionPackageReceiver receiver, android.content.Context context)
public java.lang.String getMissionPackagePath()
public java.lang.String getMissionPackageFilesPath()
public static java.lang.String getMissionPackagePath(java.lang.String atakMapDataPath)
public static java.lang.String getMissionPackageFilesPath(java.lang.String atakMapDataPath)
public java.lang.String getMissionPackageTransferPath()
public static java.lang.String getMissionPackageTransferPath(java.lang.String atakMapDataPath)
public java.lang.String getMissionPackageIncomingDownloadPath()
public static java.lang.String getMissionPackageIncomingDownloadPath(java.lang.String atakMapDataPath)
public void enableFileWatching()
public void disableFileWatching()
public static java.util.Set<java.lang.String> getFileShareMountPoints()
public void save(MissionPackageManifest contents, boolean persist, MissionPackageBaseTask.Callback callback)
contents
- Mission Package manifestpersist
- True to persist the package to the local file databasecallback
- Task callbackpublic void save(MissionPackageManifest contents, MissionPackageBaseTask.Callback callback)
contents
- callback
- public void send(MissionPackageManifest contents, Contact[] netContacts, MissionPackageBaseTask.Callback callback)
contents
- netContacts
- callback
- public void send(MissionPackageManifest contents, java.lang.String[] toUIDs, MissionPackageBaseTask.Callback callback)
contents
- toUIDs
- callback
- public void send(MissionPackageManifest contents, MissionPackageBaseTask.Callback callback)
contents
- callback
- public void saveAndSendUIDs(MissionPackageManifest contents, MissionPackageBaseTask.Callback callback, boolean bSenderDeleteUponError, java.lang.String[] toUIDs)
contents
- callback
- invoked once compression and again once Contact List has been launchedbSenderDeleteUponError
- toUIDs
- public void saveAndSend(MissionPackageManifest contents, MissionPackageBaseTask.Callback callback, boolean bSenderDeleteUponError, Contact[] netContacts)
contents
- callback
- invoked once compression and again once Contact List has been launchedbSenderDeleteUponError
- netContacts
- public void saveAndSend(MissionPackageManifest contents, MissionPackageBaseTask.Callback callback)
contents
- callback
- public void clear()
public static void deletePackageFile(java.io.File packageZip)
packageZip
- Package zip filepublic static void deletePackage(java.lang.String path, MapGroup rootGroup)
path
- Path to mission packagerootGroup
- Root group to start searching for packages