public final class NativeSingleAssetManager extends Object implements SingleAssetManager
Constructor and Description |
---|
NativeSingleAssetManager() |
Modifier and Type | Method and Description |
---|---|
void |
allowAccess(Collection<String> emails) |
void |
allowAccess(String... emails) |
boolean |
canManage() |
void |
changeName(String name) |
void |
createKind(String kind,
String name) |
void |
createKind(String kind,
String name,
String cookie) |
protected void |
finalize() |
String |
getCookie() |
MetaClientException |
getDecryptionError() |
MetaClientException |
getEncryptionError() |
List<Feature> |
getFeatures() |
String |
getHomeServer() |
Map<Integer,SecretKey> |
getKeys() |
String |
getKind() |
String |
getName() |
List<KnownUser> |
getParticipants() |
String |
getUrn() |
void |
revokeAccess(Collection<String> emails) |
void |
revokeAccess(String... emails) |
void |
setAssetFeature(String name,
String compatibility)
Applies an asset feature with the given parameters to this asset.
|
void |
setAssetFeature(String name,
String compatibility,
String value)
Applies an asset feature with the given parameters to this asset.
|
void |
setAssetFeature(String name,
String compatibility,
String value,
String scope)
Applies an asset feature with the given parameters to this asset.
|
@Nonnull public String getCookie()
getCookie
in interface SingleAssetManager
public void createKind(String kind, String name) throws MetaClientException
createKind
in interface SingleAssetManager
MetaClientException
public void createKind(String kind, String name, @Nullable String cookie) throws MetaClientException
createKind
in interface SingleAssetManager
MetaClientException
public void allowAccess(String... emails)
allowAccess
in interface SingleAssetManager
public void revokeAccess(String... emails)
revokeAccess
in interface SingleAssetManager
public void allowAccess(Collection<String> emails)
allowAccess
in interface SingleAssetManager
public void revokeAccess(Collection<String> emails)
revokeAccess
in interface SingleAssetManager
public void setAssetFeature(String name, String compatibility) throws MetaClientException
SingleAssetManager
setAssetFeature
in interface SingleAssetManager
compatibility
- One of SmartcryptProtocol::AssetFeature::COMPATIBILITY_MANDATORY,
SmartcryptProtocol::AssetFeature::COMPATIBILITY_READ_ONLY,
SmartcryptProtocol::AssetFeature::COMPATIBILITY_SUGGESTED,
and SmartcryptProtocol::AssetFeature::COMPATIBILITY_OPTIONALMetaClientException
public void setAssetFeature(String name, String compatibility, @Nullable String value) throws MetaClientException
SingleAssetManager
setAssetFeature
in interface SingleAssetManager
compatibility
- One of SmartcryptProtocol::AssetFeature::COMPATIBILITY_MANDATORY,
SmartcryptProtocol::AssetFeature::COMPATIBILITY_READ_ONLY,
SmartcryptProtocol::AssetFeature::COMPATIBILITY_SUGGESTED,
and SmartcryptProtocol::AssetFeature::COMPATIBILITY_OPTIONALMetaClientException
public void setAssetFeature(String name, String compatibility, @Nullable String value, @Nullable String scope) throws MetaClientException
SingleAssetManager
setAssetFeature
in interface SingleAssetManager
compatibility
- One of SmartcryptProtocol::AssetFeature::COMPATIBILITY_MANDATORY,
SmartcryptProtocol::AssetFeature::COMPATIBILITY_READ_ONLY,
SmartcryptProtocol::AssetFeature::COMPATIBILITY_SUGGESTED,
and SmartcryptProtocol::AssetFeature::COMPATIBILITY_OPTIONALMetaClientException
public void changeName(@Nullable String name) throws MetaClientException
changeName
in interface SingleAssetManager
MetaClientException
@Nonnull public String getName()
getName
in interface ManagedAesKey
@Nonnull public String getUrn()
getUrn
in interface ManagedAesKey
@Nonnull public String getKind()
getKind
in interface ManagedAesKey
@Nullable public String getHomeServer()
getHomeServer
in interface ManagedAesKey
public boolean canManage()
canManage
in interface ManagedAesKey
true
, this user is allowed to modify this asset. If false
, attempts at modification will result in errors.@Nullable public MetaClientException getEncryptionError()
getEncryptionError
in interface ManagedAesKey
null
, this user is allowed to use the asset for encryption, otherwise, encryption attempts
must produce this exception@Nullable public MetaClientException getDecryptionError()
getDecryptionError
in interface ManagedAesKey
null
, this user is allowed to use the asset for decryption, otherwise, decryption attempts
must produce this exception@Nonnull public Map<Integer,SecretKey> getKeys()
getKeys
in interface ManagedAesKey
@Nonnull public List<KnownUser> getParticipants()
getParticipants
in interface ManagedAesKey
@Nonnull public List<Feature> getFeatures()
getFeatures
in interface ManagedAesKey