public void execute(UserAdminSession userAdminSession) throws ApprovalRequestExecutionException {
log.debug("Executing AddEndEntity for user:" + userdata.getUsername());
try{
userAdminSession.addUser(getRequestAdmin(), userdata, clearpwd);
} catch( PersistenceException e){
throw new ApprovalRequestExecutionException("Error, user already exists or a database error ocurred", e);
} catch (AuthorizationDeniedException e) {
throw new ApprovalRequestExecutionException("Authorization Denied :" + e.getMessage(), e);
} catch (UserDoesntFullfillEndEntityProfile e) {
throw new ApprovalRequestExecutionException("User Doesn't fullfil end entity profile :" + e.getMessage() + e.getMessage(), e);
} catch (ApprovalException e) {
throw new EJBException("This should never happen",e);
} catch (WaitingForApprovalException e) {
throw new EJBException("This should never happen",e);
} catch (CADoesntExistsException e) {
throw new ApprovalRequestExecutionException("CA does not exist :" + e.getMessage(), e);
} catch (EjbcaException e){
throw new ApprovalRequestExecutionException("Failed adding user :" + e.getErrorCode() + e.getMessage(), e);
}
}