Class 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 Id
      AssetContext​(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
      AssetContext​(android.content.Context context, java.lang.String pluginId, java.lang.String assetId)
      Creates a new AssetContext for a specific plugin Id
      AssetContext​(android.content.Context context, org.json.JSONObject jsonObject)
      Creates a new AssetContext from a JSON object
    • 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 Id
        assetId - 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 Id
        assetVersion - 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 version
        stage - project stage
        pluginId - 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 context
        jsonObject - 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)