added ModelsApi get
This commit is contained in:
parent
715bf6fd1e
commit
93c593bb41
@ -16,10 +16,12 @@ package com.inteligr8.alfresco.activiti.api;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.QueryParam;
|
||||
|
||||
import com.inteligr8.alfresco.activiti.model.ResultListDataRepresentation;
|
||||
import com.inteligr8.activiti.model.ResultList;
|
||||
import com.inteligr8.alfresco.activiti.model.ModelRepresentation;
|
||||
|
||||
@Path("/api/enterprise/models")
|
||||
public interface ModelsApi {
|
||||
@ -40,8 +42,14 @@ public interface ModelsApi {
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{id}")
|
||||
@Produces({ "application/json" })
|
||||
public ResultListDataRepresentation get(
|
||||
public ModelRepresentation get(
|
||||
@PathParam("id") String id);
|
||||
|
||||
@GET
|
||||
@Produces({ "application/json" })
|
||||
public ResultList<ModelRepresentation> get(
|
||||
@QueryParam("filter") String filter,
|
||||
@QueryParam("sort") String sort,
|
||||
@QueryParam("modelType") Integer modelType,
|
||||
|
@ -1,10 +1,13 @@
|
||||
|
||||
package com.inteligr8.alfresco.activiti.model;
|
||||
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@ -52,7 +55,8 @@ public class ModelRepresentation {
|
||||
@JsonProperty("id")
|
||||
private Integer id;
|
||||
@JsonProperty("lastUpdated")
|
||||
private String lastUpdated;
|
||||
@JsonFormat(shape = Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXX")
|
||||
private OffsetDateTime lastUpdated;
|
||||
@JsonProperty("lastUpdatedBy")
|
||||
private Integer lastUpdatedBy;
|
||||
@JsonProperty("lastUpdatedByFullName")
|
||||
@ -167,16 +171,16 @@ public class ModelRepresentation {
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdated")
|
||||
public String getLastUpdated() {
|
||||
public OffsetDateTime getLastUpdated() {
|
||||
return lastUpdated;
|
||||
}
|
||||
|
||||
@JsonProperty("lastUpdated")
|
||||
public void setLastUpdated(String lastUpdated) {
|
||||
public void setLastUpdated(OffsetDateTime lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
}
|
||||
|
||||
public ModelRepresentation withLastUpdated(String lastUpdated) {
|
||||
public ModelRepresentation withLastUpdated(OffsetDateTime lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
return this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user