Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.8.2 #28

Merged
merged 7 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ The following are AWS CloudFormation scripts that can be used to install FormKiQ

| AWS Region | Install Link |
| ------------- | -------------|
| us-east-1 | [Install FormKiQ Core in US-EAST-1 region](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-us-east-1.s3.amazonaws.com/1.8.0/template.yaml)
| us-east-2 | [Install FormKiQ Core in US-EAST-2 region](https://console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-us-east-2.s3.amazonaws.com/1.8.0/template.yaml)
| ca-central-1| [Install FormKiQ Core in CA-CENTRAL-1 region](https://console.aws.amazon.com/cloudformation/home?region=ca-central-1#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-ca-central-1.s3.amazonaws.com/1.8.0/template.yaml)
| eu-central-1| [Install FormKiQ Core in EU-CENTRAL-1 region](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-eu-central-1.s3.amazonaws.com/1.8.0/template.yaml)
| us-east-1 | [Install FormKiQ Core in US-EAST-1 region](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-us-east-1.s3.amazonaws.com/1.8.2/template.yaml)
| us-east-2 | [Install FormKiQ Core in US-EAST-2 region](https://console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-us-east-2.s3.amazonaws.com/1.8.2/template.yaml)
| ca-central-1| [Install FormKiQ Core in CA-CENTRAL-1 region](https://console.aws.amazon.com/cloudformation/home?region=ca-central-1#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-ca-central-1.s3.amazonaws.com/1.8.2/template.yaml)
| eu-central-1| [Install FormKiQ Core in EU-CENTRAL-1 region](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/new?stackName=formkiq-core-prod&templateURL=https://formkiq-core-distribution-eu-central-1.s3.amazonaws.com/1.8.2/template.yaml)

## Architecture

Expand Down
4 changes: 2 additions & 2 deletions actions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies {
testImplementation project(':dynamodb-documents')
testImplementation project(':fkq-test-utils')
testImplementation project(':fkq-plugins')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.8.2'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.17.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.9.0'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.17.3'
}

test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ public enum ActionStatus {
/** FAILED. */
FAILED,
/** Pending. */
PENDING;
PENDING,
/** Skipped. */
SKIPPED;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/**
* MIT License
*
* Copyright (c) 2018 - 2020 FormKiQ
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.formkiq.module.actions.services;

import com.formkiq.aws.sns.SnsConnectionBuilder;
import com.formkiq.module.lambdaservices.AwsServiceCache;
import com.formkiq.module.lambdaservices.AwsServiceExtension;

/**
*
* {@link AwsServiceExtension} for {@link ActionsNotificationService}.
*
*/
public class ActionsNotificationServiceExtension
implements AwsServiceExtension<ActionsNotificationService> {

/** {@link ActionsNotificationService}. */
private ActionsNotificationService service;
/** {@link SnsConnectionBuilder}. */
private SnsConnectionBuilder sns;

/**
* constructor.
*
* @param snsBuilder {@link SnsConnectionBuilder}
*/
public ActionsNotificationServiceExtension(final SnsConnectionBuilder snsBuilder) {
this.sns = snsBuilder;
}

@Override
public ActionsNotificationService loadService(final AwsServiceCache awsServiceCache) {

if (this.service == null) {

this.service = new ActionsNotificationServiceImpl(
awsServiceCache.environment("SNS_DOCUMENT_EVENT"), this.sns);
}

return this.service;
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* MIT License
*
* Copyright (c) 2018 - 2020 FormKiQ
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.formkiq.module.actions.services;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import com.formkiq.module.actions.Action;
import com.formkiq.module.actions.ActionStatus;

/**
*
* Unit Tests for {@link NextActionPredicate}.
*
*/
public class NextActionPredicateTest {

@Test
void test() {
assertTrue(new NextActionPredicate().test(new Action()));
assertTrue(new NextActionPredicate().test(new Action().status(ActionStatus.PENDING)));
assertFalse(new NextActionPredicate().test(new Action().status(ActionStatus.COMPLETE)));
assertFalse(new NextActionPredicate().test(new Action().status(ActionStatus.SKIPPED)));
assertTrue(new NextActionPredicate().test(new Action().status(ActionStatus.FAILED)));
}
}
6 changes: 3 additions & 3 deletions aws-cognito/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
description = "AWS Cognito"

dependencies {
api group: 'software.amazon.awssdk', name: 'cognitoidentity', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'cognitoidentityprovider', version: '2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'cognitoidentity', version: '2.17.252'
api group: 'software.amazon.awssdk', name: 'cognitoidentityprovider', version: '2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'

configurations.all {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
Expand Down
6 changes: 3 additions & 3 deletions aws-dynamodb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
description = "AWS DynamoDB"

dependencies {
api group: 'software.amazon.awssdk', name: 'dynamodb', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'dynamodb', version: '2.17.252'
implementation project(':fkq-lambda-services')
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.0.0'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.1.0'

testImplementation group: 'junit', name: 'junit', version:'4.+'

Expand Down
4 changes: 2 additions & 2 deletions aws-iam/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS IAM"

dependencies {
api group: 'software.amazon.awssdk', name: 'iam', version: '2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'iam', version: '2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'

configurations.all {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
Expand Down
4 changes: 2 additions & 2 deletions aws-lambda/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS Lambda"

dependencies {
api group: 'software.amazon.awssdk', name: 'lambda', version: '2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'lambda', version: '2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'

configurations.all {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
Expand Down
4 changes: 2 additions & 2 deletions aws-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS S3"

dependencies {
api group: 'software.amazon.awssdk', name: 's3', version: '2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 's3', version: '2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'
implementation project(':fkq-lambda-services')

configurations.all {
Expand Down
4 changes: 2 additions & 2 deletions aws-sns/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS SNS"

dependencies {
api 'software.amazon.awssdk:sns:2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api 'software.amazon.awssdk:sns:2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'

configurations.all {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
Expand Down
4 changes: 2 additions & 2 deletions aws-sqs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS SQS"

dependencies {
api 'software.amazon.awssdk:sqs:2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api 'software.amazon.awssdk:sqs:2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'
implementation project(':fkq-lambda-services')

configurations.all {
Expand Down
8 changes: 4 additions & 4 deletions aws-ssm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS SSM"

dependencies {
api group: 'software.amazon.awssdk', name: 'ssm', version: '2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'ssm', version: '2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'
implementation project(':fkq-lambda-services')

configurations.all {
Expand All @@ -13,8 +13,8 @@ dependencies {

testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'
testImplementation group: 'junit', name: 'junit', version:'4.+'
testImplementation group: 'org.testcontainers', name: 'localstack', version: '1.17.1'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.9.3'
testImplementation group: 'org.testcontainers', name: 'localstack', version: '1.17.3'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.12.281'
}

test {
Expand Down
4 changes: 2 additions & 2 deletions aws-sts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
description = "AWS STS"

dependencies {
api group: 'software.amazon.awssdk', name: 'sts', version: '2.17.207'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.207'
api group: 'software.amazon.awssdk', name: 'sts', version: '2.17.252'
implementation group: 'software.amazon.awssdk', name: 'url-connection-client', version: '2.17.252'
implementation group: 'commons-codec', name: 'commons-codec', version: '1.15'

testImplementation group: 'junit', name: 'junit', version:'4.+'
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
plugins {
id 'java-library'
id 'checkstyle'
id 'com.github.spotbugs' version '4.6.0'
id 'com.diffplug.spotless' version '6.4.2'
id 'com.github.spotbugs' version '4.7.1'
id 'com.diffplug.spotless' version '6.9.1'
id 'com.github.ben-manes.versions' version '0.42.0'
id 'com.formkiq.gradle.graalvm-native-plugin' version '1.2.1'
id 'de.undercouch.download' version '5.0.5'
id 'com.formkiq.gradle.graalvm-native-plugin' version '1.3.0'
id 'de.undercouch.download' version '5.1.1'
}

def moduleName = "formkiq-core"

repositories { mavenCentral() }

allprojects {
version = '1.8.0'
version = '1.8.2'
ext.awsCognitoVersion = '1.4.1'
group = 'com.formkiq.stacks'

Expand Down
16 changes: 8 additions & 8 deletions console/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ dependencies {

implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'
implementation group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.2.1'
implementation group: 'org.json', name: 'json', version: '20210307'
implementation group: 'org.json', name: 'json', version: '20220320'

testImplementation project(':aws-cognito')
testImplementation project(':fkq-test-utils')
testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.9.1'
testImplementation group: 'junit', name: 'junit', version:'4.+'
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.8.2'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version:'5.8.2'
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.17.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.9.0'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version:'5.9.0'
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.17.3'

testImplementation group: 'org.testcontainers', name: 'localstack', version: '1.17.1'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.9.3'
testImplementation group: 'com.microsoft.playwright', name: 'playwright', version: '1.22.0'
testImplementation group: 'org.testcontainers', name: 'localstack', version: '1.17.3'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.12.281'
testImplementation group: 'com.microsoft.playwright', name: 'playwright', version: '1.24.1'
}

task buildZip(type: Zip) {
Expand Down
6 changes: 3 additions & 3 deletions document-events/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ description = "FormKiQ Document Events"
dependencies {
implementation project(':aws-sns')

implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.0.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.1.0'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.1'

testImplementation project(':fkq-test-utils')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.8.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.9.0'
}

test {
Expand Down
12 changes: 6 additions & 6 deletions dynamodb-documents/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies {
implementation project(':aws-dynamodb')
implementation project(':fkq-plugins')
implementation project(':fkq-lambda-services')
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.0.0'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.1.0'

testImplementation project(':aws-ssm')
testImplementation project(':fkq-test-utils')
Expand All @@ -15,11 +15,11 @@ dependencies {
testImplementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.8.2'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version:'5.8.2'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.17.1'
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.17.1'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.9.3'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.9.0'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version:'5.9.0'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.17.3'
testImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.17.3'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.12.281'

configurations.all {
exclude group: 'software.amazon.awssdk', module: 'apache-client'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,8 @@ public void saveDocument(final String siteId, final DocumentItem document,
* @param document {@link DocumentItem}
*/
private void saveDocumentDate(final DocumentItem document) {
Date insertedDate = document.getInsertedDate();
Date insertedDate =
document.getInsertedDate() != null ? document.getInsertedDate() : new Date();
String shortdate = this.yyyymmddFormat.format(insertedDate);

Map<String, AttributeValue> values =
Expand Down
12 changes: 6 additions & 6 deletions fkq-lambda-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ dependencies {
implementation project(':fkq-lambda-services')

implementation group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.2.1'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.0.0'
implementation group: 'software.amazon.awssdk', name: 'utils', version: '2.17.186'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.1'
implementation group: 'com.formkiq', name: 'graalvm-annotations', version: '1.1.0'
implementation group: 'software.amazon.awssdk', name: 'utils', version: '2.17.252'

testImplementation project(':fkq-test-utils')
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.8.2'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.17.1'
testImplementation group: 'org.testcontainers', name: 'localstack', version: '1.17.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version:'5.9.0'
testImplementation group: 'org.testcontainers', name: 'testcontainers', version: '1.17.3'
testImplementation group: 'org.testcontainers', name: 'localstack', version: '1.17.3'
}
Loading