[NIFI-2900] transformed all datetime fields to string as they don't comply with ISO norms. This closes #1136.

This commit is contained in:
simplesteph 2016-10-14 17:57:41 +11:00 committed by Matt Gilman
parent e1f0ba5a43
commit 56da2b51e1
39 changed files with 120 additions and 44 deletions

View File

@ -103,7 +103,8 @@ public class AboutDTO {
@XmlJavaTypeAdapter(TimezoneAdapter.class)
@ApiModelProperty(
value = "The timezone of the NiFi instance.",
readOnly = true
readOnly = true,
dataType = "string"
)
public Date getTimezone() {
return timezone;

View File

@ -53,7 +53,8 @@ public class BulletinBoardDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The timestamp when this report was generated."
value = "The timestamp when this report was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;

View File

@ -156,7 +156,8 @@ public class BulletinDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "When this bulletin was generated."
value = "When this bulletin was generated.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -52,7 +52,8 @@ public class ClusterDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The timestamp the report was generated."
value = "The timestamp the report was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;

View File

@ -48,7 +48,10 @@ public class CountersSnapshotDTO implements Cloneable {
}
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty("The timestamp when the report was generated.")
@ApiModelProperty(
value = "The timestamp when the report was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;
}

View File

@ -87,7 +87,8 @@ public class DropRequestDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp when the query was submitted."
value = "The timestamp when the query was submitted.",
dataType = "string"
)
public Date getSubmissionTime() {
return submissionTime;
@ -144,7 +145,8 @@ public class DropRequestDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The last time this drop request was updated."
value = "The last time this drop request was updated.",
dataType = "string"
)
public Date getLastUpdated() {
return lastUpdated;

View File

@ -70,7 +70,8 @@ public class FlowConfigurationDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The current time on the system."
value = "The current time on the system.",
dataType = "string"
)
public Date getCurrentTime() {
return currentTime;

View File

@ -82,7 +82,8 @@ public class ListingRequestDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp when the query was submitted."
value = "The timestamp when the query was submitted.",
dataType = "string"
)
public Date getSubmissionTime() {
return submissionTime;
@ -97,7 +98,8 @@ public class ListingRequestDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The last time this listing request was updated."
value = "The last time this listing request was updated.",
dataType = "string"
)
public Date getLastUpdated() {
return lastUpdated;

View File

@ -49,7 +49,8 @@ public class NodeDTO {
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "the time of the nodes's last heartbeat.",
readOnly = true
readOnly = true,
dataType = "string"
)
public Date getHeartbeat() {
return heartbeat;
@ -65,7 +66,8 @@ public class NodeDTO {
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The time of the node's last connection request.",
readOnly = true
readOnly = true,
dataType = "string"
)
public Date getConnectionRequested() {
return connectionRequested;
@ -202,7 +204,8 @@ public class NodeDTO {
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The time at which this Node was last refreshed.",
readOnly = true
readOnly = true,
dataType = "string"
)
public Date getNodeStartTime() {
return nodeStartTime;

View File

@ -65,7 +65,8 @@ public class NodeEventDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The timestamp of the node event."
value = "The timestamp of the node event.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -52,7 +52,8 @@ public class PreviousValueDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The timestamp when the value was modified."
value = "The timestamp when the value was modified.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -284,7 +284,8 @@ public class RemoteProcessGroupDTO extends ComponentDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The timestamp when this remote process group was last refreshed."
value = "The timestamp when this remote process group was last refreshed.",
dataType = "string"
)
public Date getFlowRefreshed() {
return flowRefreshed;

View File

@ -220,7 +220,10 @@ public class SystemDiagnosticsSnapshotDTO implements Cloneable {
}
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty("When the diagnostics were generated.")
@ApiModelProperty(
value = "When the diagnostics were generated.",
dataType = "string"
)
public Date getStatsLastRefreshed() {
return statsLastRefreshed;
}

View File

@ -111,7 +111,8 @@ public class TemplateDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The timestamp when this template was created."
value = "The timestamp when this template was created.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -76,7 +76,8 @@ public class ActionDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The timestamp of the action."
value = "The timestamp of the action.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -53,7 +53,8 @@ public class HistoryDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The timestamp when the report was generated."
value = "The timestamp when the report was generated.",
dataType = "string"
)
public Date getLastRefreshed() {
return lastRefreshed;

View File

@ -71,7 +71,8 @@ public class HistoryQueryDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The start date of actions to return."
value = "The start date of actions to return.",
dataType = "string"
)
public Date getStartDate() {
return startDate;
@ -86,7 +87,8 @@ public class HistoryQueryDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The end date of actions to return."
value = "The end date of actions to return.",
dataType = "string"
)
public Date getEndDate() {
return endDate;

View File

@ -35,7 +35,8 @@ public class PurgeDetailsDTO extends ActionDetailsDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The end date for the purge action."
value = "The end date for the purge action.",
dataType = "string"
)
public Date getEndDate() {
return endDate;

View File

@ -115,7 +115,8 @@ public class ProcessGroupFlowDTO {
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The time the flow for the process group was last refreshed."
value = "The time the flow for the process group was last refreshed.",
dataType = "string"
)
public Date getLastRefreshed() {
return lastRefreshed;

View File

@ -74,7 +74,8 @@ public class ProvenanceDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp when the query was submitted."
value = "The timestamp when the query was submitted.",
dataType = "string"
)
public Date getSubmissionTime() {
return submissionTime;
@ -89,7 +90,8 @@ public class ProvenanceDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp when the query will expire."
value = "The timestamp when the query will expire.",
dataType = "string"
)
public Date getExpiration() {
return expiration;

View File

@ -116,7 +116,8 @@ public class ProvenanceEventDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp of the event."
value = "The timestamp of the event.",
dataType = "string"
)
public Date getEventTime() {
return eventTime;

View File

@ -57,7 +57,8 @@ public class ProvenanceRequestDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The earliest event time to include in the query."
value = "The earliest event time to include in the query.",
dataType = "string"
)
public Date getStartDate() {
return startDate;
@ -72,7 +73,8 @@ public class ProvenanceRequestDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The latest event time to include in the query."
value = "The latest event time to include in the query.",
dataType = "string"
)
public Date getEndDate() {
return endDate;

View File

@ -102,7 +102,8 @@ public class ProvenanceResultsDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "Then the search was performed."
value = "Then the search was performed.",
dataType = "string"
)
public Date getGenerated() {
return generated;
@ -117,7 +118,8 @@ public class ProvenanceResultsDTO {
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The oldest event available in the provenance repository."
value = "The oldest event available in the provenance repository.",
dataType = "string"
)
public Date getOldestEvent() {
return oldestEvent;

View File

@ -72,7 +72,8 @@ public class LineageDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "When the lineage query was submitted."
value = "When the lineage query was submitted.",
dataType = "string"
)
public Date getSubmissionTime() {
return submissionTime;
@ -87,7 +88,8 @@ public class LineageDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "When the lineage query will expire."
value = "When the lineage query will expire.",
dataType = "string"
)
public Date getExpiration() {
return expiration;

View File

@ -81,7 +81,8 @@ public class ProvenanceLinkDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp of the link (based on the destination)."
value = "The timestamp of the link (based on the destination).",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -145,7 +145,8 @@ public class ProvenanceNodeDTO {
*/
@XmlJavaTypeAdapter(TimestampAdapter.class)
@ApiModelProperty(
value = "The timestamp of the node formatted."
value = "The timestamp of the node formatted.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;

View File

@ -124,7 +124,10 @@ public class ConnectionStatusDTO implements Cloneable {
}
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty("The timestamp of when the stats were last refreshed")
@ApiModelProperty(
value = "The timestamp of when the stats were last refreshed",
dataType = "string"
)
public Date getStatsLastRefreshed() {
return statsLastRefreshed;
}

View File

@ -113,7 +113,8 @@ public class PortStatusDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The time the status for the process group was last refreshed."
value = "The time the status for the process group was last refreshed.",
dataType = "string"
)
public Date getStatsLastRefreshed() {
return statsLastRefreshed;

View File

@ -78,7 +78,8 @@ public class ProcessGroupStatusDTO implements Cloneable {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The time the status for the process group was last refreshed."
value = "The time the status for the process group was last refreshed.",
dataType = "string"
)
public Date getStatsLastRefreshed() {
return statsLastRefreshed;

View File

@ -87,7 +87,10 @@ public class ProcessorStatusDTO implements Cloneable {
}
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty("The timestamp of when the stats were last refreshed")
@ApiModelProperty(
value="The timestamp of when the stats were last refreshed",
dataType = "string"
)
public Date getStatsLastRefreshed() {
return statsLastRefreshed;
}

View File

@ -109,7 +109,8 @@ public class RemoteProcessGroupStatusDTO {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The time the status for the process group was last refreshed."
value = "The time the status for the process group was last refreshed.",
dataType = "string"
)
public Date getStatsLastRefreshed() {
return statsLastRefreshed;

View File

@ -42,7 +42,10 @@ public class StatusHistoryDTO {
* @return when this status history was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty("When the status history was generated.")
@ApiModelProperty(
value = "When the status history was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;
}

View File

@ -16,13 +16,12 @@
*/
package org.apache.nifi.web.api.dto.util;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import javax.xml.bind.annotation.adapters.XmlAdapter;
/**
* XmlAdapter for (un)marshalling a time.
*/

View File

@ -16,6 +16,7 @@
*/
package org.apache.nifi.web.api.entity;
import com.wordnik.swagger.annotations.ApiModelProperty;
import org.apache.nifi.web.api.dto.AccessPolicyDTO;
import org.apache.nifi.web.api.dto.util.TimeAdapter;
@ -49,6 +50,10 @@ public class AccessPolicyEntity extends ComponentEntity {
* @return When this content was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "When this content was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;
}

View File

@ -19,6 +19,7 @@ package org.apache.nifi.web.api.entity;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.wordnik.swagger.annotations.ApiModelProperty;
import org.apache.nifi.web.api.dto.ReadablePermission;
import org.apache.nifi.web.api.dto.action.ActionDTO;
import org.apache.nifi.web.api.dto.util.DateTimeAdapter;
@ -66,6 +67,10 @@ public class ActionEntity extends Entity implements ReadablePermission {
* @return The timestamp of the action.
*/
@XmlJavaTypeAdapter(DateTimeAdapter.class)
@ApiModelProperty(
value = "The timestamp of the action.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;
}

View File

@ -16,6 +16,7 @@
*/
package org.apache.nifi.web.api.entity;
import com.wordnik.swagger.annotations.ApiModelProperty;
import org.apache.nifi.web.api.dto.BulletinDTO;
import org.apache.nifi.web.api.dto.ReadablePermission;
import org.apache.nifi.web.api.dto.util.TimeAdapter;
@ -87,6 +88,10 @@ public class BulletinEntity extends Entity implements ReadablePermission {
* @return When this bulletin was generated.
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "When this bulletin was generated.",
dataType = "string"
)
public Date getTimestamp() {
return timestamp;
}

View File

@ -49,7 +49,8 @@ public class ControllerServicesEntity extends Entity {
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "The current time on the system."
value = "The current time on the system.",
dataType = "string"
)
public Date getCurrentTime() {
return currentTime;

View File

@ -16,6 +16,7 @@
*/
package org.apache.nifi.web.api.entity;
import com.wordnik.swagger.annotations.ApiModelProperty;
import org.apache.nifi.web.api.dto.util.TimeAdapter;
import javax.xml.bind.annotation.XmlRootElement;
@ -49,6 +50,10 @@ public class TemplatesEntity extends Entity {
* @return When this content was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "When this content was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;
}

View File

@ -16,6 +16,7 @@
*/
package org.apache.nifi.web.api.entity;
import com.wordnik.swagger.annotations.ApiModelProperty;
import org.apache.nifi.web.api.dto.util.TimeAdapter;
import javax.xml.bind.annotation.XmlRootElement;
@ -50,6 +51,10 @@ public class UsersEntity extends Entity {
* @return When this content was generated
*/
@XmlJavaTypeAdapter(TimeAdapter.class)
@ApiModelProperty(
value = "When this content was generated.",
dataType = "string"
)
public Date getGenerated() {
return generated;
}