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

com.almworks.jira.structure.api.settings.ImmutableAttributeSensitivitySettingsBean Maven / Gradle / Ivy

The newest version!
package com.almworks.jira.structure.api.settings;

import com.almworks.jira.structure.api.attribute.AttributeSpec;
import org.jetbrains.annotations.NotNull;

import java.util.*;

import static com.almworks.jira.structure.api.settings.AttributeSensitivityMode.STANDARD;
import static java.util.Collections.emptySet;

public class ImmutableAttributeSensitivitySettingsBean implements AttributeSensitivitySettings {
  public static final AttributeSensitivitySettings DEFAULT = new ImmutableAttributeSensitivitySettingsBean(STANDARD, emptySet());

  @NotNull
  private final AttributeSensitivityMode mySensitivityMode;
  @NotNull
  private final Set> myNonSensitiveAttributes;

  public ImmutableAttributeSensitivitySettingsBean(@NotNull AttributeSensitivityMode sensitivityMode,
    @NotNull Collection> nonSensitiveAttributes)
  {
    mySensitivityMode = sensitivityMode;
    myNonSensitiveAttributes = Collections.unmodifiableSet(new HashSet<>(nonSensitiveAttributes));
  }

  @NotNull
  @Override
  public AttributeSensitivityMode getSensitivityMode() {
    return mySensitivityMode;
  }

  @NotNull
  @Override
  public Set> getNonSensitiveAttributes() {
    return myNonSensitiveAttributes;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy