private void updateActionStatus(final Message message){
  final ActionUpdateStatus actionUpdateStatus=convertMessage(message,ActionUpdateStatus.class);
  final Action action=checkActionExist(message,actionUpdateStatus);
  final ActionStatus actionStatus=createActionStatus(message,actionUpdateStatus,action);
  updateLastPollTime(action.getTarget());
switch (actionUpdateStatus.getActionStatus()) {
case DOWNLOAD:
    actionStatus.setStatus(Status.DOWNLOAD);
  break;
case RETRIEVED:
actionStatus.setStatus(Status.RETRIEVED);
break;
case RUNNING:
actionStatus.setStatus(Status.RUNNING);
break;
case CANCELED:
actionStatus.setStatus(Status.CANCELED);
break;
case FINISHED:
actionStatus.setStatus(Status.FINISHED);
break;
case ERROR:
actionStatus.setStatus(Status.ERROR);
break;
case WARNING:
actionStatus.setStatus(Status.WARNING);
break;
case CANCEL_REJECTED:
handleCancelRejected(message,action,actionStatus);
break;
default :
logAndThrowMessageError(message,"Status for action does not exisit.");
}
final Action addUpdateActionStatus=getUpdateActionStatus(actionStatus);
if (!addUpdateActionStatus.isActive()) {
lookIfUpdateAvailable(action.getTarget());
}
}

private void updateActionStatus ( final Message message ) { final ActionUpdateStatus actionUpdateStatus = convertMessage ( message , ActionUpdateStatus . class ) ; final Action action = checkActionExist ( message , actionUpdateStatus ) ; final ActionStatus actionStatus = createActionStatus ( message , actionUpdateStatus , action ) ; updateLastPollTime ( action . getTarget ( ) ) ; switch ( actionUpdateStatus . getActionStatus ( ) ) { case DOWNLOAD : actionStatus . setStatus ( Status . DOWNLOAD ) ; break ; case RETRIEVED : actionStatus . setStatus ( Status . RETRIEVED ) ; break ; case RUNNING : actionStatus . setStatus ( Status . RUNNING ) ; break ; case CANCELED : actionStatus . setStatus ( Status . CANCELED ) ; break ; case FINISHED : actionStatus . setStatus ( Status . FINISHED ) ; break ; case ERROR : actionStatus . setStatus ( Status . ERROR ) ; break ; case WARNING : actionStatus . setStatus ( Status . WARNING ) ; break ; case CANCEL_REJECTED : handleCancelRejected ( message , action , actionStatus ) ; break ; default : logAndThrowMessageError ( message , "Status for action does not exisit." ) ; } final Action addUpdateActionStatus = getUpdateActionStatus ( actionStatus ) ; if ( ! addUpdateActionStatus . isActive ( ) ) { lookIfUpdateAvailable ( action . getTarget ( ) ) ; } }
method to update the action status of an action through the event .
