Class MismatchedRoleException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- pro.taskana.common.api.exceptions.TaskanaException
-
- pro.taskana.common.api.exceptions.NotAuthorizedException
-
- pro.taskana.common.api.exceptions.MismatchedRoleException
-
- All Implemented Interfaces:
Serializable
public class MismatchedRoleException extends NotAuthorizedException
This exception is thrown when the current user is not in a certain role it is supposed to be.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MismatchedRoleException(String currentUserId, TaskanaRole... roles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCurrentUserId()TaskanaRole[]getRoles()StringtoString()-
Methods inherited from class pro.taskana.common.api.exceptions.TaskanaException
getErrorCode
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
ERROR_KEY
public static final String ERROR_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MismatchedRoleException
public MismatchedRoleException(String currentUserId, TaskanaRole... roles)
-
-
Method Detail
-
getRoles
public TaskanaRole[] getRoles()
-
getCurrentUserId
public String getCurrentUserId()
-
toString
public String toString()
- Overrides:
toStringin classNotAuthorizedException
-
-