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