Search in sources :

Example 71 with JsonIgnore

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();
}
Also used : DockerRuntimeConfig(org.guvnor.ala.docker.config.DockerRuntimeConfig) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 72 with JsonIgnore

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?
}
Also used : OpenShiftProvider(org.guvnor.ala.openshift.model.OpenShiftProvider) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 73 with JsonIgnore

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");
    }
}
Also used : DecimalFormat(java.text.DecimalFormat) Date(java.util.Date) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 74 with JsonIgnore

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);
}
Also used : lombok.val(lombok.val) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Example 75 with JsonIgnore

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);
}
Also used : lombok.val(lombok.val) JsonIgnore(com.fasterxml.jackson.annotation.JsonIgnore)

Aggregations

JsonIgnore (com.fasterxml.jackson.annotation.JsonIgnore)113 lombok.val (lombok.val)14 ArrayList (java.util.ArrayList)12 HashMap (java.util.HashMap)8 Map (java.util.Map)8 HashSet (java.util.HashSet)7 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)5 Date (java.util.Date)5 Field (com.hortonworks.registries.common.Schema.Field)4 Set (java.util.Set)4 Schema (com.hortonworks.registries.common.Schema)3 PrimaryKey (com.hortonworks.registries.storage.PrimaryKey)3 EntitlementException (com.sun.identity.entitlement.EntitlementException)3 PolicyException (com.sun.identity.policy.PolicyException)3 JsonArray (io.vertx.core.json.JsonArray)3 List (java.util.List)3 SequenceFile (ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile)2 TrustAndKeyProvider (com.codingchili.core.security.TrustAndKeyProvider)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2