use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project kie-wb-common by kiegroup.
the class ContextAwareDockerRuntimeExecConfig method setContext.
@Override
@JsonIgnore
public void setContext(final Map<String, ?> context) {
this.context = context;
final DockerRuntimeConfig dockerRuntimeConfiguration = (DockerRuntimeConfig) context.get("docker-runtime-config");
this.providerId = dockerRuntimeConfiguration.getProviderId();
this.image = dockerRuntimeConfiguration.getImage();
this.port = dockerRuntimeConfiguration.getPort();
this.pull = dockerRuntimeConfiguration.isPull();
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project kie-wb-common by kiegroup.
the class ContextAwareOpenShiftRuntimeExecConfig method setContext.
@Override
@JsonIgnore
public void setContext(final Map<String, ?> context) {
final OpenShiftProvider provider = (OpenShiftProvider) context.get(OpenShiftProvider.CONTEXT_KEY);
this.providerId = provider;
// TODO: other props?
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project kylo by Teradata.
the class DataConfidenceSummary method parse.
@JsonIgnore
private void parse() {
if (latestCheckDataFeeds != null && !latestCheckDataFeeds.isEmpty()) {
this.totalCount = latestCheckDataFeeds.size();
Date minCompleteDate = null;
for (CheckDataJob job : latestCheckDataFeeds) {
if (minCompleteDate == null || minCompleteDate.getTime() < job.getEndTime().getMillis()) {
minCompleteDate = job.getEndTime().toDate();
}
if (job.isValid()) {
this.successCount++;
} else {
this.failedCount++;
this.failedJobs.add(job);
warnings.add(job.getFeedName() + " failed Validation at " + job.getEndTime() + " because: " + job.getValidationMessage());
}
}
Date now = new Date();
if (minCompleteDate == null) {
throw new RuntimeException("The minimum complete date was not set as expected");
}
long duration = now.getTime() - minCompleteDate.getTime();
long diffInMinutes = TimeUnit.MILLISECONDS.toMinutes(duration);
this.timeSinceLastCheck = diffInMinutes + " min ";
if (diffInMinutes == 0) {
long diffInSeconds = TimeUnit.MILLISECONDS.toSeconds(duration);
this.timeSinceLastCheck = diffInSeconds + " sec ";
}
this.confidencePercentage = ((float) successCount / totalCount) * 100;
if (this.confidencePercentage > 0) {
DecimalFormat twoDForm = new DecimalFormat("##.##");
this.confidencePercentage = Float.valueOf(twoDForm.format(this.confidencePercentage));
}
if (this.warningTimeThreshold != null && diffInMinutes > this.warningTimeThreshold) {
warnings.add(" Warning it has been over " + this.warningTimeThreshold + " minutes since some of the check data jobs have been run");
}
this.minCompleteDate = minCompleteDate;
} else {
warnings.add("No Check Data Jobs Found");
}
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.
the class MultifactorAuthenticationTrustRecord method isExpired.
/**
* Is record expired?
*
* @return true/false
*/
@JsonIgnore
public boolean isExpired() {
if (this.expirationDate == null) {
return false;
}
val expDate = ZonedDateTime.now(ZoneOffset.UTC).truncatedTo(ChronoUnit.SECONDS);
val zonedExpDate = DateTimeUtils.zonedDateTimeOf(this.expirationDate).truncatedTo(ChronoUnit.SECONDS);
return expDate.equals(zonedExpDate) || expDate.isAfter(zonedExpDate);
}
use of org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore in project cas by apereo.
the class MultifactorAuthenticationTrustRecord method neverExpire.
/**
* Set the expiration date to never expire the record.
*/
@JsonIgnore
public void neverExpire() {
val expDate = getRecordDate().plusYears(YEARS_TO_KEEP_RECORD_AS_FOREVER).truncatedTo(ChronoUnit.SECONDS);
val zonedExpDate = DateTimeUtils.dateOf(expDate);
setExpirationDate(zonedExpDate);
}
Aggregations