Package io.anyline2.legacy.products
Class ProductContext
-
- All Implemented Interfaces:
public final class ProductContext extends AssetContext
-
-
Constructor Summary
Constructors Constructor Description ProductContext(Context context, String pluginId, Product product)
Gets or sets the product name that is used to fetch the proper assets ProductContext(Context context, String pluginId, Product product, String assetId)
Creates a new ProductContext for a given Product with a specific asset Id ProductContext(Context context, String pluginId, Product product, Version assetVersion)
Creates a new ProductContext for a given Product with a specific asset version on a specific Stage. ProductContext(Context context, String pluginId, Product product, Version assetVersion, String stage)
Creates a new ProductContext for a given Product with a specific asset version on a specific Stage. ProductContext(Context context, JSONObject jsonObject)
Creates a new ProductContext from a JSON object
-
Method Summary
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ProductContext
ProductContext(Context context, 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
ProductContext(Context context, String pluginId, Product product, 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
ProductContext(Context context, 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
ProductContext(Context context, String pluginId, Product product, Version assetVersion, 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
ProductContext(Context context, JSONObject jsonObject)
Creates a new ProductContext from a JSON object- Parameters:
context
- Application contextjsonObject
- JSON Object to be parsed
-
-
Method Detail
-
getProduct
Product getProduct()
Gets the product
- Returns:
product of current ProductContext
-
-
-
-