Class AuthorizationException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DocumentAuthorizationException, DocumentTypeAuthorizationException

public class AuthorizationException extends KualiException
Represents an exception that is thrown when a given user is not authorized to take the given action on the given target type
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

    • userId

      protected final String userId
    • action

      protected final String action
    • targetType

      protected final String targetType
    • additionalDetails

      protected final Map<String,Object> additionalDetails
  • Constructor Details

    • AuthorizationException

      public AuthorizationException(String userId, String action, String targetType)
    • AuthorizationException

      public AuthorizationException(String userId, String action, String targetType, Map<String,Object> additionalDetails)
      Constructs a exception with a message from the passed in information.
      Parameters:
      userId - the userid of the user who failed authorization
      action - the action the user was trying to take
      targetType - what the user was trying to take action on
      additionalDetails - additional details about the authorization failure to be passed in and added to the exception message (ex: permission name, qualifiers, etc.)
    • AuthorizationException

      public AuthorizationException(String userId, String action, String targetType, String message, Map<String,Object> additionalDetails)
      Allows you to construct the exception message manually
  • Method Details

    • getUserId

      public String getUserId()
    • getAction

      public String getAction()
    • getTargetType

      public String getTargetType()
    • getAdditionalDetails

      public Map<String,Object> getAdditionalDetails()
    • getErrorMessageKey

      @Deprecated public String getErrorMessageKey()
      Deprecated.
      Returns:
      message key used by Struts to select the error message to be displayed