public class CryptoContext extends Object
KeyResolver implementations.| Constructor and Description |
|---|
CryptoContext(int tenantId,
String tenantDomain,
String type,
String identifier,
String purpose,
Map<String,String> properties)
The constructor which accepts all the needed information to create a
CryptoContext |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(String propertyName,
String propertyValue)
Adds the given context property value against the given property name.
|
static CryptoContext |
buildEmptyContext(int tenantId,
String tenantDomain)
Creates and returns a
CryptoContext which has no attribute values other than the tenant information. |
String |
getIdentifier() |
String |
getProperty(String propertyName)
Returns the context property which has given property name.
|
String |
getPurpose() |
String |
getTenantDomain() |
int |
getTenantId() |
String |
getType() |
String |
toString() |
public CryptoContext(int tenantId,
String tenantDomain,
String type,
String identifier,
String purpose,
Map<String,String> properties)
CryptoContexttenantId - ID of the tenant which the crypto operations are going to be performed on.tenantDomain - Name of the tenant which the crypto operations are going to be performed on.type - A name which denotes the type of the context. e.g. SERVICE-PROVIDERidentifier - An identifier of the context if there is any. e.g. service provider idpurpose - The purpose of the crypto operations.properties - An arbitrary map of context properties.public static CryptoContext buildEmptyContext(int tenantId, String tenantDomain)
CryptoContext which has no attribute values other than the tenant information.
This is a convenience method to create a context with minimal information.
tenantId - tenantDomain - public int getTenantId()
public String getTenantDomain()
public String getType()
public String getIdentifier()
public String getPurpose()
public void addProperty(String propertyName, String propertyValue)
KeyResolverpropertyName - Name of the propertypropertyValue - Value of the propertypublic String getProperty(String propertyName)
propertyName - Property nameCopyright © 2018 WSO2. All rights reserved.