org.molgenis.data.security.permission.model.LabelledPermission Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of molgenis-data-security Show documentation
Show all versions of molgenis-data-security Show documentation
Security data model and data layer security.
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);
}
}