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

Use Xoom Designer to regenerate the project #13

Draft
wants to merge 100 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
90d9174
Generate xoom-auth with xoom-designer
jakzal Sep 23, 2021
24b715c
Fix problems with aggregate definitions
jakzal Sep 23, 2021
35d36af
Disable code that did not compile
jakzal Sep 23, 2021
7078320
Regenerate the project with latest snapshot of Designer
jakzal Sep 23, 2021
8d34d38
Regenerate the project with latest snapshot of Designer
jakzal Sep 23, 2021
c5ba6cc
Move resource tests to the infrastructure package
jakzal Sep 24, 2021
c1dfc73
Compile TenantResourceTest
jakzal Sep 23, 2021
bbc5b9d
Remove the exchange package
jakzal Sep 23, 2021
7dc8d44
Use the latest xoom SNAPSHOT and bump rest-assured
jakzal Sep 23, 2021
b609549
Make route paths for queries unique
jakzal Sep 23, 2021
cc4b0cb
Pass TenantResourceTest.testThatTenantSubscribes
jakzal Sep 23, 2021
1a7dad3
Pass TenantResourceTest.testThatTenantDeactivatesAndActivates
jakzal Sep 23, 2021
7fadaad
Pass TenantResourceTest.testThatTenantChangesDescription
jakzal Sep 23, 2021
f669b0d
Pass TenantResourceTest.testThatTenantChangesName
jakzal Sep 23, 2021
12bfae5
Cleanup global state after each test
jakzal Sep 23, 2021
5c3b6b3
Fix the order of tenant name and description arguments to make most o…
jakzal Sep 23, 2021
d386025
Remove redundant state changes
jakzal Sep 23, 2021
3377b47
Pass user credentials to user registration entities, state, and events
jakzal Sep 23, 2021
0d6ec76
Compile GroupResourceTest
jakzal Sep 24, 2021
7f7f1c4
Compile PermissionResourceTest
jakzal Sep 24, 2021
1ddbfde
Compile RoleResourceTest
jakzal Sep 24, 2021
abf9e1d
Compile UserResourceTest
jakzal Sep 24, 2021
04ecd4c
Remove the unused TestResponseChannelConsumer
jakzal Sep 24, 2021
21fb70d
Use JUnit 5 for resource tests
jakzal Sep 24, 2021
782304a
Allow for both JUnit 4 and 5
jakzal Sep 24, 2021
75caea8
Convert the payload for group description update to json
jakzal Sep 28, 2021
5917077
Disable tests that are not passing yet in order to work on them one b…
jakzal Sep 28, 2021
e748b1a
Update the jna dependency to make Argon2 tests pass again
jakzal Sep 28, 2021
4e62779
Fix the path and payload for the assign group endpoint
jakzal Sep 28, 2021
235909f
Fix the payload for the change permission description endpoint
jakzal Sep 28, 2021
ac22ac0
Fix the payload for the change role description endpoint
jakzal Sep 28, 2021
138bd72
Re-generate the project resources with no autodispatch
jakzal Sep 30, 2021
841413c
Introduce GroupId to enable queries by tenant id and group name
jakzal Oct 7, 2021
1fa7309
Enable the group query endpoint
jakzal Oct 11, 2021
4b97f05
Introduce PermissionId to enable queries by tenant id and permission …
jakzal Oct 11, 2021
2222436
Enable the first of permission resource tests
jakzal Oct 11, 2021
32a0f4a
Add missing arguments in RoleResource methods
jakzal Oct 11, 2021
e029e56
Query groups by GroupId
jakzal Oct 11, 2021
6d3d1db
Query permissions by PermissionId
jakzal Oct 11, 2021
81d3998
Fix group and role resource routing definitions
jakzal Oct 12, 2021
ac00d37
Introduce ComplexAddress
jakzal Oct 12, 2021
10e5e63
Introduce RoleId to enable queries by tenant id and role name
jakzal Oct 12, 2021
bf03a35
Enable the first of role resource tests
jakzal Oct 12, 2021
3a29b5f
Enable the role resource query test
jakzal Oct 12, 2021
667f873
Update payloads for some of role endpoints
jakzal Oct 12, 2021
6a02ccc
Improve test examples
jakzal Oct 12, 2021
847e82c
Introduce UserId to enable queries by tenant id and username
jakzal Oct 12, 2021
3bca9d1
Introduce TenantId
jakzal Oct 13, 2021
2704e15
Pass UserResource.testThatUserManagesCredentials and UserResource.tes…
jakzal Oct 13, 2021
6a43f61
Generate correct location headers
jakzal Oct 13, 2021
1e4a248
Pass TenantResourceTest.testThatTenantRegistersUsers
jakzal Oct 13, 2021
74bf413
Initialise AccessSafely before the entity is created to prevent race …
jakzal Oct 13, 2021
fa4dd89
Extract assertEventDispatched
jakzal Oct 13, 2021
f2be423
Simplify assertions
jakzal Oct 13, 2021
1481ac7
Pass PermissionResourceTest.testThatPermissionEnforcesConstraint
jakzal Oct 13, 2021
701de99
Introduce Constrant Type enum
jakzal Oct 14, 2021
e62004e
Pass PermissionResourcetest.testThatPermissionEnforcesReplacementCons…
jakzal Oct 14, 2021
4d0b83c
Pass PermissionResourcetest.testThatPermissionForgetsConstraint
jakzal Oct 14, 2021
214ba60
Pass PermissionResourcetest.testThatPermissionQueryFindsMultiple
jakzal Oct 14, 2021
304b96a
Complete GroupEntity
jakzal Oct 20, 2021
bd135bb
Complete PermissionEntity
jakzal Oct 20, 2021
06face0
Merge branch 'master' into rewrite/event-sourced
jakzal Oct 20, 2021
127443e
Avoid await() in RoleEntityTest
jakzal Oct 20, 2021
67557c6
Avoid await() in TenantEntityTest
jakzal Oct 20, 2021
8373c86
Avoid await() in UserEntityTest
jakzal Oct 20, 2021
8df0f1c
Improve test readability
jakzal Oct 20, 2021
8e9a36c
Complete UserEntity
jakzal Oct 20, 2021
d3556f5
Complete TenantEntity
jakzal Oct 20, 2021
b229efd
Pass UserResourceTest.testThatUserQueries
jakzal Oct 21, 2021
0285c44
Terminate the world after each entity test
jakzal Oct 21, 2021
5318ace
Avoid await() in query tests
jakzal Oct 21, 2021
52ade7e
Prevent race conditions in the user projection
jakzal Oct 21, 2021
de8d06e
Increase the await() timeout to 3 seconds
jakzal Oct 21, 2021
f3bde26
Complete the group projection
jakzal Oct 22, 2021
33091e0
Complete the permission projection
jakzal Oct 22, 2021
d7732bf
Complete the tenant projection
jakzal Oct 22, 2021
51aa1ca
Complete the user projection
jakzal Oct 22, 2021
0e61084
Fix types for role commands and disable false positive tests until th…
jakzal Oct 22, 2021
eeeb99c
Remove generated tests that are not covering any real behaviour
jakzal Oct 22, 2021
31a20c0
Merge branch 'master' into rewrite/event-sourced
jakzal Nov 3, 2021
7a32e81
Decouple Group post data from thew view
jakzal Nov 4, 2021
06cb20a
Decouple Role post data from thew view
jakzal Nov 9, 2021
dfa6a02
Persist Role relations in RoleView
jakzal Nov 9, 2021
2c3786c
Update the role assign group path to match the old path
jakzal Nov 9, 2021
c048afd
Decouple Permission post data from the view
jakzal Nov 9, 2021
18215d9
Pass RoleResourceTest testThatRolePermissionAttaches, testThatRolePer…
jakzal Nov 9, 2021
e8926e2
Match the RoleResource.assignGroup response with the expected one
jakzal Nov 10, 2021
265afbc
Pass RoleResourceTest testThatRoleGroupIsAssigned, testThatRoleGroupI…
jakzal Nov 10, 2021
f29131d
Store references to group relations instead of only identifiers
jakzal Nov 10, 2021
b3f748b
Store references to user relations instead of only identifiers
jakzal Nov 10, 2021
49dbddc
Decouple User post data from the view
jakzal Nov 10, 2021
54e02ba
Pass RoleResourceTest testThatRoleUserIsAssigned testThatRoleUserIsUn…
jakzal Nov 10, 2021
4053938
Pass UserResourceTest.testThatUserIsInRole
jakzal Nov 10, 2021
2ca3f80
Add the missing endpoint for user permissions
jakzal Nov 10, 2021
63c80a1
Start the test world in projection tests
jakzal Nov 16, 2021
c358662
Clear the component registry after projection tests
jakzal Nov 23, 2021
9412c8f
Use the store dispatcher to dispatch events instead of calling projec…
jakzal Nov 23, 2021
d1a3889
Dispatch complete set of events to limit logged errors
jakzal Nov 23, 2021
e629d6b
Remove dead code
jakzal Nov 23, 2021
5fc3cd9
Dispatch complete set of events to limit logged errors
jakzal Nov 24, 2021
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
117 changes: 117 additions & 0 deletions .mvn/wrapper/MavenWrapperDownloader.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Copyright 2007-present the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific dialect governing permissions and
* limitations under the License.
*/
import java.net.*;
import java.io.*;
import java.nio.channels.*;
import java.util.Properties;

public class MavenWrapperDownloader {

private static final String WRAPPER_VERSION = "0.5.6";
/**
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
*/
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";

/**
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
* use instead of the default one.
*/
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
".mvn/wrapper/maven-wrapper.properties";

/**
* Path where the maven-wrapper.jar will be saved to.
*/
private static final String MAVEN_WRAPPER_JAR_PATH =
".mvn/wrapper/maven-wrapper.jar";

/**
* Name of the property which should be used to override the default download url for the wrapper.
*/
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";

public static void main(String args[]) {
System.out.println("- Downloader started");
File baseDirectory = new File(args[0]);
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());

// If the maven-wrapper.properties exists, read it and check if it contains a custom
// wrapperUrl parameter.
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
String url = DEFAULT_DOWNLOAD_URL;
if(mavenWrapperPropertyFile.exists()) {
FileInputStream mavenWrapperPropertyFileInputStream = null;
try {
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
Properties mavenWrapperProperties = new Properties();
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
} catch (IOException e) {
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
} finally {
try {
if(mavenWrapperPropertyFileInputStream != null) {
mavenWrapperPropertyFileInputStream.close();
}
} catch (IOException e) {
// Ignore ...
}
}
}
System.out.println("- Downloading from: " + url);

File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
if(!outputFile.getParentFile().exists()) {
if(!outputFile.getParentFile().mkdirs()) {
System.out.println(
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
}
}
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
try {
downloadFileFromURL(url, outputFile);
System.out.println("Done");
System.exit(0);
} catch (Throwable e) {
System.out.println("- Error downloading");
e.printStackTrace();
System.exit(1);
}
}

private static void downloadFileFromURL(String urlString, File destination) throws Exception {
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
String username = System.getenv("MVNW_USERNAME");
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
}
});
}
URL website = new URL(urlString);
ReadableByteChannel rbc;
rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream(destination);
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
fos.close();
rbc.close();
}

}
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
Loading