return EventTypes.EVENT_VPN_USER_ADD;
}
@Override
public void execute(){
VpnUser vpnUser = _entityMgr.findById(VpnUser.class, getEntityId());
Account account = _entityMgr.findById(Account.class, vpnUser.getAccountId());
if (!_ravService.applyVpnUsers(vpnUser.getAccountId(), userName)) {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to add vpn user");
}
VpnUsersResponse vpnResponse = new VpnUsersResponse();
vpnResponse.setId(vpnUser.getId());
vpnResponse.setUserName(vpnUser.getUsername());
vpnResponse.setAccountName(account.getAccountName());
vpnResponse.setDomainId(account.getDomainId());
vpnResponse.setDomainName(_entityMgr.findById(Domain.class, account.getDomainId()).getName());