Package io.anyline2.legacy.trainer
Class AssetContext
-
- All Implemented Interfaces:
public class AssetContextThis 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 StringgetStage()Gets the project stage. VersiongetAssetVersion()Gets the asset version StringgetAssetId()Gets the asset id StringgetPluginId()Returns the plugin Id VersiongetAnylineVersion()Gets the Anyline version StringgetTokenCacheDirectory()Gets the token cache directory StringgetConfigCacheDirectory()Get the config cache directory JSONObjecttoJSONObject()voidsetParameter(String parameterName, Object value)ObjectgetParameter(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)
-
-
-
-