org.camunda.bpm.engine
Class AuthorizationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.camunda.bpm.engine.ProcessEngineException
                  extended by org.camunda.bpm.engine.AuthorizationException
All Implemented Interfaces:
Serializable

public class AuthorizationException
extends ProcessEngineException

Exception thrown by the process engine in case a user tries to interact with a resource in an unauthorized way.

The exception contains a list of Missing authorizations. The List is a disjunction i.e. a user should have any of the authorization for the engine to continue the execution beyond the point where it failed.

Author:
Daniel Meyer
See Also:
Serialized Form

Field Summary
protected  List<MissingAuthorization> missingAuthorizations
           
protected  String permissionName
          Deprecated. 
protected  String resourceId
          Deprecated. 
protected  String resourceType
          Deprecated. 
protected  String userId
           
 
Constructor Summary
AuthorizationException(String message)
           
AuthorizationException(String userId, List<MissingAuthorization> info)
           
AuthorizationException(String userId, MissingAuthorization exceptionInfo)
           
AuthorizationException(String userId, String permissionName, String resourceType, String resourceId)
           
 
Method Summary
 List<MissingAuthorization> getMissingAuthorizations()
           
 String getResourceId()
          Deprecated. Use getMissingAuthorizations() to get the id of the resource of the MissingAuthorization(s). This method may be removed in future versions.
 String getResourceType()
          Deprecated. Use getMissingAuthorizations() to get the type of the resource of the MissingAuthorization(s). This method may be removed in future versions.
 String getUserId()
           
 String getViolatedPermissionName()
          Deprecated. Use getMissingAuthorizations() to get the violated permission name of the MissingAuthorization(s). This method may be removed in future versions.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

userId

protected final String userId

missingAuthorizations

protected final List<MissingAuthorization> missingAuthorizations

resourceType

@Deprecated
protected String resourceType
Deprecated. 

permissionName

@Deprecated
protected String permissionName
Deprecated. 

resourceId

@Deprecated
protected String resourceId
Deprecated. 
Constructor Detail

AuthorizationException

public AuthorizationException(String message)

AuthorizationException

public AuthorizationException(String userId,
                              String permissionName,
                              String resourceType,
                              String resourceId)

AuthorizationException

public AuthorizationException(String userId,
                              MissingAuthorization exceptionInfo)

AuthorizationException

public AuthorizationException(String userId,
                              List<MissingAuthorization> info)
Method Detail

getResourceType

@Deprecated
public String getResourceType()
Deprecated. Use getMissingAuthorizations() to get the type of the resource of the MissingAuthorization(s). This method may be removed in future versions.

Returns:
the type of the resource if there is only one MissingAuthorization, null otherwise

getViolatedPermissionName

@Deprecated
public String getViolatedPermissionName()
Deprecated. Use getMissingAuthorizations() to get the violated permission name of the MissingAuthorization(s). This method may be removed in future versions.

Returns:
the type of the violated permission name if there is only one MissingAuthorization, null otherwise

getUserId

public String getUserId()
Returns:
id of the user in which context the request was made and who misses authorizations to perform it successfully

getResourceId

@Deprecated
public String getResourceId()
Deprecated. Use getMissingAuthorizations() to get the id of the resource of the MissingAuthorization(s). This method may be removed in future versions.

Returns:
the id of the resource if there is only one MissingAuthorization, null otherwise

getMissingAuthorizations

public List<MissingAuthorization> getMissingAuthorizations()
Returns:
Disjunctive list of MissingAuthorization from which a user needs to have at least one for the authorization to pass


Copyright © 2015 camunda services GmbH. All rights reserved.