if (getGroupsString() == null) { List groups = intercom.getGroupsAsList(); if (groups != null && groups.size() > 0) { String groupsString = getSettingDao().getGroupsAsString(groups); setGroupsString(groupsString); } }
    public void pageBeginRender(PageEvent event) {        // Look up the Intercom, creating it if necessary        Intercom intercom = getIntercom();        if (intercom == null) {            intercom = getIntercomManager().getIntercom();            if (intercom == null) {                throw new RuntimeException("Internal error in IntercomPage: null Intercom object");            }            setIntercom(intercom);        }                // Create a random code if no code has been set        String code = intercom.getCode();        if (code == null) {            intercom.setCode(RandomStringUtils.randomAlphanumeric(CODE_LEN));        }    }