Merge branch 'dev' into 13-paper-files
# Conflicts: # src/main/java/ru/ulstu/paper/model/PaperDto.javamerge-requests/35/head
commit
e609b27518
@ -1,58 +0,0 @@
|
||||
package ru.ulstu.deadline.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class DeadlineDto {
|
||||
private Integer id;
|
||||
|
||||
private String description;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date date;
|
||||
|
||||
public DeadlineDto() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
public DeadlineDto(@JsonProperty("id") Integer id,
|
||||
@JsonProperty("description") String description,
|
||||
@JsonProperty("date") Date date) {
|
||||
this.id = id;
|
||||
this.description = description;
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public DeadlineDto(Deadline deadline) {
|
||||
this.id = deadline.getId();
|
||||
this.description = deadline.getDescription();
|
||||
this.date = deadline.getDate();
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package ru.ulstu.grant.controller;
|
||||
|
||||
import org.springframework.validation.Errors;
|
||||
|
||||
public class Navigation {
|
||||
public static final String REDIRECT_TO = "redirect:%s";
|
||||
public static final String GRANTS_PAGE = "/grants/grants";
|
||||
public static final String GRANT_PAGE = "/grants/grant";
|
||||
|
||||
public static String hasErrors(Errors errors, String page) {
|
||||
if (errors.hasErrors()) {
|
||||
return page;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue