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

org.molgenis.data.security.permission.model.LabelledPermission Maven / Gradle / Ivy

There is a newer version: 8.4.5
Show newest version
package org.molgenis.data.security.permission.model;

import com.google.auto.value.AutoValue;
import java.util.Set;
import javax.annotation.Nullable;
import org.molgenis.security.core.PermissionSet;
import org.molgenis.util.AutoGson;
import org.springframework.security.acls.model.Sid;

@AutoValue
@AutoGson(autoValueClass = AutoValue_LabelledPermission.class)
@SuppressWarnings(
    "squid:S1610") // Abstract classes without fields should be converted to interfaces
public abstract class LabelledPermission {
  @Nullable
  public abstract Sid getSid();

  @Nullable
  public abstract LabelledObjectIdentity getLabelledObjectIdentity();

  @Nullable
  public abstract PermissionSet getPermission();

  @Nullable
  public abstract Set getInheritedPermissions();

  public static LabelledPermission create(
      Sid sid,
      LabelledObjectIdentity labelledObjectIdentity,
      PermissionSet permission,
      Set inhertiedPermissions) {
    return new AutoValue_LabelledPermission(
        sid, labelledObjectIdentity, permission, inhertiedPermissions);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy