Ejemplo n.º 1
0
  /**
   * 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;
  }
Ejemplo n.º 2
0
  /**
   * @param map
   * @return
   */
  @Override
  protected Object getResultData(EipTNoteMap map) {
    try {
      EipTNote record = map.getEipTNote();

      NoteClientResultData rd = new NoteClientResultData();
      rd.initField();
      rd.setNoteId(record.getNoteId().intValue());
      rd.setClientName(ALCommonUtils.compressString(record.getClientName(), getStrLength()));
      rd.setCompanyName(ALCommonUtils.compressString(record.getCompanyName(), getStrLength()));
      rd.setNoteStat(map.getNoteStat());
      rd.setAcceptDate(record.getAcceptDate());

      String subject = "";
      if (record.getSubjectType().equals("0")) {
        subject = ALCommonUtils.compressString(record.getCustomSubject(), getStrLength());
      } else if (record.getSubjectType().equals("1")) {
        subject = ALLocalizationUtils.getl10n("NOTE_CALL_AGAIN_NO_PERIOD");
      } else if (record.getSubjectType().equals("2")) {
        subject = ALLocalizationUtils.getl10n("NOTE_MAIL_CALL_BACK");
      } else if (record.getSubjectType().equals("3")) {
        subject = ALLocalizationUtils.getl10n("NOTE_MAIL_TELL_ME");
      } else if (record.getSubjectType().equals("4")) {
        subject = ALLocalizationUtils.getl10n("NOTE_MAIL_TAKE_A_MESSAGE");
      }

      rd.setSubject(subject);

      if (NoteUtils.NOTE_STAT_NEW.equals(map.getNoteStat())) {
        rd.setNoteStat(NoteUtils.NOTE_STAT_NEW);
        rd.setNoteStatImage("images/note/note_new_message.gif");
        rd.setNoteStatImageDescription(ALLocalizationUtils.getl10n("NOTE_NEW_MESSAGE"));
      } else if (NoteUtils.NOTE_STAT_UNREAD.equals(map.getNoteStat())) {
        rd.setNoteStat(NoteUtils.NOTE_STAT_UNREAD);
        rd.setNoteStatImage("images/note/note_unread_message.gif");
        rd.setNoteStatImageDescription(ALLocalizationUtils.getl10n("NOTE_UNREAD_MESSAGE"));
      } else {
        rd.setNoteStat(NoteUtils.NOTE_STAT_READ);
        rd.setNoteStatImage("images/note/note_read_message.gif");
        rd.setNoteStatImageDescription(ALLocalizationUtils.getl10n("NOTE_READ_MESSAGE"));
      }

      ALEipUser user = ALEipUtils.getALEipUser(Integer.valueOf(record.getOwnerId()).intValue());
      rd.setSrcUserId(record.getOwnerId());
      rd.setSrcUserFullName(user.getAliasName().getValue());

      return rd;
    } catch (RuntimeException e) {
      logger.error("note", e);
      return null;
    } catch (Exception ex) {
      logger.error("note", ex);
      return null;
    }
  }
Ejemplo n.º 3
0
 public static List<AddressBookUserGroupLiteBean> compressString(
     List<AddressBookUserGroupLiteBean> list, int length) {
   for (AddressBookUserGroupLiteBean bean : list) {
     bean.setName(ALCommonUtils.compressString(bean.getName(), length));
   }
   return list;
 }
Ejemplo n.º 4
0
 /**
  * ResultDataを取得します。(一覧データ) <br>
  *
  * @param obj
  * @return
  */
 @Override
 protected Object getResultData(EipTCommonCategory obj) {
   EipTCommonCategory record = obj;
   CommonCategoryResultData rd = new CommonCategoryResultData();
   rd.initField();
   rd.setCommonCategoryId(record.getCommonCategoryId().longValue());
   rd.setName(ALCommonUtils.compressString(record.getName(), getStrLength()));
   rd.setCreateUserId(record.getCreateUserId().longValue());
   return rd;
 }
Ejemplo n.º 5
0
 public String getPlaceHtml() {
   return ALCommonUtils.replaceToAutoCR(place.toString());
 }
Ejemplo n.º 6
0
 public String getAliasNameHtml() {
   return ALCommonUtils.replaceToAutoCR(alias_name.toString());
 }
Ejemplo n.º 7
0
 public String getWbrName() {
   return ALCommonUtils.replaceToAutoCR(name.toString());
 }
Ejemplo n.º 8
0
 public String getParentNameHtml() {
   return ALCommonUtils.replaceToAutoCR(parent_name.toString());
 }