base.security.PermissionException Maven / Gradle / Ivy
/**
* Creative commons Attribution-NonCommercial license.
*
* http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB
*
* NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
*/
package base.security;
import java.io.IOException;
import java.util.UUID;
/**
* A standardised mechanism to throw Permission related exceptions.
*/
public class PermissionException extends IOException {
private static final long serialVersionUID = 1L;
public String command = null;
public User user = null;
public String message = null;
public String role = null;
public String resource = null;
public String uid = null;
public PermissionException(String command, User user, String message, String role, String resource, String uid) {
super(message);
this.command = command;
this.user = user;
this.message = message;
this.role = role;
this.resource = resource;
this.uid = uid;
}
public PermissionException(String command, User user, String message, String role, String resource, UUID uid) {
super(message);
this.command = command;
this.user = user;
this.message = message;
this.role = role;
this.resource = resource;
this.uid = uid.toString();
}
public PermissionException(String command, User user, String message, String role) {
super(message);
this.command = command;
this.user = user;
this.message = message;
this.role = role;
}
public String getCommand() {
return command;
}
public User getUser() {
return user;
}
public String getMessage() {
return message;
}
public String getRole() {
return role;
}
public String getResource() {
return resource;
}
public String getUid() {
return uid;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy