Skip to content

Commit

Permalink
Merge pull request #186 from adessoAG/master
Browse files Browse the repository at this point in the history
Release 3.2.1 with compatability fixes
  • Loading branch information
maximAtanasov authored May 8, 2019
2 parents 915a86d + cd24955 commit d0b1e19
Show file tree
Hide file tree
Showing 20 changed files with 122 additions and 57 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ repositories {
}
dependencies {
compile 'de.adesso.wicked-charts:wicked-charts-wicket8:3.3.0-SNAPSHOT'
compile 'de.adesso.wicked-charts:wicked-charts-wicket8:3.2.1-SNAPSHOT'
}
```

Expand All @@ -228,7 +228,7 @@ Maven:
<dependency>
<groupId>de.adesso.wicked-charts</groupId>
<artifactId>wicked-charts-wicket8</artifactId>
<version>3.3.0-SNAPSHOT</version>
<version>3.2.1-SNAPSHOT</version>
<type>pom</type>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subprojects {
}

// run gradle with "-Dsnapshot=true" to automatically append "-SNAPSHOT" to the version
version = '3.2.0' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "")
version = '3.2.1' + (Boolean.valueOf(System.getProperty("snapshot")) ? "-SNAPSHOT" : "")

ext {
bintrayUser = System.getProperty("bintray.user")
Expand Down
12 changes: 9 additions & 3 deletions chartjs-wrapper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.9'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.9'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.9'
compile group: 'org.threeten', name: 'threetenbp', version: '1.3.8'
}

compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package de.adesso.wickedcharts.chartjs.chartoptions.label;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
* Defines constant textlabels for the axes .
Expand All @@ -19,12 +19,19 @@ public ConstLabel(final String text) {
}

public static List<ConstLabel> of(String... texts) {
return Arrays.stream(texts).map(textLabel -> new ConstLabel(textLabel)).collect(Collectors.toList());
List<ConstLabel> resultList = new ArrayList<ConstLabel>();
for(String text : texts){
resultList.add(new ConstLabel(text));
}
return resultList;
}

public static List<ConstLabel> of(List<String> textList) {
return textList.stream().map(textLabel -> new ConstLabel(textLabel)).collect(Collectors.toList());
}
List<ConstLabel> resultList = new ArrayList<ConstLabel>();
for(String text : textList){
resultList.add(new ConstLabel(text));
}
return resultList; }

public String getText() {
return text;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package de.adesso.wickedcharts.chartjs.chartoptions.label;

import org.threeten.bp.LocalDateTime;

import java.io.Serializable;
import java.time.LocalDateTime;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
* Defines datetime labels for the axes.
Expand All @@ -20,11 +22,18 @@ public DateTimeLabel(LocalDateTime date) {
}

public static List<TextLabel> of(String... texts) {
return Arrays.stream(texts).map(textLabel -> new TextLabel(textLabel)).collect(Collectors.toList());
}
List<TextLabel> resultList = new ArrayList<TextLabel>();
for(String text : texts){
resultList.add(new TextLabel(text));
}
return resultList; }

public static List<TextLabel> of(List<String> textList) {
return textList.stream().map(textLabel -> new TextLabel(textLabel)).collect(Collectors.toList());
List<TextLabel> resultList = new ArrayList<TextLabel>();
for(String text : textList){
resultList.add(new TextLabel(text));
}
return resultList;
}

public LocalDateTime getDate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

/**
* Defines simple textlabels for the axes .
Expand All @@ -22,11 +19,19 @@ public TextLabel(String text) {
}

public static List<TextLabel> of(String... texts) {
return Arrays.stream(texts).map(TextLabel::new).collect(Collectors.toList());
List<TextLabel> resultList = new ArrayList<TextLabel>();
for(String text : texts){
resultList.add(new TextLabel(text));
}
return resultList;
}

public static List<TextLabel> of(List<String> textList) {
return textList.stream().map(TextLabel::new).collect(Collectors.toList());
List<TextLabel> resultList = new ArrayList<TextLabel>();
for(String text : textList){
resultList.add(new TextLabel(text));
}
return resultList;
}

public String getText() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* This class defines a constant ValueType using a final String.
Expand All @@ -26,10 +25,17 @@ public ConstValue(final String value) {
}

public static List<ConstValue> of(final List<String> constList) {
return constList.stream().map(string -> new ConstValue(string)).collect(Collectors.toList());
List<ConstValue> resultList = new ArrayList<ConstValue>();
for(String s : constList){
resultList.add(new ConstValue(s));
}
return resultList;
}

public static List<ConstValue> of(final String...consts) {
return Arrays.stream(consts).map(string -> new ConstValue(string)).collect(Collectors.toList());
}
List<ConstValue> resultList = new ArrayList<ConstValue>();
for(String s : consts){
resultList.add(new ConstValue(s));
}
return resultList; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.threeten.bp.LocalDateTime;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* This class defines a DateTimeValue object that can be used in charts that use different options related to time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* This class wraps Doubles in a DoubleValue object.
Expand Down Expand Up @@ -39,10 +38,18 @@ public DoubleValue(Double doubleVal) {
}

public static List<DoubleValue> of(List<Double> doubleList) {
return doubleList.stream().map(doubleVal -> new DoubleValue(doubleVal)).collect(Collectors.toList());
List<DoubleValue> resultList = new ArrayList<DoubleValue>();
for(Double i : doubleList){
resultList.add(new DoubleValue(i));
}
return resultList;
}

public static List<DoubleValue> of(Double...doubles) {
return Arrays.stream(doubles).map(doubleVal -> new DoubleValue(doubleVal)).collect(Collectors.toList());
List<DoubleValue> resultList = new ArrayList<DoubleValue>();
for(Double i : doubles){
resultList.add(new DoubleValue(i));
}
return resultList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* This class wraps Floats in a FloatValue object.
Expand Down Expand Up @@ -38,10 +37,18 @@ public FloatValue(Float value) {
}

public static List<FloatValue> of(List<Float> floatList) {
return floatList.stream().map(floatVal -> new FloatValue(floatVal)).collect(Collectors.toList());
List<FloatValue> floatValues = new ArrayList<FloatValue>();
for(Float f : floatList){
floatValues.add(new FloatValue(f));
}
return floatValues;
}

public static List<FloatValue> of(Float...floats) {
return Arrays.stream(floats).map(floatVal -> new FloatValue(floatVal)).collect(Collectors.toList());
List<FloatValue> floatValues = new ArrayList<FloatValue>();
for(Float f : floats){
floatValues.add(new FloatValue(f));
}
return floatValues;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* This class wraps Integers in a IntegerValue object.
Expand Down Expand Up @@ -38,10 +37,18 @@ public IntegerValue(Integer integer) {
}

public static List<IntegerValue> of(List<Integer> integerList) {
return integerList.stream().map(integer -> new IntegerValue(integer)).collect(Collectors.toList());
List<IntegerValue> resultList = new ArrayList<IntegerValue>();
for(Integer i : integerList){
resultList.add(new IntegerValue(i));
}
return resultList;
}

public static List<IntegerValue> of(Integer...integers) {
return Arrays.stream(integers).map(integer -> new IntegerValue(integer)).collect(Collectors.toList());
List<IntegerValue> resultList = new ArrayList<IntegerValue>();
for(Integer i : integers){
resultList.add(new IntegerValue(i));
}
return resultList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* This class wraps Strings in a StringValue object.
Expand All @@ -29,11 +28,19 @@ public StringValue(String value) {
}

public static List<StringValue> of(List<String> stringList) {
return stringList.stream().map(StringValue::new).collect(Collectors.toList());
List<StringValue> resultList = new ArrayList<StringValue>();
for(String string : stringList){
resultList.add(new StringValue(string));
}
return resultList;
}

public static List<StringValue> of(String...strings) {
return Arrays.stream(strings).map(StringValue::new).collect(Collectors.toList());
List<StringValue> resultList = new ArrayList<StringValue>();
for(String string : strings){
resultList.add(new StringValue(string));
}
return resultList;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import de.adesso.wickedcharts.chartjs.chartoptions.label.DateTimeLabel;
import org.threeten.bp.format.DateTimeFormatter;

import java.io.IOException;
import java.time.format.DateTimeFormatter;

/**
* Serializes a DateTimeLabel object to JSON
Expand All @@ -16,7 +16,7 @@ public class DateTimeLabelSerializer extends JsonSerializer<DateTimeLabel> {

private static final String MOMENT_FORMAT = "moment('%s',moment.ISO_8601)";
private static final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;

@Override
public void serialize(DateTimeLabel value, JsonGenerator gen, SerializerProvider serializers)
throws IOException, JsonProcessingException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.DateTimeValue;
import org.threeten.bp.format.DateTimeFormatter;

import java.io.IOException;
import java.time.format.DateTimeFormatter;

/**
* Serializes a DateTimeValue object to JSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import de.adesso.wickedcharts.chartjs.jackson.JsonRenderer;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.time.LocalDateTime;
import org.threeten.bp.LocalDateTime;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down
11 changes: 8 additions & 3 deletions highcharts-wrapper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.9'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.9'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.9'
}

compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
2 changes: 1 addition & 1 deletion showcase/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
spring_boot_version=2.1.2.RELEASE
spring_version=5.1.4.RELEASE
wickedcharts_version=3.2.0-SNAPSHOT
wickedcharts_version=3.2.1-SNAPSHOT
junit_version=5.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.StringValue;
import de.adesso.wickedcharts.chartjs.chartoptions.valueType.ValueType;
import de.adesso.wickedcharts.showcase.options.chartjs.base.ShowcaseConfiguration;
import org.threeten.bp.LocalDateTime;
import org.threeten.bp.format.DateTimeFormatter;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down
Loading

0 comments on commit d0b1e19

Please sign in to comment.