Skip to content

Commit

Permalink
adapted to wicket 9.0.X
Browse files Browse the repository at this point in the history
using localdatetime java 8
  • Loading branch information
JoTerrance committed May 20, 2020
1 parent f6c447b commit 116128e
Show file tree
Hide file tree
Showing 22 changed files with 314 additions and 260 deletions.
87 changes: 87 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,90 @@ target
*.orig
test-output
*.log

# Created by https://www.gitignore.io/api/maven,eclipse
# Edit at https://www.gitignore.io/?templates=maven,eclipse

### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Annotation Processing
.apt_generated/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

### Eclipse Patch ###
# Eclipse Core
.project

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Annotation Processing
.apt_generated

.sts4-cache/

### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.flattened-pom.xml

# End of https://www.gitignore.io/api/maven,eclipse
2 changes: 0 additions & 2 deletions .settings/org.eclipse.core.resources.prefs

This file was deleted.

12 changes: 0 additions & 12 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions .settings/org.eclipse.m2e.core.prefs

This file was deleted.

47 changes: 22 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
Expand Down Expand Up @@ -29,13 +31,12 @@
<module>wicket-fullcalendar-examples</module>
</modules>
<properties>
<wicket.version>8.0.0</wicket.version>
<joda.version>2.9.9</joda.version>
<jackson.version>1.9.13</jackson.version>
<junit.version>4.8.1</junit.version>
<wicket.version>9.0.0-M4</wicket.version>
<jackson.version>2.10.3</jackson.version>
<junit.version>5.6.0</junit.version>
<jetty.version>9.2.19.v20160908</jetty.version>
<slf4j.version>1.6.4</slf4j.version>
<log4j.version>1.2.16</log4j.version>
<slf4j.version>2.0.0-alpha1</slf4j.version>
<log4j.version>2.13.1</log4j.version>
</properties>
<dependencyManagement>
<dependencies>
Expand All @@ -44,39 +45,35 @@
<artifactId>wicket-core</artifactId>
<version>${wicket.version}</version>
</dependency>

<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda.version}</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>

Expand Down Expand Up @@ -143,10 +140,10 @@
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.8.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
<optimize>true</optimize>
<debug>true</debug>
</configuration>
Expand Down
23 changes: 11 additions & 12 deletions wicket-fullcalendar-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.ftlines.wicket-fullcalendar</groupId>
Expand All @@ -17,29 +19,26 @@
</license>
</licenses>
<dependencies>

<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>

<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@

package net.ftlines.wicket.fullcalendar;

import java.io.Serializable;
import java.util.Date;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.util.string.Strings;

public class CalendarResponse {
public class CalendarResponse implements Serializable {
private final FullCalendar calendar;
private final AjaxRequestTarget target;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
package net.ftlines.wicket.fullcalendar;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonRawValue;
import org.joda.time.LocalTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRawValue;

public class Config implements Serializable {
/** Use these to specify calendar column formats */
Expand All @@ -49,8 +49,8 @@ public static enum ColumnFormat {
@JsonProperty
private Map<ColumnFormat, String> columnFormat = new HashMap<Config.ColumnFormat, String>();

private LocalTime minTime;
private LocalTime maxTime;
private LocalDateTime minTime;
private LocalDateTime maxTime;
private Integer firstHour;
private Boolean allDaySlot;

Expand Down Expand Up @@ -231,19 +231,19 @@ public ButtonText getButtonText() {
return buttonText;
}

public LocalTime getMinTime() {
public LocalDateTime getMinTime() {
return minTime;
}

public void setMinTime(LocalTime minTime) {
public void setMinTime(LocalDateTime minTime) {
this.minTime = minTime;
}

public LocalTime getMaxTime() {
public LocalDateTime getMaxTime() {
return maxTime;
}

public void setMaxTime(LocalTime maxTime) {
public void setMaxTime(LocalDateTime maxTime) {
this.maxTime = maxTime;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,32 @@
package net.ftlines.wicket.fullcalendar;

import java.io.Serializable;

import org.joda.time.DateTime;
import java.time.LocalDateTime;

public class Event implements Serializable {

@Override
public String toString() {
return "Event [id=" + id + ", title=" + title + ", allDay=" + allDay + ", start=" + start + ", end=" + end
+ ", url=" + url + ", className=" + className + ", editable=" + editable + ", color=" + color
+ ", backgroundColor=" + backgroundColor + ", borderColor=" + borderColor + ", textColor=" + textColor
+ ", payload=" + payload + ", getId()=" + getId() + ", getTitle()=" + getTitle() + ", isAllDay()="
+ isAllDay() + ", getStart()=" + getStart() + ", getEnd()=" + getEnd() + ", getUrl()=" + getUrl()
+ ", getClassName()=" + getClassName() + ", isEditable()=" + isEditable() + ", getColor()=" + getColor()
+ ", getBackgroundColor()=" + getBackgroundColor() + ", getBorderColor()=" + getBorderColor()
+ ", getTextColor()=" + getTextColor() + ", getPayload()=" + getPayload() + ", getClass()=" + getClass()
+ ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]";
}

private String id;

private String title;

private boolean allDay = false;

private DateTime start;
private LocalDateTime start;

private DateTime end;
private LocalDateTime end;

private String url;

Expand Down Expand Up @@ -70,20 +82,20 @@ public Event setAllDay(boolean allDay) {
return this;
}

public DateTime getStart() {
public LocalDateTime getStart() {
return start;
}

public Event setStart(DateTime start) {
public Event setStart(LocalDateTime start) {
this.start = start;
return this;
}

public DateTime getEnd() {
public LocalDateTime getEnd() {
return end;
}

public Event setEnd(DateTime end) {
public Event setEnd(LocalDateTime end) {
this.end = end;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
package net.ftlines.wicket.fullcalendar;

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

import org.joda.time.DateTime;

public interface EventProvider extends Serializable {
Collection<Event> getEvents(DateTime start, DateTime end);
Collection<Event> getEvents(LocalDateTime start, LocalDateTime end);

Event getEventForId(String id) throws EventNotFoundException;
}
Loading

0 comments on commit 116128e

Please sign in to comment.