use of com.cloud.server.ResourceIcon in project cloudstack by apache.
the class ListUsersCmd method updateUserResponse.
private void updateUserResponse(List<UserResponse> response) {
for (UserResponse userResponse : response) {
ResourceIcon resourceIcon = resourceIconManager.getByResourceTypeAndUuid(ResourceTag.ResourceObjectType.User, userResponse.getObjectId());
if (resourceIcon == null) {
resourceIcon = resourceIconManager.getByResourceTypeAndUuid(ResourceTag.ResourceObjectType.Account, userResponse.getAccountId());
if (resourceIcon == null) {
continue;
}
}
ResourceIconResponse iconResponse = _responseGenerator.createResourceIconResponse(resourceIcon);
userResponse.setResourceIconResponse(iconResponse);
}
}
use of com.cloud.server.ResourceIcon in project cloudstack by apache.
the class ListAccountsCmd method updateAccountResponse.
private void updateAccountResponse(List<AccountResponse> response) {
for (AccountResponse accountResponse : response) {
ResourceIcon resourceIcon = resourceIconManager.getByResourceTypeAndUuid(ResourceTag.ResourceObjectType.Account, accountResponse.getObjectId());
if (resourceIcon == null) {
continue;
}
ResourceIconResponse iconResponse = _responseGenerator.createResourceIconResponse(resourceIcon);
accountResponse.setResourceIconResponse(iconResponse);
}
}
use of com.cloud.server.ResourceIcon in project cloudstack by apache.
the class ListProjectsCmd method updateProjectResponse.
private void updateProjectResponse(List<ProjectResponse> response) {
for (ProjectResponse projectResponse : response) {
ResourceIcon resourceIcon = resourceIconManager.getByResourceTypeAndUuid(ResourceTag.ResourceObjectType.Project, projectResponse.getId());
if (resourceIcon == null) {
continue;
}
ResourceIconResponse iconResponse = _responseGenerator.createResourceIconResponse(resourceIcon);
projectResponse.setResourceIconResponse(iconResponse);
}
}
use of com.cloud.server.ResourceIcon in project cloudstack by apache.
the class ListIsosCmd method updateIsoResponse.
private void updateIsoResponse(List<TemplateResponse> response) {
for (TemplateResponse templateResponse : response) {
ResourceIcon resourceIcon = resourceIconManager.getByResourceTypeAndUuid(ResourceTag.ResourceObjectType.ISO, templateResponse.getId());
if (resourceIcon == null) {
continue;
}
ResourceIconResponse iconResponse = _responseGenerator.createResourceIconResponse(resourceIcon);
templateResponse.setResourceIconResponse(iconResponse);
}
}
use of com.cloud.server.ResourceIcon in project cloudstack by apache.
the class ListTemplatesCmd method updateTemplateResponse.
private void updateTemplateResponse(List<TemplateResponse> response) {
for (TemplateResponse templateResponse : response) {
ResourceIcon resourceIcon = resourceIconManager.getByResourceTypeAndUuid(ResourceTag.ResourceObjectType.Template, templateResponse.getId());
if (resourceIcon == null) {
continue;
}
ResourceIconResponse iconResponse = _responseGenerator.createResourceIconResponse(resourceIcon);
templateResponse.setResourceIconResponse(iconResponse);
}
}
Aggregations