public class ProductInformation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ProductInformation.Platform |
static class |
ProductInformation.ProductType |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
appUri
Absolute path (URL for remote repo, or file path for local repo
|
protected static java.util.regex.Pattern |
DELIMITER_PATTERN |
protected java.lang.String |
description |
static java.lang.String |
FILE_PREFIX |
protected long |
fileSize |
protected java.lang.String |
hash |
protected java.lang.String |
iconUri
Absolute path (file path for both remote repo and local repo)
|
protected int |
installedVersion
Currently installed version, or -1
|
protected int |
osRequirement |
protected java.lang.String |
packageName |
protected ProductInformation.Platform |
platform |
protected ProductInformation.ProductType |
productType |
protected int |
revision
Repo available revision
|
protected java.lang.String |
simpleName |
protected java.lang.String |
takRequirement
e.g.
|
protected java.lang.String |
version
Repo available version
|
Constructor and Description |
---|
ProductInformation(ProductRepository repo,
ProductInformation.Platform platform,
ProductInformation.ProductType productType,
java.lang.String packageName,
java.lang.String simpleName,
java.lang.String version,
int revision,
java.lang.String appUri,
java.lang.String iconUri,
java.lang.String description,
java.lang.String hash,
int osRequirement,
java.lang.String takRequirement,
int installedVersion) |
ProductInformation(ProductRepository repo,
java.lang.String pkgName,
java.lang.String simpleName,
int revision,
java.lang.String url,
int installedVersion) |
Modifier and Type | Method and Description |
---|---|
static ProductInformation |
create(ProductRepository repo,
android.content.Context context,
java.io.File file) |
static ProductInformation |
create(ProductRepository repo,
android.content.Context context,
java.lang.String paramString) |
boolean |
equals(java.lang.Object o) |
boolean |
equals(ProductInformation c)
Note this only checks package name, not that the other details match
|
java.lang.String |
getAppUri() |
java.lang.String |
getDescription() |
long |
getFileSize() |
java.lang.String |
getHash() |
android.graphics.drawable.Drawable |
getIcon() |
java.lang.String |
getIconUri() |
java.lang.String |
getInCompatibilityReason()
Get string version of why the product is incompatible, or empty string if its compatible
|
int |
getInstalledVersion() |
int |
getOsRequirement() |
java.lang.String |
getPackageName() |
ProductRepository |
getParent() |
ProductInformation.Platform |
getPlatform() |
ProductInformation.ProductType |
getProductType() |
int |
getRevision() |
java.lang.String |
getSimpleName() |
protected static java.lang.String |
getString(java.lang.String s) |
java.lang.String |
getTakRequirement() |
java.lang.String |
getVersion() |
boolean |
hasFileSize() |
int |
hashCode() |
boolean |
isApiCompatible()
Specifically check to see if the API is considered compatible.
|
boolean |
isCompatible()
Check is OS API level is met, and ATAK Plugin API level is met
|
boolean |
isInstalled() |
boolean |
isOsCompatible() |
boolean |
isPlugin() |
boolean |
isSignatureValid() |
boolean |
isTakCompatible()
Returns true if the Product is considered TAK compatible.
|
boolean |
isValid() |
boolean |
search(java.lang.String searchTerms) |
static boolean |
search(java.lang.String value,
java.lang.String searchTerms) |
void |
setFileSize(long size) |
void |
setInstalledVersion(int installedVersion) |
void |
setParent(ProductRepository parent) |
java.lang.String |
toFullString() |
java.lang.String |
toString() |
public static final java.lang.String FILE_PREFIX
protected final ProductInformation.Platform platform
protected final ProductInformation.ProductType productType
protected final java.lang.String packageName
protected final java.lang.String simpleName
protected final java.lang.String version
protected final int revision
protected java.lang.String appUri
protected java.lang.String iconUri
protected final java.lang.String description
protected final java.lang.String hash
protected final int osRequirement
protected long fileSize
protected final java.lang.String takRequirement
protected int installedVersion
protected static final java.util.regex.Pattern DELIMITER_PATTERN
public ProductInformation(ProductRepository repo, ProductInformation.Platform platform, ProductInformation.ProductType productType, java.lang.String packageName, java.lang.String simpleName, java.lang.String version, int revision, java.lang.String appUri, java.lang.String iconUri, java.lang.String description, java.lang.String hash, int osRequirement, java.lang.String takRequirement, int installedVersion)
public ProductInformation(ProductRepository repo, java.lang.String pkgName, java.lang.String simpleName, int revision, java.lang.String url, int installedVersion)
public static ProductInformation create(ProductRepository repo, android.content.Context context, java.lang.String paramString)
public static ProductInformation create(ProductRepository repo, android.content.Context context, java.io.File file)
public boolean isSignatureValid()
public boolean isValid()
public boolean search(java.lang.String searchTerms)
public static boolean search(java.lang.String value, java.lang.String searchTerms)
public ProductRepository getParent()
public void setParent(ProductRepository parent)
public ProductInformation.Platform getPlatform()
public ProductInformation.ProductType getProductType()
public boolean isPlugin()
public java.lang.String getPackageName()
public java.lang.String getSimpleName()
public java.lang.String getVersion()
public int getRevision()
public java.lang.String getAppUri()
public java.lang.String getIconUri()
public android.graphics.drawable.Drawable getIcon()
public java.lang.String getDescription()
public java.lang.String getHash()
public int getOsRequirement()
public java.lang.String getTakRequirement()
public long getFileSize()
public boolean hasFileSize()
public void setFileSize(long size)
public int getInstalledVersion()
public void setInstalledVersion(int installedVersion)
public boolean isInstalled()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toFullString()
protected static java.lang.String getString(java.lang.String s)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(ProductInformation c)
c
- the produce to check to make sure it is equal.public int hashCode()
hashCode
in class java.lang.Object
public boolean isCompatible()
public java.lang.String getInCompatibilityReason()
public boolean isOsCompatible()
public boolean isApiCompatible()
public boolean isTakCompatible()