Package io.anyline2.legacy.trainer
Class AssetContext
-
- All Implemented Interfaces:
public class AssetContext
This class holds contextual information to connect to Anyline Trainer projects.
-
-
Constructor Summary
Constructors Constructor Description AssetContext(Context context, String pluginId, String assetId)
Creates a new AssetContext for a specific plugin Id AssetContext(Context context, String pluginId, Version assetVersion)
Creates a new AssetContext for a specific plugin Id AssetContext(Context context, String pluginId, Version assetVersion, String stage)
Creates a new AssetContext for a specific asset version on a specific stage AssetContext(Context context, JSONObject jsonObject)
Creates a new AssetContext from a JSON object
-
Method Summary
Modifier and Type Method Description String
getStage()
Gets the project stage. Version
getAssetVersion()
Gets the asset version String
getAssetId()
Gets the asset id String
getPluginId()
Returns the plugin Id Version
getAnylineVersion()
Gets the Anyline version String
getTokenCacheDirectory()
Gets the token cache directory String
getConfigCacheDirectory()
Get the config cache directory JSONObject
toJSONObject()
void
setParameter(String parameterName, Object value)
Object
getParameter(String parameterName)
-
-
Constructor Detail
-
AssetContext
AssetContext(Context context, String pluginId, String assetId)
Creates a new AssetContext for a specific plugin Id- Parameters:
pluginId
- plugin IdassetId
- asset Id
-
AssetContext
AssetContext(Context context, String pluginId, Version assetVersion)
Creates a new AssetContext for a specific plugin Id- Parameters:
pluginId
- asset IdassetVersion
- asset version
-
AssetContext
AssetContext(Context context, String pluginId, Version assetVersion, String stage)
Creates a new AssetContext for a specific asset version on a specific stage- Parameters:
pluginId
- plugin IdassetVersion
- asset versionstage
- project stage
-
AssetContext
AssetContext(Context context, JSONObject jsonObject)
Creates a new AssetContext from a JSON object- Parameters:
context
- Application contextjsonObject
- JSON object to be parsed
-
-
Method Detail
-
getAssetVersion
Version getAssetVersion()
Gets the asset version
- Returns:
asset version
-
getAssetId
String getAssetId()
Gets the asset id
- Returns:
asset id
-
getPluginId
String getPluginId()
Returns the plugin Id
- Returns:
plugin Id
-
getAnylineVersion
Version getAnylineVersion()
Gets the Anyline version
- Returns:
anyline Version
-
getTokenCacheDirectory
String getTokenCacheDirectory()
Gets the token cache directory
- Returns:
file path to token cache directory
-
getConfigCacheDirectory
String getConfigCacheDirectory()
Get the config cache directory
- Returns:
file path to config cache directory
-
toJSONObject
JSONObject toJSONObject()
-
setParameter
void setParameter(String parameterName, Object value)
-
getParameter
Object getParameter(String parameterName)
-
-
-
-