Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:taktik/icure-backend into feature…
Browse files Browse the repository at this point in the history
…/messages
  • Loading branch information
julesSion committed Jun 8, 2018
2 parents 5c6cb1c + 9913081 commit 5392d46
Show file tree
Hide file tree
Showing 28 changed files with 2,309 additions and 315 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ hs_err_pid*
bower_components/
node_modules/
dist/
dist-tz/

#IntelliJ files
*.iml
Expand Down
105 changes: 0 additions & 105 deletions .gradletasknamecache

This file was deleted.

70 changes: 61 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ buildscript {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath('com.taktik.gradle:gradle-plugin-docker-java:1.0.1')
}
}

Expand All @@ -21,6 +22,7 @@ apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'docker-java'

configure(allprojects) {
apply plugin: 'propdeps'
Expand All @@ -31,14 +33,23 @@ configure(allprojects) {


group = 'org.taktik.icure'
version = '4.0.3-SNAPSHOT'
version = '1.0.15'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}


compileJava {
options.fork = true
options.forkOptions.with {
memoryMaximumSize = "2048m"
}
}

compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
Expand Down Expand Up @@ -200,23 +211,64 @@ dependencies {
compile group: 'com.ibm.icu', name: 'icu4j', version: '57.1'
compile name: 'probatron4j-custom-0.7.4'
compile name: 'ehvalidator-service-core-2.1.1'
/*compile name: 'safe-common-global-2.2.4'
compile name: 'safe-common-sea-light-2.2.4'
compile name: 'safe-connector-common-3.4.1'
compile name: 'safe-connector-mapper-3.4.1'
compile name: 'safe-connector-technical-3.4.1'
compile name: 'safe-connector-validation-3.4.1'
compile name: 'safe-connector-vitalink-3.4.1'
compile name: 'safe-connector-xsltutils-3.4.1'*/

//Cloud version
compile group: 'com.hazelcast', name: 'hazelcast', version: '3.8.6'
compile group: 'com.hazelcast', name: 'hazelcast-spring', version: '3.8.6'
compile group: 'org.springframework.session', name: 'spring-session', version: '1.3.3.RELEASE'

// Runtime
runtime group: 'org.javassist', name: 'javassist', version: '3.18.1-GA'

testCompile('org.springframework.boot:spring-boot-starter-test')
}

task installWebResourcesDependencies(type: Exec) {
group 'build'
description 'Package web resources'

workingDir "$projectDir/web/icure-ht"
commandLine "npm", "install"
commandLine "bower", "install"
}


task packageHtWebResources(type: Exec) {
group 'build'
description 'Package web resources'

workingDir "$projectDir/web/icure-ht"
commandLine "node_modules/.bin/webpack", "--config", "webpack.config.js"
}

task packageTzWebResources(type: Exec) {
group 'build'
description 'Package web resources'

workingDir "$projectDir/web/icure-ht"
commandLine "node_modules/.bin/webpack", "--config", "webpack.config.tz.js"
}

packageHtWebResources.dependsOn(installWebResourcesDependencies)
packageTzWebResources.dependsOn(installWebResourcesDependencies)

task copyHtWebResources(type: Copy) {
from "$projectDir/web/icure-ht/dist"
into "${buildDir}/resources/main/static/ht"
}

task copyTzWebResources(type: Copy) {
from "$projectDir/web/icure-ht/dist-tz"
into "${buildDir}/resources/main/static/tz"
}

copyHtWebResources.dependsOn(packageHtWebResources)
copyTzWebResources.dependsOn(packageTzWebResources)
compileJava.dependsOn(processResources)

bootRepackage.dependsOn(copyHtWebResources)
bootRepackage.dependsOn(copyTzWebResources)

// Setup resolution strategy
configurations.all {
resolutionStrategy {
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/taktik/icure/dao/UserDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ public interface UserDAO extends GenericDAO<User> {

User getOnFallback(String userId);

User findOnFallback(String userId);

User getUserOnUserDb(String userId, String groupId);

User findUserOnUserDb(String userId, String groupId);

List<User> getUsersOnDb(String groupId);

void evictFromCache(String groupId, List<String> userIds);

User saveOnFallback(User user);
}
15 changes: 15 additions & 0 deletions src/main/java/org/taktik/icure/dao/impl/UserDAOImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,21 @@ public User getOnFallback(String userId) {
return ((CouchDbICureConnector) db).getFallbackConnector().get(User.class,userId);
}

@Override
public User findOnFallback(String userId) {
return ((CouchDbICureConnector) db).getFallbackConnector().find(User.class,userId);
}

@Override
public User getUserOnUserDb(String userId, String groupId) {
return ((CouchDbICureConnector) db).getCouchDbICureConnector(groupId).get(User.class,userId);
}

@Override
public User findUserOnUserDb(String userId, String groupId) {
return ((CouchDbICureConnector) db).getCouchDbICureConnector(groupId).find(User.class,userId);
}

@Override
public List<User> getUsersOnDb(String groupId) {
return ((CouchDbICureConnector) db).getCouchDbICureConnector(groupId).queryView(createQuery("all").includeDocs(true), User.class);
Expand All @@ -116,6 +126,11 @@ public void evictFromCache(String groupId, List<String> userIds) {
super.evictFromCache(groupId,ALL_ENTITIES_CACHE_KEY);
}

@Override
public User saveOnFallback(User user) {
((CouchDbICureConnector) db).getFallbackConnector().update(user);
return user;
}

@Override
protected User save(Boolean newEntity, User entity) {
Expand Down

This file was deleted.

5 changes: 2 additions & 3 deletions src/main/java/org/taktik/icure/entities/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.taktik.icure.entities.base.StoredICureDocument;
import org.taktik.icure.entities.embed.Delegation;
import org.taktik.icure.entities.embed.DocumentStatus;
import org.taktik.icure.entities.embed.DocumentType;

import java.io.Serializable;
import java.util.*;
import java.util.HashSet;
import java.util.Set;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class Document extends StoredICureDocument implements Serializable {
Expand Down
Loading

0 comments on commit 5392d46

Please sign in to comment.