private Verse _getVerse(PortletPreferences preferences, Locale locale) { Bible bible = _getBible(preferences, locale); int i = Randomizer.getInstance().nextInt(_verses.size()); return _getVerse(_verses.get(i), bible.getVersionId(), bible.getLanguage()); }
public String getValue(String name, Map<String, String> userInfo) { if (name == null) { return null; } if (_log.isDebugEnabled()) { String companyId = userInfo.get(UserAttributes.LIFERAY_COMPANY_ID); String userId = userInfo.get(UserAttributes.LIFERAY_USER_ID); _log.debug("Company id " + companyId); _log.debug("User id " + userId); } if (name.equals("user.name.random")) { String[] names = new String[] {"Aaa", "Bbb", "Ccc"}; return names[Randomizer.getInstance().nextInt(3)]; } else { return null; } }