Releases: KayLerch/alexa-skills-kit-states-java
Releases · KayLerch/alexa-skills-kit-states-java
Bugfixes and minor extensions
The previous version of States SDK had a bug for writing models
- Bugfixes
- new readModels-method for all handlers. this provides an option to read multiple models of one type at once by giving it a collection of ids.
- split read/write-batches in DynamoDB handler in order to comply with AWS batch size limits. If you wrote more than 25 or read more than 100 items at once there was an exception before. Now the handler puts and pulls Dynamo items in chunks of 25 / 100 requests per call.
- writeModels was not usable as the input collection required AlexaStateModel-objects. Now it is corrected to support objects that extend AlexaStateModel.
- set custom userId used by a handler to store user-scoped state (withUserId(String)). If not set, handlers fall back to the userId coming in with the Alexa session-object (previous default behavior). This is useful if you're working with account linking. You should always avoid using Alexa session-userId as it changes once a user re-enables the skill.
Major enhancements with batch processing
This SDK made a huge step forward and now ships with:
- Read, write, remove not only POJO models but also single key-values
- AlexaStateObject wraps single key-values read from and written to data stores
- Write multiple POJO models or single key-values to the handler to leverage batch processing capabilities of Alexa Session, DynamoDB and AWSIoT
- Read multiple single values from the handler to leverage batch processing capabilities of Alexa Session, DynamoDB and AWSIoT
- Remove multiple single values or POJO models to leverage batch processing capabilities of Alexa Session, DynamoDB, S3 and AWSIoT
- Handlers got exists methods to check presence of single values or POJO models in a store
- Improved unit tests
- Integration tests
Private member support
In the last release it was necessary to have an AlexaStateSave field be public or equipped with public getter and setter. Now reflection can access even private fields.
First release
This release contains the following:
- Annotation bundle to tag fields of POJO models to be state-save throughout different scopes in your Alexa skill
- Base class for POJO models to be compatible with the state handlers
- AlexaSessionStateHandler to persist state of state-save fields from POJO models in the JSON of an Alexa session
- AWSS3StateHandler to persist state of state-save fields from POJO models in an AWS S3 bucket
- AWSDynamoStateHandler to persist state of state-save fields from POJO models in a AWS DynamoDB table
- AWSIotStateHandler to persist state of state-save fields from POJO models in a thing shadow of AWS IoT