All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nasa.pds.registry.common.util.ArchiveStatus Maven / Gradle / Ivy

package gov.nasa.pds.registry.common.util;

import java.util.Set;
import java.util.TreeSet;

public class ArchiveStatus {
  final public Set statusNames;
  public ArchiveStatus() {
    statusNames = new TreeSet<>();
    statusNames.add("staged");
    statusNames.add("archived");
    statusNames.add("certified");
    statusNames.add("restricted");
  }
  public void validateStatusName (String status) throws Exception {
    if (!statusNames.contains(status)) {
      String authorized_status = String.join(", ", this.statusNames);
      throw new Exception("Invalid parameter value: '" + status + "'. Authorized values are "
          + authorized_status + ".");
    }   
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy