public final class DtoConverters
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GENIE_ID_PREFIX
The Genie 3 prefix for resource ID added to the set of tags by the system.
|
static java.lang.String |
GENIE_NAME_PREFIX
The Genie 3 prefix for resource names added to the set of tags by the system.
|
| Modifier and Type | Method and Description |
|---|---|
static com.netflix.genie.common.dto.ClusterCriteria |
toClusterCriteria(com.netflix.genie.common.internal.dto.v4.Criterion criterion)
Convert the given
criterion to a V3 ClusterCriteria object. |
static com.netflix.genie.common.dto.Application |
toV3Application(com.netflix.genie.common.internal.dto.v4.Application v4Application)
Convert a V4 Application DTO to a V3 application DTO.
|
static com.netflix.genie.common.dto.Cluster |
toV3Cluster(com.netflix.genie.common.internal.dto.v4.Cluster v4Cluster)
Convert a V4 Cluster to a V3 Cluster.
|
static com.google.common.collect.ImmutableSet<java.lang.String> |
toV3CriterionTags(com.netflix.genie.common.internal.dto.v4.Criterion criterion)
Convert a given V4
criterion to the equivalent representation in V3 set of tags. |
static com.google.common.collect.ImmutableSet<java.lang.String> |
toV3Tags(java.lang.String id,
java.lang.String name,
java.util.Set<java.lang.String> tags)
Convert the V4 values supplied to how the tags would have looked in Genie V3.
|
static com.netflix.genie.common.internal.dto.v4.Application |
toV4Application(com.netflix.genie.common.dto.Application v3Application)
Convert a V3 Application DTO to a V4 Application DTO.
|
static com.netflix.genie.common.internal.dto.v4.Cluster |
toV4Cluster(com.netflix.genie.common.dto.Cluster v3Cluster)
Convert a V3 Cluster to a V4 cluster.
|
static com.netflix.genie.common.internal.dto.v4.Command |
toV4Command(com.netflix.genie.common.dto.Command v3Command)
Convert a V3 Command to a V4 Command.
|
static com.netflix.genie.common.internal.dto.v4.Criterion |
toV4Criterion(com.netflix.genie.common.dto.ClusterCriteria criteria)
Convert a V3 Cluster Criteria to a V4 Criterion.
|
static com.netflix.genie.common.internal.dto.v4.Criterion |
toV4Criterion(java.util.Set<java.lang.String> tags)
Convert a set of V3 criterion tags to a V4 criterion object.
|
static com.netflix.genie.common.internal.dto.v4.JobRequest |
toV4JobRequest(com.netflix.genie.common.dto.JobRequest v3JobRequest)
Convert a V3 Job Request to a V4 Job Request.
|
public static final java.lang.String GENIE_ID_PREFIX
public static final java.lang.String GENIE_NAME_PREFIX
public static com.netflix.genie.common.internal.dto.v4.Application toV4Application(com.netflix.genie.common.dto.Application v3Application)
v3Application - The V3 application to convertpublic static com.netflix.genie.common.dto.Application toV3Application(com.netflix.genie.common.internal.dto.v4.Application v4Application)
v4Application - The V4 application to convertpublic static com.netflix.genie.common.internal.dto.v4.Cluster toV4Cluster(com.netflix.genie.common.dto.Cluster v3Cluster)
v3Cluster - The cluster to convertpublic static com.netflix.genie.common.dto.Cluster toV3Cluster(com.netflix.genie.common.internal.dto.v4.Cluster v4Cluster)
v4Cluster - The cluster to convertpublic static com.netflix.genie.common.internal.dto.v4.Command toV4Command(com.netflix.genie.common.dto.Command v3Command)
v3Command - The V3 Command to convertpublic static com.netflix.genie.common.internal.dto.v4.JobRequest toV4JobRequest(com.netflix.genie.common.dto.JobRequest v3JobRequest)
throws com.netflix.genie.common.exceptions.GeniePreconditionException
v3JobRequest - The v3 request to convertcom.netflix.genie.common.exceptions.GeniePreconditionException - When the criteria is invalidpublic static com.google.common.collect.ImmutableSet<java.lang.String> toV3Tags(java.lang.String id,
java.lang.String name,
java.util.Set<java.lang.String> tags)
id - The id of the resourcename - The name of the resourcetags - The tags on the resourcepublic static com.google.common.collect.ImmutableSet<java.lang.String> toV3CriterionTags(com.netflix.genie.common.internal.dto.v4.Criterion criterion)
criterion to the equivalent representation in V3 set of tags.criterion - The Criterion to convertpublic static com.netflix.genie.common.dto.ClusterCriteria toClusterCriteria(com.netflix.genie.common.internal.dto.v4.Criterion criterion)
criterion to a V3 ClusterCriteria object.criterion - The Criterion to convertpublic static com.netflix.genie.common.internal.dto.v4.Criterion toV4Criterion(com.netflix.genie.common.dto.ClusterCriteria criteria)
throws com.netflix.genie.common.exceptions.GeniePreconditionException
criteria - The criteria to convertcom.netflix.genie.common.exceptions.GeniePreconditionException - If the criteria converts to an invalid criterionpublic static com.netflix.genie.common.internal.dto.v4.Criterion toV4Criterion(java.util.Set<java.lang.String> tags)
throws com.netflix.genie.common.exceptions.GeniePreconditionException
tags - The tags to convertcom.netflix.genie.common.exceptions.GeniePreconditionException - If the tags convert to an invalid criterion