org.molgenis.data.security.exception.NotAValidGroupRoleException 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.exception;
import org.molgenis.data.security.auth.Group;
import org.molgenis.data.security.auth.Role;
import org.molgenis.util.exception.CodedRuntimeException;
public class NotAValidGroupRoleException extends CodedRuntimeException {
private static final String ERROR_CODE = "DS15";
private final transient Role role;
private final transient Group group;
public NotAValidGroupRoleException(Role role, Group group) {
super(ERROR_CODE);
this.role = role;
this.group = group;
}
@Override
public String getMessage() {
return String.format("role:%s group:%s", role.getName(), group.getName());
}
@Override
protected Object[] getLocalizedMessageArguments() {
return new Object[] {role.getName(), group.getName()};
}
}