public interface PersistenceAdapter
AttributesManager to store skill attributes to a
persistence layer. The adapter encapsulates all initialization, get, and save logic specific to the persistence
implementation.| Modifier and Type | Method and Description |
|---|---|
Optional<Map<String,Object>> |
getAttributes(com.amazon.ask.model.RequestEnvelope envelope)
Retrieves attributes from persistence.
|
void |
saveAttributes(com.amazon.ask.model.RequestEnvelope envelope,
Map<String,Object> attributes)
Saves attributes to persistence.
|
Optional<Map<String,Object>> getAttributes(com.amazon.ask.model.RequestEnvelope envelope) throws PersistenceException
RequestEnvelope is passed to the adapter so current request
parameters can be used as an attribute key.envelope - the current request envelopeOptional containing existing attributes if they exist, or empty if notPersistenceException - if attributes could not be retrieved due to an errorvoid saveAttributes(com.amazon.ask.model.RequestEnvelope envelope, Map<String,Object> attributes) throws PersistenceException
RequestEnvelope is passed to the adapter so current request parameters
can be used as an attribute key.envelope - the current request envelopeattributes - attributes to persistPersistenceException - if attributes could not be saved due to an errorCopyright © Amazon.com, Inc. or its affiliates. All Rights Reserved.