@Override public List<RequestedHost> getRequests() { List<RequestedHost> requests = Lists.newArrayList(); requests.addAll(requestDataService.getAll()); return requests; }
protected void checkManagement(RequestedHost requestedHost) { try { if (requestedHost.getStatus() == ResourceHostRegistrationStatus.REQUESTED && containsManagementContainer(requestedHost.getHostInfos())) { boolean managementAlreadyApproved = false; for (RequestedHostImpl requestedHostImpl : requestDataService.getAll()) { if (requestedHostImpl.getStatus() == ResourceHostRegistrationStatus.APPROVED && containsManagementContainer(requestedHostImpl.getHostInfos())) { managementAlreadyApproved = true; break; } } if (!managementAlreadyApproved) { approveRequest(requestedHost.getId()); } } } catch (Exception e) { // ignore } }