public void __setStatus(String resource, int priority, byte index, String statusText) { if (StatusInfo.STATUS_OFFLINE == index) { resource = StringUtils.notNull(resource); if (resource.equals(currentResource)) { currentResource = null; } removeSubContact(resource); if (0 == subContacts.size()) { setOfflineStatus(); } } else { SubContact c = getSubContact(resource); c.priority = (byte) Math.min(127, Math.max(priority, -127)); c.status = index; c.statusText = statusText; } }
public static String xmlEscape(String text) { text = StringUtils.notNull(text); return Util.replace(text, unescapedChars, escapedChars, "\"'><&"); }
public static String notUrls(String str) { str = StringUtils.notNull(str); return (-1 != str.indexOf("http://")) ? "" : str; }
private String getSubContactRealJid(String resource) { SubContact c = getExistSubContact(resource); return StringUtils.notNull((null == c) ? null : c.realJid); }