Package io.anyline2.legacy.trainer
Class ProjectContext
- java.lang.Object
-
- io.anyline2.legacy.trainer.AssetContext
-
- io.anyline2.legacy.trainer.ProjectContext
-
public class ProjectContext extends AssetContext
-
-
Constructor Summary
Constructors Constructor Description ProjectContext(android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey)
Creates a new ProjectContext for a given ProjectID plus ApiKeyProjectContext(android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey, Version assetVersion)
Creates a new ProjectContext for a given ProjectID plus ApiKey with a specific VersionProjectContext(android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey, Version assetVersion, java.lang.String stage)
Creates a new ProjectContext for a given ProjectID plus ApiKey with a specific asset version on a specific StageProjectContext(android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey, java.lang.String assetId)
Creates a new ProjectContext for a given ProjectID plus ApiKey with a specific asset IdProjectContext(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 java.lang.String
getApiKey()
Gets the API key that is used to authenticatejava.lang.String
getProjectId()
Gets the project Idvoid
setApiKey(java.lang.String apiKey)
Sets the API key that is used to authenticatevoid
setProjectId(java.lang.String projectId)
Sets the project Id-
Methods inherited from class io.anyline2.legacy.trainer.AssetContext
getAnylineVersion, getAssetId, getAssetVersion, getConfigCacheDirectory, getParameter, getPluginId, getStage, getTokenCacheDirectory, setParameter, toJSONObject
-
-
-
-
Constructor Detail
-
ProjectContext
public ProjectContext(@NonNull android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey)
Creates a new ProjectContext for a given ProjectID plus ApiKey- Parameters:
context
- Application contextprojectId
- project Id to be setapiKey
- API key to be set
-
ProjectContext
public ProjectContext(@NonNull android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey, java.lang.String assetId)
Creates a new ProjectContext for a given ProjectID plus ApiKey with a specific asset Id- Parameters:
context
- Application contextprojectId
- project Id to be setapiKey
- API key to be setassetId
- asset Id to be set
-
ProjectContext
public ProjectContext(@NonNull android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey, Version assetVersion)
Creates a new ProjectContext for a given ProjectID plus ApiKey with a specific Version- Parameters:
context
- Application contextpluginId
- plugin IdprojectId
- project Id to be setapiKey
- API key to be setassetVersion
- asset version to be set
-
ProjectContext
public ProjectContext(@NonNull android.content.Context context, java.lang.String pluginId, java.lang.String projectId, java.lang.String apiKey, Version assetVersion, java.lang.String stage)
Creates a new ProjectContext for a given ProjectID plus ApiKey with a specific asset version on a specific Stage- Parameters:
context
- Application contextpluginId
- plugin idprojectId
- project Id to be setapiKey
- API key to be setassetVersion
- asset version to be setstage
- stage to be set
-
ProjectContext
public ProjectContext(@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
-
getProjectId
public java.lang.String getProjectId()
Gets the project Id- Returns:
- project Id
-
setProjectId
public void setProjectId(java.lang.String projectId)
Sets the project Id- Parameters:
projectId
- project Id to be set
-
getApiKey
public java.lang.String getApiKey()
Gets the API key that is used to authenticate- Returns:
- api key
-
setApiKey
public void setApiKey(java.lang.String apiKey)
Sets the API key that is used to authenticate- Parameters:
apiKey
- api key to be set
-
-