package com.airlock.iam.plugin.framework.domain.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.commons.lang3.Validate;

public class ConfigTemplateMetaData {
   private final String name;
   private final String description;
   private final Set<String> tags;

   public ConfigTemplateMetaData(String name, String description, String... tags) {
      Validate.notEmpty(name, "Template name empty (or null)", new Object[0]);
      Validate.notEmpty(description, "Template description empty (or null)", new Object[0]);
      this.name = name;
      this.description = description;
      this.tags = new LinkedHashSet<>();
      if (tags != null) {
         this.tags.addAll(Arrays.asList(tags));
      }
   }

   public String getName() {
      return this.name;
   }

   public String getDescription() {
      return this.description;
   }

   public Set<String> getTags() {
      return Collections.unmodifiableSet(this.tags);
   }
}
