Class AccessDeniedException

All Implemented Interfaces:
Serializable

public class AccessDeniedException extends RuntimeException
Exception that is raised on attempt to violate a security constraint.

You can throw this exception in application code if you want a standard notification about "access denied" to be shown to the user and the event to be logged.

See Also:
  • Constructor Details

    • AccessDeniedException

      public AccessDeniedException(String type, String resource)
      Constructor.
      Parameters:
      resource - permission target object, e.g. a screen id or entity operation name. When throwing the exception in application code, can be any string suitable to describe the situation in the log.
      type - permission type
    • AccessDeniedException

      public AccessDeniedException(String type, String resource, @Nullable String action)
      Constructor.
      Parameters:
      resource - permission target object, e.g. a screen id or entity operation name. When throwing the exception in application code, can be any string suitable to describe the situation in the log.
      type - permission type
      action - type of operation on resource
  • Method Details

    • getType

      public String getType()
    • getResource

      public String getResource()
    • getAction

      public String getAction()