return resource;
}
@Override
public ListGridRecord copyValues(Resource from) {
ListGridRecord record = new ListGridRecord();
record.setAttribute("resource", from);
record.setAttribute("id", from.getId());
record.setAttribute("uuid", from.getUuid());
record.setAttribute(NAME.propertyName(), from.getName());
record.setAttribute(KEY.propertyName(), from.getResourceKey());
record.setAttribute(DESCRIPTION.propertyName(), from.getDescription());
record.setAttribute(LOCATION.propertyName(), from.getLocation());
record.setAttribute(TYPE.propertyName(), from.getResourceType().getId());
record.setAttribute(PLUGIN.propertyName(), from.getResourceType().getPlugin());
record.setAttribute(VERSION.propertyName(), from.getVersion());
record.setAttribute(CATEGORY.propertyName(), from.getResourceType().getCategory().name());
record.setAttribute("icon", ImageManager.getResourceIcon(from.getResourceType().getCategory(), from
.getCurrentAvailability().getAvailabilityType()));
record.setAttribute(AVAILABILITY.propertyName(),
ImageManager.getAvailabilityIconFromAvailType(from.getCurrentAvailability().getAvailabilityType()));
record.setAttribute(CTIME.propertyName(), from.getCtime());
record.setAttribute(ITIME.propertyName(), from.getItime());
record.setAttribute(MTIME.propertyName(), from.getMtime());
record.setAttribute(MODIFIER.propertyName(), from.getModifiedBy());
record.setAttribute(INVENTORY_STATUS.propertyName(), from.getInventoryStatus().name());
record.setAttribute(AncestryUtil.RESOURCE_ANCESTRY, from.getAncestry());
record.setAttribute(AncestryUtil.RESOURCE_TYPE_ID, from.getResourceType().getId());
return record;
}