public abstract class AssetOperatorAbs extends Object
The abstract methods can be used to securely store, delete, update, and query key asset data, such as usernames and passwords.
Before calling the methods of this class, you must call the AssetOperator.getInstance() method to obtain
an AssetOperatorAbs instance.
SystemCapability.Security#ASSET| 构造器 | 说明 |
|---|---|
AssetOperatorAbs() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
abstract AssetResult |
assetDelete(Ability ability,
IntentParams intentParams) |
已过时。
Use
assetDelete(IntentParams intentParams) instead. |
abstract AssetResult |
assetDelete(IntentParams intentParams) |
Deletes a piece of asset data from the system database.
|
abstract AssetResult |
assetInsert(Ability ability,
IntentParams intentParams) |
已过时。
Use
assetInsert(IntentParams intentParams) instead. |
abstract AssetResult |
assetInsert(IntentParams intentParams) |
Encrypts and inserts a piece of asset data in the system database.
|
abstract AssetResult |
assetSelect(Ability ability,
IntentParams intentParams) |
已过时。
Use
assetSelect(IntentParams intentParams) instead. |
abstract AssetResult |
assetSelect(IntentParams intentParams) |
Performs an exact or batch query of asset data.
|
abstract AssetResult |
assetUpdate(Ability ability,
IntentParams intentParams) |
已过时。
Use
assetUpdate(IntentParams intentParams) instead. |
abstract AssetResult |
assetUpdate(IntentParams intentParams) |
Updates a piece of asset data in the system database.
|
@Deprecated public abstract AssetResult assetInsert(Ability ability, IntentParams intentParams)
assetInsert(IntentParams intentParams) instead.ability - Indicates the Ability object used to obtain the application context.intentParams - Indicates the IntentParams object, which consists of a key-value pair. To define
a method for performing a specific operation, invoke IntentParams.setParam to set the key and value.
The key parameters include AssetOperator#INTENT_PARAMS_KEY_APPTAG,
AssetOperator#INTENT_PARAMS_KEY_BATCHASSET, AssetOperator#INTENT_PARAMS_KEY_AEADASSET,
AssetOperator#INTENT_PARAMS_KEY_EXTINFO, and AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, including AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult.resultInfo can be either of the following:
resultInfo.get(0) method
@Deprecated public abstract AssetResult assetDelete(Ability ability, IntentParams intentParams)
assetDelete(IntentParams intentParams) instead.ability - Indicates the Ability object used to obtain the application context.intentParams - Indicates the IntentParams object. The parameters include
AssetOperator#INTENT_PARAMS_KEY_ASSETHANDLE, AssetOperator#INTENT_PARAMS_KEY_APPTAG, and
AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, including AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult.resultInfo is null, regardless of whether the operation succeeds.@Deprecated public abstract AssetResult assetUpdate(Ability ability, IntentParams intentParams)
assetUpdate(IntentParams intentParams) instead.ability - Indicates the Ability object used to obtain the application context.intentParams - Indicates the IntentParams object. The parameters include
AssetOperator#INTENT_PARAMS_KEY_ASSETHANDLE, AssetOperator#INTENT_PARAMS_KEY_APPTAG,
AssetOperator#INTENT_PARAMS_KEY_BATCHASSET, AssetOperator#INTENT_PARAMS_KEY_AEADASSET,
AssetOperator#INTENT_PARAMS_KEY_EXTINFO, and AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, including AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult.resultInfo can be either of the following:
resultInfo.get(0) method
@Deprecated public abstract AssetResult assetSelect(Ability ability, IntentParams intentParams)
assetSelect(IntentParams intentParams) instead.ability - Indicates the Ability object used to obtain the application context.intentParams - Indicates the IntentParams object. The parameters include
AssetOperator#INTENT_PARAMS_KEY_ASSETHANDLE, AssetOperator#INTENT_PARAMS_KEY_APPTAG,
AssetOperator#INTENT_PARAMS_KEY_BATCHASSET, AssetOperator#INTENT_PARAMS_KEY_AEADASSET,
AssetOperator#INTENT_PARAMS_KEY_EXTINFO, and AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, including AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult.resultInfo can be either of the following:
public abstract AssetResult assetInsert(IntentParams intentParams)
intentParams - Indicates the IntentParams object, which stores parameters in key-value pairs.
To set parameters for this object, you can call IntentParams.setParam. Available keys for the
parameters include AssetOperator#INTENT_PARAMS_APPTAG,
AssetOperator#INTENT_PARAMS_KEY_BATCHASSET,
AssetOperator#INTENT_PARAMS_KEY_AEADASSET,
AssetOperator#INTENT_PARAMS_KEY_EXTINFO, and AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, which consists of AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult#resultInfo can be either of the following:
resultInfo.get(0)
method): indicates that the operation succeeds.public abstract AssetResult assetDelete(IntentParams intentParams)
intentParams - Indicates the IntentParams object, which stores parameters in key-value pairs.
Available keys for the parameters include AssetOperator#INTENT_PARAMS_KEY_ASSETHANDLE,
AssetOperator#INTENT_PARAMS_KEY_APPTAG, and AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, which consists of AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult#resultInfo is null, regardless of whether the operation succeeds.public abstract AssetResult assetUpdate(IntentParams intentParams)
intentParams - Indicates the IntentParams object, which stores parameters in key-value pairs.
Available keys for the parameters include AssetOperator#INTENT_PARAMS_KEY_ASSETHANDLE,
AssetOperator#INTENT_PARAMS_KEY_APPTAG, AssetOperator#INTENT_PARAMS_KEY_BATCHASSET,
AssetOperator#INTENT_PARAMS_KEY_AEADASSET, AssetOperator#INTENT_PARAMS_KEY_EXTINFO, and
AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, which consists of AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult#resultInfo can be either of the following:
resultInfo.get(0)
method): indicates that the operation succeeds.public abstract AssetResult assetSelect(IntentParams intentParams)
intentParams - Indicates the IntentParams object, which stores parameters in key-value pairs.
Available keys for the parameters include AssetOperator#INTENT_PARAMS_KEY_ASSETHANDLE,
AssetOperator#INTENT_PARAMS_KEY_APPTAG, AssetOperator#INTENT_PARAMS_KEY_BATCHASSET,
AssetOperator#INTENT_PARAMS_KEY_AEADASSET, AssetOperator#INTENT_PARAMS_KEY_EXTINFO, and
AssetOperator#INTENT_PARAMS_KEY_ASSETTYPE.AssetResult instance, which consists of AssetResult.resultCode and
AssetResult.resultInfo.
AssetResult.resultCode can be any of the following:
AssetOperator#SUCCESS
AssetOperator#ERROR_CODE_INVALID_ARGUMENT
AssetOperator#ERROR_CODE_PERMISSION_DENIED
AssetOperator#ERROR_CODE_UNINITIALIZED
AssetOperator#ERROR_CODE_DATABASE_ERROR
AssetOperator#ERROR_CODE_UNSECURED_ENVIRONMENT
AssetOperator#ERROR_CODE_SYSTEM_ERROR
AssetResult#resultInfo can be either of the following: