public class BlogAccessException extends AuthorizationException
Constructor and Description |
---|
BlogAccessException(String message,
Long blogId,
BlogRole requiredRole,
BlogRole userRole)
Constructs a new instance of BlogAccessException
|
BlogAccessException(String message,
long blogId,
Permission<Blog> permission)
Constructor.
|
BlogAccessException(String message,
Throwable throwable,
Long blogId,
BlogRole requiredRole,
BlogRole userRole)
Constructs a new instance of BlogAccessException
|
Modifier and Type | Method and Description |
---|---|
Long |
getBlogId()
ID of the blog for which the access is not granted
|
Permission<Blog> |
getPermission() |
BlogRole |
getRequiredRole()
the role which is required but the member did not have
|
BlogRole |
getUserRole()
the role the user had
|
void |
setBlogId(Long blogId) |
void |
setPermission(Permission<Blog> permission) |
void |
setRequiredRole(BlogRole requiredRole) |
void |
setUserRole(BlogRole userRole) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public BlogAccessException(String message, long blogId, Permission<Blog> permission)
message
- The message.blogId
- The blogs id.permission
- The missing permission.public BlogAccessException(String message, Long blogId, BlogRole requiredRole, BlogRole userRole)
message
- The message.blogId
- The blogId.requiredRole
- The required role.userRole
- The users role.public Long getBlogId()
ID of the blog for which the access is not granted
public Permission<Blog> getPermission()
public BlogRole getRequiredRole()
the role which is required but the member did not have
public BlogRole getUserRole()
the role the user had
public void setBlogId(Long blogId)
public void setPermission(Permission<Blog> permission)
permission
- the permission to setpublic void setRequiredRole(BlogRole requiredRole)
public void setUserRole(BlogRole userRole)
Copyright © 2019 Communote team. All rights reserved.