Package io.anyline2.legacy.products
Class ProductContext
- java.lang.Object
-
- io.anyline2.legacy.trainer.AssetContext
-
- io.anyline2.legacy.products.ProductContext
-
public final class ProductContext extends AssetContext
-
-
Constructor Summary
Constructors Constructor Description ProductContext(android.content.Context context, java.lang.String pluginId, Product product)
Gets or sets the product name that is used to fetch the proper assetsProductContext(android.content.Context context, java.lang.String pluginId, Product product, Version assetVersion)
Creates a new ProductContext for a given Product with a specific asset version on a specific Stage.ProductContext(android.content.Context context, java.lang.String pluginId, Product product, Version assetVersion, java.lang.String stage)
Creates a new ProductContext for a given Product with a specific asset version on a specific Stage.ProductContext(android.content.Context context, java.lang.String pluginId, Product product, java.lang.String assetId)
Creates a new ProductContext for a given Product with a specific asset IdProductContext(android.content.Context context, org.json.JSONObject jsonObject)
Creates a new ProductContext from a JSON object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Product
getProduct()
Gets the product-
Methods inherited from class io.anyline2.legacy.trainer.AssetContext
getAnylineVersion, getAssetId, getAssetVersion, getConfigCacheDirectory, getParameter, getPluginId, getStage, getTokenCacheDirectory, setParameter, toJSONObject
-
-
-
-
Constructor Detail
-
ProductContext
public ProductContext(@NonNull android.content.Context context, java.lang.String pluginId, Product product)
Gets or sets the product name that is used to fetch the proper assets- Parameters:
context
- Application contextpluginId
- plugin Idproduct
- Product that assets should be fetched for
-
ProductContext
public ProductContext(@NonNull android.content.Context context, java.lang.String pluginId, Product product, java.lang.String assetId)
Creates a new ProductContext for a given Product with a specific asset Id- Parameters:
context
- Application contextpluginId
- plugin Idproduct
- Product that assets should be fetched forassetId
- Asset Id of the Product
-
ProductContext
public ProductContext(@NonNull android.content.Context context, java.lang.String pluginId, Product product, Version assetVersion)
Creates a new ProductContext for a given Product with a specific asset version on a specific Stage.- Parameters:
context
- Application contextpluginId
- plugin Idproduct
- Product that assets should be fetched forassetVersion
- asset Version
-
ProductContext
public ProductContext(@NonNull android.content.Context context, java.lang.String pluginId, Product product, Version assetVersion, java.lang.String stage)
Creates a new ProductContext for a given Product with a specific asset version on a specific Stage.- Parameters:
context
- Application contextpluginId
- plugin Idproduct
- Product that assets should be fetched forassetVersion
- asset Versionstage
- stage - set this to null to use the default stage
-
ProductContext
public ProductContext(@NonNull android.content.Context context, org.json.JSONObject jsonObject)
Creates a new ProductContext from a JSON object- Parameters:
context
- Application contextjsonObject
- JSON Object to be parsed
-
-
Method Detail
-
getProduct
public Product getProduct()
Gets the product- Returns:
- product of current ProductContext
-
-