/** * TurbineUserクラスをもとに作った社内アドレスのResultDataを返します。 * * @param record * @param strLength 表示文字数 * @return */ public static AddressBookResultData getCorpResultData(TurbineUser record, int strLength) { AddressBookResultData rd = new AddressBookResultData(); rd.initField(); rd.setAddressId(record.getUserId().intValue()); rd.setName( ALCommonUtils.compressString( new StringBuffer() .append(record.getLastName()) .append(" ") .append(record.getFirstName()) .toString(), strLength)); if (record.getCompanyId().intValue() > 0) { rd.setCompanyName( ALCommonUtils.compressString( ALEipUtils.getCompanyName(record.getCompanyId().intValue()), strLength)); } rd.setPostList( compressString(AddressBookUtils.getPostBeanList(record.getUserId().intValue()), strLength)); if (record.getPositionId().intValue() > 0) { rd.setPositionName( ALCommonUtils.compressString( ALEipUtils.getPositionName(record.getPositionId()), strLength)); } rd.setEmail(ALCommonUtils.compressString(record.getEmail(), strLength)); rd.setTelephone(record.getOutTelephone()); rd.setCellularPhone(record.getCellularPhone()); rd.setCellularMail(record.getCellularMail()); rd.setInTelephone(record.getInTelephone()); return rd; }
/** * @param obj * @return */ @Override protected Object getResultData(TurbineUser obj) { try { return AddressBookUtils.getCorpResultData(obj, getStrLength()); } catch (Exception ex) { logger.error("AddressBookCorpWordSelectData.getResultData", ex); return null; } }
/** * @param rundata * @param context */ @Override public void loadGroups(RunData rundata, Context context) { groupList = AddressBookUtils.getMyGroups(rundata); try { // マイグループリストの作成 List<ALEipGroup> myGroups = ALEipUtils.getMyGroups(rundata); myGroupList = new ArrayList<ALEipGroup>(); int length = myGroups.size(); for (int i = 0; i < length; i++) { myGroupList.add(myGroups.get(i)); } } catch (Exception ex) { logger.error("AddressBookCorpWordSelectData.loadGroups", ex); } }