org.apache.myfaces.extensions.cdi.core.api.security
Class AccessDeniedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.SecurityException
org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException
- All Implemented Interfaces:
- Serializable
public class AccessDeniedException
- extends SecurityException
Exception occurs in case of a security-violation.
It's aware of the reason for the violation as well as the error-view which should be used to display the restriction.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
AccessDeniedException
public AccessDeniedException(Set<SecurityViolation> violations,
Class<? extends ViewConfig> errorView)
- Constructor for creating the exception for the given violations and error-view
- Parameters:
violations
- current violationserrorView
- optional inline error-view
getViolations
public Set<SecurityViolation> getViolations()
- All
SecurityViolation
which were found by a AccessDecisionVoter
- Returns:
- all security-violations
getErrorView
public Class<? extends ViewConfig> getErrorView()
- Optional page which should be used as error-page
- Returns:
- type-safe view-config which is mapped to an error-view.
Returning null would force the navigation to the default error-view.
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.