Package io.anyline2.legacy.trainer
Class AssetContext
- java.lang.Object
-
- io.anyline2.legacy.trainer.AssetContext
-
- Direct Known Subclasses:
ProductContext
,ProjectContext
public class AssetContext extends java.lang.Object
This class holds contextual information to connect to Anyline Trainer projects.
-
-
Constructor Summary
Constructors Constructor Description AssetContext(android.content.Context context, java.lang.String pluginId, Version assetVersion)
Creates a new AssetContext for a specific plugin IdAssetContext(android.content.Context context, java.lang.String pluginId, Version assetVersion, java.lang.String stage)
Creates a new AssetContext for a specific asset version on a specific stageAssetContext(android.content.Context context, java.lang.String pluginId, java.lang.String assetId)
Creates a new AssetContext for a specific plugin IdAssetContext(android.content.Context context, org.json.JSONObject jsonObject)
Creates a new AssetContext from a JSON object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Version
getAnylineVersion()
Gets the Anyline versionjava.lang.String
getAssetId()
Gets the asset idVersion
getAssetVersion()
Gets the asset versionjava.lang.String
getConfigCacheDirectory()
Get the config cache directoryjava.lang.Object
getParameter(java.lang.String parameterName)
java.lang.String
getPluginId()
Returns the plugin Idjava.lang.String
getStage()
Gets the project stage.java.lang.String
getTokenCacheDirectory()
Gets the token cache directoryvoid
setParameter(java.lang.String parameterName, java.lang.Object value)
org.json.JSONObject
toJSONObject()
-
-
-
Constructor Detail
-
AssetContext
public AssetContext(@NonNull android.content.Context context, java.lang.String pluginId, java.lang.String assetId)
Creates a new AssetContext for a specific plugin Id- Parameters:
pluginId
- plugin IdassetId
- asset Id
-
AssetContext
public AssetContext(@NonNull android.content.Context context, java.lang.String pluginId, Version assetVersion)
Creates a new AssetContext for a specific plugin Id- Parameters:
pluginId
- asset IdassetVersion
- asset version
-
AssetContext
public AssetContext(@NonNull android.content.Context context, java.lang.String pluginId, Version assetVersion, java.lang.String stage)
Creates a new AssetContext for a specific asset version on a specific stage- Parameters:
assetVersion
- asset versionstage
- project stagepluginId
- plugin Id
-
AssetContext
public AssetContext(@NonNull android.content.Context context, org.json.JSONObject jsonObject)
Creates a new AssetContext from a JSON object- Parameters:
context
- Application contextjsonObject
- JSON object to be parsed
-
-
Method Detail
-
getStage
public java.lang.String getStage()
Gets the project stage.- Returns:
- stage
-
getAssetVersion
public Version getAssetVersion()
Gets the asset version- Returns:
- asset version
-
getAssetId
public java.lang.String getAssetId()
Gets the asset id- Returns:
- asset id
-
getPluginId
public java.lang.String getPluginId()
Returns the plugin Id- Returns:
- plugin Id
-
getAnylineVersion
public Version getAnylineVersion()
Gets the Anyline version- Returns:
- anyline Version
-
getTokenCacheDirectory
public java.lang.String getTokenCacheDirectory()
Gets the token cache directory- Returns:
- file path to token cache directory
-
getConfigCacheDirectory
public java.lang.String getConfigCacheDirectory()
Get the config cache directory- Returns:
- file path to config cache directory
-
toJSONObject
public org.json.JSONObject toJSONObject()
-
setParameter
public void setParameter(java.lang.String parameterName, java.lang.Object value)
-
getParameter
public java.lang.Object getParameter(java.lang.String parameterName)
-
-