public class IntentInstallationContext extends Object
Constructor and Description |
---|
IntentInstallationContext(IntentData toUninstall,
IntentData toInstall)
Creates an Intent installation context by given information.
|
Modifier and Type | Method and Description |
---|---|
void |
addErrorContext(IntentOperationContext context)
Adds an error context.
|
void |
addPendingContext(IntentOperationContext context)
Adds a pending context.
|
Set<IntentOperationContext> |
errorContexts()
Retrieves the error contexts.
|
boolean |
isPendingContextsEmpty()
Check if pending context is empty.
|
Set<IntentOperationContext> |
pendingContexts()
Retrieves the pending contexts.
|
void |
removePendingContext(IntentOperationContext context)
Removes a pending operation context.
|
Optional<IntentData> |
toInstall()
Retrieves the Intent data which to be installed.
|
String |
toString() |
Optional<IntentData> |
toUninstall()
Retrieves the Intent data which to be uninstalled.
|
public IntentInstallationContext(IntentData toUninstall, IntentData toInstall)
toUninstall
- the Intent to uninstalltoInstall
- the Intent to installpublic void removePendingContext(IntentOperationContext context)
context
- the operation context to be addedpublic void addPendingContext(IntentOperationContext context)
context
- the operation context to be addedpublic void addErrorContext(IntentOperationContext context)
context
- the error context to be added.public Set<IntentOperationContext> pendingContexts()
public Set<IntentOperationContext> errorContexts()
public boolean isPendingContextsEmpty()
public Optional<IntentData> toUninstall()
public Optional<IntentData> toInstall()