kaos.policy.guard
Class KAoSActionFailureException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by kaos.policy.guard.KAoSActionFailureException
All Implemented Interfaces:
java.io.Serializable

public class KAoSActionFailureException
extends java.lang.Exception

KAoSActionFailureException defines an exception to be thrown by a KAoS agent in case its attempt to perform certain action fails

See Also:
Serialized Form

Field Summary
 ActionInstanceDescription failedAction
          Decription of the action, which failed
 KAoSSecurityException myKAoSSecurityException
          Reference to the nested KAoSSecurityException, if present
 KAoSActionFailureException nestedKAoSActionFailureException
          Reference to the nested KAoSActionFailureException, if present
 java.util.List succeededAction
          List of subaction descriptions (as Action Instance Description), which were perfomed correctly until the failed action
 
Constructor Summary
KAoSActionFailureException()
          Constructs a new KAoSActionFailureException with no detail message.
KAoSActionFailureException(KAoSSecurityException currentKAoSSecurityException, ActionInstanceDescription currentfailedAction)
          Constructs a new KAoSActionFailureException with a detail message.
KAoSActionFailureException(java.lang.String s)
          Constructs a new KAoSActionFailureException with a detail message.
 
Method Summary
 ActionInstanceDescription getFirstFailedAction()
          Traverses the nested KAoSActionFailureException(s) and returns the description of the most nested action, which failed
 java.lang.String getForbiddingPolicy()
          Traverses the nested KAoSActionFailureException(s) and returns the forbidding policy id, if such exists
 
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

myKAoSSecurityException

public KAoSSecurityException myKAoSSecurityException
Reference to the nested KAoSSecurityException, if present


nestedKAoSActionFailureException

public KAoSActionFailureException nestedKAoSActionFailureException
Reference to the nested KAoSActionFailureException, if present


failedAction

public ActionInstanceDescription failedAction
Decription of the action, which failed


succeededAction

public java.util.List succeededAction
List of subaction descriptions (as Action Instance Description), which were perfomed correctly until the failed action

Constructor Detail

KAoSActionFailureException

public KAoSActionFailureException()
Constructs a new KAoSActionFailureException with no detail message.


KAoSActionFailureException

public KAoSActionFailureException(java.lang.String s)
Constructs a new KAoSActionFailureException with a detail message. A detail message is a String that describes the exception.


KAoSActionFailureException

public KAoSActionFailureException(KAoSSecurityException currentKAoSSecurityException,
                                  ActionInstanceDescription currentfailedAction)
Constructs a new KAoSActionFailureException with a detail message.

Parameters:
currentKAoSSecurityException - - reference to the security exception
currentfailedAction - - reference to the description of action, which failed
Method Detail

getForbiddingPolicy

public java.lang.String getForbiddingPolicy()
Traverses the nested KAoSActionFailureException(s) and returns the forbidding policy id, if such exists

Returns:
id of the policy forbiding the action or null if there is no such policy

getFirstFailedAction

public ActionInstanceDescription getFirstFailedAction()
Traverses the nested KAoSActionFailureException(s) and returns the description of the most nested action, which failed

Returns:
ActionInstanceDescription