@Test public void testWithInvalidUserSuppliedLabels() { Map userLabelsWithStrimzi = new HashMap<String, String>(3); userLabelsWithStrimzi.put("key1", "value1"); userLabelsWithStrimzi.put("key2", "value2"); userLabelsWithStrimzi.put(Labels.STRIMZI_DOMAIN + "something", "value3"); assertThrows(IllegalArgumentException.class, () -> Labels.EMPTY.withAdditionalLabels(userLabelsWithStrimzi)); }
public Labels withAdditionalLabels(Map<String, String> additionalLabels) { Map<String, String> newLabels = new HashMap<>(labels.size()); newLabels.putAll(labels); newLabels.putAll(Labels.additionalLabels(additionalLabels).toMap()); return new Labels(newLabels); }
Labels { public Labels withAdditionalLabels(Map<String, String> additionalLabels) { Map<String, String> newLabels = new HashMap<>(labels.size()); newLabels.putAll(labels); newLabels.putAll(Labels.additionalLabels(additionalLabels).toMap()); return new Labels(newLabels); } }
Labels { public Labels withAdditionalLabels(Map<String, String> additionalLabels) { Map<String, String> newLabels = new HashMap<>(labels.size()); newLabels.putAll(labels); newLabels.putAll(Labels.additionalLabels(additionalLabels).toMap()); return new Labels(newLabels); } private  Labels(Map<String, String> labels); }
Labels { public Labels withAdditionalLabels(Map<String, String> additionalLabels) { Map<String, String> newLabels = new HashMap<>(labels.size()); newLabels.putAll(labels); newLabels.putAll(Labels.additionalLabels(additionalLabels).toMap()); return new Labels(newLabels); } private  Labels(Map<String, String> labels); static String cluster(HasMetadata resource); static String name(HasMetadata resource); Labels withAdditionalLabels(Map<String, String> additionalLabels); static Labels fromResource(HasMetadata resource); static Labels fromMap(Map<String, String> labels); static Labels fromString(String stringLabels); Labels withStrimziKind(String kind); Labels withStrimziCluster(String cluster); Labels withKubernetesName(String name); Labels withKubernetesInstance(String instanceName); Labels withKubernetesPartOf(String instanceName); Labels withKubernetesManagedBy(String operatorName); Labels withStrimziName(String name); Labels withStrimziDiscovery(); Labels withStatefulSetPod(String name); Map<String, String> toMap(); String toSelectorString(); static Labels forStrimziCluster(String cluster); static Labels forStrimziKind(String kind); Labels strimziSelectorLabels(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Labels generateDefaultLabels(HasMetadata resource, String applicationName, String managedBy); }
Labels { public Labels withAdditionalLabels(Map<String, String> additionalLabels) { Map<String, String> newLabels = new HashMap<>(labels.size()); newLabels.putAll(labels); newLabels.putAll(Labels.additionalLabels(additionalLabels).toMap()); return new Labels(newLabels); } private  Labels(Map<String, String> labels); static String cluster(HasMetadata resource); static String name(HasMetadata resource); Labels withAdditionalLabels(Map<String, String> additionalLabels); static Labels fromResource(HasMetadata resource); static Labels fromMap(Map<String, String> labels); static Labels fromString(String stringLabels); Labels withStrimziKind(String kind); Labels withStrimziCluster(String cluster); Labels withKubernetesName(String name); Labels withKubernetesInstance(String instanceName); Labels withKubernetesPartOf(String instanceName); Labels withKubernetesManagedBy(String operatorName); Labels withStrimziName(String name); Labels withStrimziDiscovery(); Labels withStatefulSetPod(String name); Map<String, String> toMap(); String toSelectorString(); static Labels forStrimziCluster(String cluster); static Labels forStrimziKind(String kind); Labels strimziSelectorLabels(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Labels generateDefaultLabels(HasMetadata resource, String applicationName, String managedBy); static final String STRIMZI_DOMAIN; static final String KUBERNETES_DOMAIN; static final String STRIMZI_KIND_LABEL; static final String STRIMZI_CLUSTER_LABEL; static final String STRIMZI_NAME_LABEL; static final String STRIMZI_DISCOVERY_LABEL; static final String KUBERNETES_NAME_LABEL; static final String KUBERNETES_INSTANCE_LABEL; static final String KUBERNETES_PART_OF_LABEL; static final String APPLICATION_NAME; static final String KUBERNETES_MANAGED_BY_LABEL; static final String KUBERNETES_STATEFULSET_POD_LABEL; static final Labels EMPTY; }