/** * 软件详情 * * @param soft_id * @return * @throws AppException */ public Software getSoftware(String ident, boolean isRefresh) throws AppException { Software soft = null; String key = "software_" + (URLEncoder.encode(ident)); if (isNetworkConnected() && (isCacheDataFailure(key) || isRefresh)) { try { soft = ApiClient.getSoftwareDetail(this, ident); if (soft != null) { Notice notice = soft.getNotice(); soft.setNotice(null); soft.setCacheKey(key); saveObject(soft, key); soft.setNotice(notice); } } catch (AppException e) { soft = (Software) readObject(key); if (soft == null) throw e; } } else { soft = (Software) readObject(key); if (soft == null) soft = new Software(); } return soft; }