org.apache.beehive.netui.pageflow
Class UnfulfilledRolesException

Object
  extended by Throwable
      extended by Exception
          extended by RuntimeException
              extended by PageFlowManagedObjectException
                  extended by PageFlowException
                      extended by UnfulfilledRolesException
All Implemented Interfaces:
Serializable, ResponseErrorCodeSender

public class UnfulfilledRolesException
extends PageFlowException
implements ResponseErrorCodeSender

Exception that is thrown when rolesAllowed is set on the current action's annotation (@Jpf.Action or @Jpf.SimpleAction), and there is a logged-in user who does not fulfil any of the given roles.

See Also:
Serialized Form

Constructor Summary
UnfulfilledRolesException(String[] roleNames, String rolesList, String actionName, FlowController fc)
          Construct on the list of roles that were allowed access to the action.
 
Method Summary
 boolean causeMayBeSessionExpiration()
          Tell whether the root cause may be session expiration in cases where the requested session ID is different than the actual session ID.
protected  Object[] getMessageArgs()
           
 String[] getMessageParts()
           
 String[] getRoleNames()
          Get the names of the roles that were allowed access to the action.
 void sendResponseErrorCode(HttpServletResponse response)
           
 
Methods inherited from class PageFlowException
getActionName, getFlowController, getFlowControllerURI, init
 
Methods inherited from class PageFlowManagedObjectException
getLocalizedMessage, getManagedObject, getMessage, init, printError, sendError, setManagedObject
 
Methods inherited from class Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnfulfilledRolesException

public UnfulfilledRolesException(String[] roleNames,
                                 String rolesList,
                                 String actionName,
                                 FlowController fc)
Construct on the list of roles that were allowed access to the action.

Parameters:
roleNames - an array of String role names.
Method Detail

getRoleNames

public String[] getRoleNames()
Get the names of the roles that were allowed access to the action.

Returns:
an array of String role names.

getMessageArgs

protected Object[] getMessageArgs()
Specified by:
getMessageArgs in class PageFlowManagedObjectException

getMessageParts

public String[] getMessageParts()
Specified by:
getMessageParts in class PageFlowManagedObjectException

sendResponseErrorCode

public void sendResponseErrorCode(HttpServletResponse response)
                           throws IOException
Specified by:
sendResponseErrorCode in interface ResponseErrorCodeSender
Throws:
IOException

causeMayBeSessionExpiration

public boolean causeMayBeSessionExpiration()
Tell whether the root cause may be session expiration in cases where the requested session ID is different than the actual session ID. In this case, the answer is true.

Specified by:
causeMayBeSessionExpiration in class PageFlowException