Skip to content

Commit

Permalink
Merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Schubanz authored and Mathias Schubanz committed Sep 16, 2021
2 parents 9c85a11 + 0d01d99 commit c125e60
Show file tree
Hide file tree
Showing 234 changed files with 103 additions and 97 deletions.
10 changes: 8 additions & 2 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,32 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,37 @@ private GitUserSettings getGitUserSettings(User user, GitConfiguration newConfig
* @throws IOException
* @throws GitException
*/
public List<File> cloneSynchronize(User user, GitConfiguration newConfig, Version version) throws IOException, GitException {
public List<File> cloneSynchronize(User user, GitConfiguration newConfig, Version version)
throws IOException, GitException {
GitOperations git = new GitOperations(newConfig);
FileSystemOperations fileSystem = new FileSystemOperations(version);
EntityOperations entities = new EntityOperations(version, user);
try {
fileSystem.createBackup();
}
catch (IOException e) {
} catch (IOException e) {
fileSystem.removeBackup();
throw e;
}
try {
fileSystem.deleteRemoteFiles();
git.clone(version.getRemoteDirectory().toFile().getAbsoluteFile(), getGitUserSettings(user, newConfig, version));
git.clone(version.getRemoteDirectory().toFile().getAbsoluteFile(),
getGitUserSettings(user, newConfig, version));
fileSystem.createNewFilesLink(newConfig);
List<File> modifiedFiles = entities.createOrUpdateFileEntities(Arrays.asList(version.getSrcFilesDirectory().toFile().listFiles()));
List<File> modifiedFiles = entities
.createOrUpdateFileEntities(Arrays.asList(version.getSrcFilesDirectory().toFile().listFiles()));
fileSystem.mergeExistingFiles(modifiedFiles);
fileSystem.removeBackup();
version.setGitConfiguration(newConfig);
fileRepository.saveAll(modifiedFiles);
version = versionRepository.save(version);
return modifiedFiles;
}
catch (IOException e) {
} catch (IOException e) {
fileSystem.restoreBackup();
version.setGitConfiguration(null);
version = versionRepository.save(version);
fileSystem.deleteRemoteFiles();
throw e;
}
finally {
} finally {
fileSystem.removeBackup();
}
}
Expand All @@ -89,13 +89,13 @@ public List<File> cloneSynchronize(User user, GitConfiguration newConfig, Versio
* @return List of modified and not deleted files
* @throws GitException
*/
public List<File> pullSynchronize(User user, Version version) {
public List<File> pullSynchronize(User user, Version version) {
GitConfiguration newConfig = version.getGitConfiguration();
if (newConfig == null)
return new LinkedList<>();
GitOperations git = new GitOperations(newConfig);
EntityOperations entities = new EntityOperations(version, user);
//contains changed, created and deleted files
// contains changed, created and deleted files
String[] changedFiles = git.pull(version.getRemoteDirectory().toFile().getAbsoluteFile());

List<java.io.File> notDeleted = getStorageFiles(changedFiles, version);
Expand All @@ -110,9 +110,12 @@ public List<File> pullSynchronize(User user, Version version) {
return modifiedFiles;
}

public void commitPullAndPushChanges(File[] files, String commitMessage, User user, Version version) throws GitException, IOException {
// if (version.getFiles().stream().filter(file -> file.getStatus() == FileStatus.IN_CONFLICT).count() > 0)
// throw new GitException("Before you can commit your changes, you have to resolve the merge conflict");
public void commitPullAndPushChanges(File[] files, String commitMessage, User user, Version version)
throws GitException, IOException {
// if (version.getFiles().stream().filter(file -> file.getStatus() ==
// FileStatus.IN_CONFLICT).count() > 0)
// throw new GitException("Before you can commit your changes, you have to
// resolve the merge conflict");
GitConfiguration newConfig = version.getGitConfiguration();
EntityOperations entities = new EntityOperations(version, user);
if (newConfig == null)
Expand Down Expand Up @@ -142,7 +145,7 @@ public void commitPullAndPushChanges(File[] files, String commitMessage, User us

private List<java.io.File> getStorageFiles(String[] relFilePaths, Version version) {
List<java.io.File> result = new LinkedList<>();
for(String fileName : relFilePaths) {
for (String fileName : relFilePaths) {
java.io.File file = version.getRemoteDirectory().resolve(fileName).toFile();
if (file.exists())
result.add(file);
Expand Down Expand Up @@ -171,28 +174,28 @@ private java.io.File createMarkdownIndex(Version version, GitConfiguration gitCo
Path indexPath = gitConfig.getPath(version);
java.io.File index = indexPath.resolve("index.md").toFile();
index.createNewFile();
FileWriter fileWriter = new FileWriter(index);
fileWriter.write("| file | raw | generated |\n");
fileWriter.write("| ------ | ------ | ------ |\n");
for (File file : version.getFiles()) {
fileWriter.write("| ");;
fileWriter.write(file.getName().replace("_", ""));
fileWriter.write(" | ");
fileWriter.write("[RAW-Link](");
fileWriter.write(indexPath.relativize(file.getPath().toFile().getCanonicalFile().toPath()).toString());
fileWriter.write(")");
fileWriter.write(" | ");
List<String> exports = new LinkedList<>();
for (java.io.File export : file.getExports()) {
String uri = indexPath.relativize(export.getCanonicalFile().toPath()).toString();
String link = getFileExtension(export.getName()).toUpperCase() + "-Link";
exports.add("["+link+"]("+uri+")");
try (FileWriter fileWriter = new FileWriter(index)) {
fileWriter.write("| file | raw | generated |\n");
fileWriter.write("| ------ | ------ | ------ |\n");
for (File file : version.getFiles()) {
fileWriter.write("| ");
fileWriter.write(file.getName().replace("_", ""));
fileWriter.write(" | ");
fileWriter.write("[RAW-Link](");
fileWriter.write(indexPath.relativize(file.getPath().toFile().getCanonicalFile().toPath()).toString());
fileWriter.write(")");
fileWriter.write(" | ");
List<String> exports = new LinkedList<>();
for (java.io.File export : file.getExports()) {
String uri = indexPath.relativize(export.getCanonicalFile().toPath()).toString();
String link = getFileExtension(export.getName()).toUpperCase() + "-Link";
exports.add("[" + link + "](" + uri + ")");
}
fileWriter.write(String.join(" &nbsp; ", exports));
fileWriter.write(" |\n");
}
fileWriter.write(String.join(" &nbsp; ", exports));
fileWriter.write(" |\n");
fileWriter.flush();
}
fileWriter.flush();
fileWriter.close();
return index;
}

Expand Down
12 changes: 0 additions & 12 deletions dedoc-editor/build_and_run_theia.sh

This file was deleted.

1 change: 1 addition & 0 deletions documentation/modelling/UMLModelling.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile modified="2019-09-03T13:25:14.870Z" host="www.draw.io" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36" etag="SOYs3MYIFHv9XSpdQ4Xw" version="11.2.4" type="device" pages="1"><diagram id="AWrdzgOvBNWfOAp6jIh0" name="Page-1">7Vxbb+I4FP41eVmpKM4VHgudm9RKVenuzO7LyBADmUniKDGlzK9fO7ETYidASwKoCoOm+MSX5Fw/n2PQzEn4+iWB8eoBeyjQDN171cw7zTCAZRgae+veNqcM3VFOWCa+xzuVhKn/B3Gizqlr30NppSPBOCB+XCXOcRShOanQYJLgTbXbAgfVVWO4RAphOoeBSv3ue2TFn8LWS/pX5C9XYmWg8yshFJ05IV1BD292SOYnzZwkGJP8U/g6QQFjnuBLPu5zw9XixhIUkWMGLOynp6/fnx/Ql2foLsfmehM5N3yWFxis+QM/JvgXY2R+z2QrGJFu/DCAEW2NFzgiU35Fp+35yg+8e7jFa3YjKYHz36I1XuHE/0P7w4BeApRALyeEy9lw2Gx+EExwgBNKiHC2QDloyibjyyQopcMexQMDifQAXysd72FKxA3iIIBx6s+yW2YDQ5gs/WiMCcEh78Q5gRKCXhtZDArBUY1HOEQk2dIufIDLRc113bCcvL0pNQdYvM9qV2t0i2ss19ZlMXUpUPqBy/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T/w==</diagram></mxfile>
Binary file added documentation/modelling/UMLModelling.pdf
Binary file not shown.
Binary file added documentation/modelling/UseCase_DRM_Tool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions documentation/modelling/UseCase_DRM_Tool.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile modified="2019-01-04T12:45:55.029Z" host="www.draw.io" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/71.0.3578.80 Chrome/71.0.3578.80 Safari/537.36" etag="a3tKdfdhytN2rKWyC2ye" version="10.0.17" type="device"><diagram id="6seVsgDzblobJ6AC9a5I" name="Page-1">7V3bcts4Ev0aV808GIX75TF2kt2tSramkkzNMy1BEmcoQktSkT1fvw1eZBGkLNmmLtZYqZJFEARJ4HT36UYDuWK38/t/ZdFi9tWNbXJF8fj+in28opRwKuCPL3moSiimrCqZZvG4rvVY8D3+29aFuC5dxmObtyoWziVFvGgXjlya2lHRKouyzK3a1SYuad91EU1tp+D7KEq6pX/E42JWlWqBH8v/bePprLkzwfWZedRUrgvyWTR2q40i9umK3WbOFdWv+f2tTXzvNf1SXfd5y9n1g2U2Lfa5YPljtZj9l5jk9qb4or/Z20/y83Xdys8oWdYvXD9s8dD0QOaW6dj6RvAVu1nN4sJ+X0Qjf3YFgw5ls2KewBGBn3VzNivs/dbnJOu3B9xYN7dF9gBV6gt03V9rxFSHq8fel02V2UbPc1kXRvWIT9ctP3YK/Kj75Rl9RDt9NMpsVNgrKhO4+c1dBr+m/lc0GkFnFZ0uhJsAXu3u7pvESXLrEpeV17FxZPVkBOV5kbm/7MYZOdL2bjJMh5t2h4tuh/f1tzhUd7NOdydu6i9KC/dEl4cn3tggrBXemYwC74wCqHb7JOjf+AgwdV4jIPZWO4vM/elt3+FGYCL8v94RKD/+CpcWG+XVZ5iR4cHIEClOOzRyb+G49KERuD006sRC02j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nBGlBpGCSCoKD1XpSIakYWEYjNVvf8rlSIZlERhO/wIthpds+mE97YkoIyRTlXOJA8s5BJvp2ETxjmTixmt8tE2Iwe8AFa4NpKKEI7IF8oT3wyFdYAq9U2rPLLvS5UARLEC9iJD5De0A72K/WSMJ3XEUgdnDRHc7lkVZVjoXVY97HXDW9Y/IR4a9jqCIMfvc4kriHoh5sdbq4rC0paH/3n0uGr/QbEimsBSdaY24Ca8o4UoyC0uJciw7HPLAnKbqhpPU+Be2dxuoNCoosSvOJy+ZVWO6ty6YIBpn3JFmYY3qPortxxDuteAWtaEzVbi3yNNduNo1eZ5MOQimElkhLpQkYBQkEo80EmOIIS6mwEX5PG04CJrA/36AIG0ZBzRBDhWqzI8YwMkQxg70aUkY/l280s3ytVq8Dr+CAZKQbDPu9d9LD+r/deZL/+EmylS9dReX7lOQjni+SZjKvmNm5LypKvVA90Rz0mD/OLegfT3ewg2qgBjdnXN7nVLZH7dpQ5z2LO487qSLes9sG1buDuXOKBsnb66WKr1W+RiMOytcH3wjnwe6BPkVcSh/dl9J45fwy3QuOHPJJvVIb4rV8qOExYpxwwL9PcsPNxO8Z+XpNbHVDLj7a3O/vRfG3qFKjXuF93Ux/+OGcb/iXj9++1ke/dqQBlEfRFoMM2v07uisreHQu/EuWLyhursRHr51AOPIKr/6CqN5nrEyF2Lb9WA7aNE6nP0opuuZt1BM+jD6jwWL1JuSwuf9Y31whfT6PhMPH/z+jGuXH/4aEffo/</diagram></mxfile>
Binary file added documentation/modelling/er_modell.pdf
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ cd ..


# start the web front-end of Custom-MADE (react app)
cd dedoc-web
screen -dmS Custom-MADE-Web-UI bash -c "npm install && npm run start"
cd web-ui
screen -dmS Custom-MADE-Web-UI bash -c "npm i && npm run start"
cd ..


Expand All @@ -60,6 +60,6 @@ cd ..
#

# start monaco editor employed as LSP Client (language client)
cd dedoc-editor
cd editor
screen -dmS Custom-MADE-Editor bash -c "yarn && cd browser-app && yarn start"
cd ..
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const AddMemberForm = (props: FormComponentProps) => {
rules: [{required: true, message: 'Please select a role'}],
})(
<PermissionSelect
usersPermissions={usersPermissions}
usersPermissions={usersPermissions.getEntity()}
onSelect={p => props.form.setFieldsValue({permissions: p})}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const useEditableGitUserSettings = () => {
const newMembership = {...membership,
gitSettings: newSettings,
version: version.getEntity()};
version.memberships.put(newMembership).then(onSuccess).catch(onError);
version.memberships.put(newMembership.getEntity()).then(onSuccess).catch(onError);
};

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ export const EditableMembersPermission = () => {

if (canUserEdit()) {
return <PermissionSelect
usersPermissions={usersPermissions}
defaultValue={membership.permissions}
usersPermissions={usersPermissions.getEntity()}
defaultValue={membership.permissions.getEntity()}
onSelect={newPermissions => setPermissions(newPermissions,
() => message.success("Permissions are changed"),
error => message.error(error.message))}
/>;
}

const permission = permissionLevels.find(permission => Permissions.equals(permission.p, membership.permissions));
const permission = permissionLevels.find(permission => permission.p.equals( membership.permissions.getEntity()));
if (permission)
return <span>{permission.name}</span>;
return <span/>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export const LeaveProjectButton = () => {

const {canLeaveProject, leaveProject} = useLeaveProject();

return <Popconfirm
title={"Are you sure to leave this project?"}
okText="Yes" cancelText="No"
onConfirm={leaveProject}>
<p/>
<Button disabled={!canLeaveProject}>
Leave project
</Button>
</Popconfirm>;
return <Popconfirm
title={"Are you sure to leave this project?"}
okText="Yes" cancelText="No"
onConfirm={leaveProject}>
<p />
<Button disabled={!canLeaveProject}>
Leave project
</Button>
</Popconfirm>;
};


Expand All @@ -37,8 +37,8 @@ const useLeaveProject = () => {
};

return {
canLeaveProject: !Permissions.equals(Permissions.GUEST, usersPermissions) &&
!Permissions.equals(Permissions.OWNER, usersPermissions),
canLeaveProject: !Permissions.GUEST.equals(usersPermissions) &&
!Permissions.OWNER.equals(usersPermissions),
leaveProject,
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const useMembers = () => {
const version = useProjectVersion();
const commonGitSettings = version.gitConfiguration && version.gitConfiguration.commonGitSettings ? version.gitConfiguration.commonGitSettings.getEntity() : null;
const membersSorted = version.memberships.items
.sort((a, b) => Permissions.contains(a.permissions, b.permissions) ? -1 : 1);
.sort((a, b) => a.permissions.getEntity().contains(b.permissions.getEntity()) ? -1 : 1);

return {
membersSorted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const useMembershipContext = () => {
const username = auth.user.username;
return username != context.user.username &&
usersPermissions.canAddUsers &&
Permissions.isGreaterThan(usersPermissions, context.permissions);
usersPermissions.getEntity().isGreaterThan( context.permissions.getEntity());
// usersPermissions.isGreaterThan(context.permissions.getEntity());
};

return {membership: context, canUserEdit};
Expand Down
Loading

0 comments on commit c125e60

Please sign in to comment.