Пример #1
0
  /**
   * セッションで指定されたアドレスIDを持つアドレス情報を取得する。
   *
   * @param rundata
   * @param context
   * @return
   */
  public static EipMAddressbook getEipMAddressbook(RunData rundata, Context context) {
    // セッションから指定された アドレスID を取得
    String addressid = ALEipUtils.getTemp(rundata, context, ALEipConstants.ENTITY_ID);
    try {
      if (addressid == null || Integer.valueOf(addressid) == null) {
        logger.debug("[AddressBook] Address ID...");
        return null;
      }

      SelectQuery<EipMAddressbook> query = Database.query(EipMAddressbook.class);
      Expression exp11 =
          ExpressionFactory.matchDbExp(
              EipMAddressbook.ADDRESS_ID_PK_COLUMN, Integer.valueOf(addressid));
      query.setQualifier(exp11);

      Expression exp21 = ExpressionFactory.matchExp(EipMAddressbook.PUBLIC_FLAG_PROPERTY, "T");
      Expression exp22 =
          ExpressionFactory.matchExp(
              EipMAddressbook.OWNER_ID_PROPERTY, ALEipUtils.getUserId(rundata));
      Expression exp23 = ExpressionFactory.matchExp(EipMAddressbook.PUBLIC_FLAG_PROPERTY, "F");
      query.andQualifier(exp21.orExp(exp22.andExp(exp23)));

      List<EipMAddressbook> addresses = query.fetchList();

      if (addresses == null || addresses.size() == 0) {
        logger.debug("[AddressBook] Not found Address ID...");
        return null;
      }
      return addresses.get(0);
    } catch (Exception ex) {
      logger.error("AddressBookUtils.getEipMAddressbook", ex);
      return null;
    }
  }
Пример #2
0
  /**
   * @param rundata
   * @param context
   * @param msgList
   * @return
   * @throws ALPageNotFoundException
   * @throws ALDBErrorException
   */
  @Override
  protected boolean setFormData(RunData rundata, Context context, List<String> msgList)
      throws ALPageNotFoundException, ALDBErrorException {
    boolean res = super.setFormData(rundata, context, msgList);
    try {
      if (res) {
        if (ALEipConstants.MODE_UPDATE.equals(getMode())) {
          acl_role_id = ALEipUtils.getTemp(rundata, context, ALEipConstants.ENTITY_ID);
        }

        String[] str = rundata.getParameters().getStrings("member_to");
        if (str != null && str.length > 0) {
          SelectQuery<TurbineUser> query = Database.query(TurbineUser.class);
          Expression exp = ExpressionFactory.inExp(TurbineUser.LOGIN_NAME_PROPERTY, str);
          query.setQualifier(exp);
          memberList.addAll(ALEipUtils.getUsersFromSelectQuery(query));
        }
      }
    } catch (Exception ex) {
      logger.error("AccessControlFormData.setFormData", ex);
      res = false;
    }

    return res;
  }
Пример #3
0
  public static EipMAddressGroup getEipMAddressGroup(RunData rundata, Context context) {
    String groupid = ALEipUtils.getTemp(rundata, context, ALEipConstants.ENTITY_ID);
    try {
      if (groupid == null || Integer.valueOf(groupid) == null) {
        // グループIDが空の場合
        logger.debug("[AddressBook] Group ID...");
        return null;
      }
      SelectQuery<EipMAddressGroup> query = Database.query(EipMAddressGroup.class);
      Expression exp1 =
          ExpressionFactory.matchDbExp(
              EipMAddressGroup.GROUP_ID_PK_COLUMN, Integer.valueOf(groupid));
      query.setQualifier(exp1);
      Expression exp2 =
          ExpressionFactory.matchExp(
              EipMAddressGroup.OWNER_ID_PROPERTY, Integer.valueOf(ALEipUtils.getUserId(rundata)));
      query.andQualifier(exp2);

      List<EipMAddressGroup> groups = query.fetchList();
      if (groups == null || groups.size() == 0) {
        // 指定したカテゴリIDのレコードが見つからない場合
        logger.debug("[AddressBook] Not found Group ID...");
        return null;
      }
      return groups.get(0);
    } catch (Exception ex) {
      logger.error("AddressBookUtils.getEipMAddressGroup", ex);
      return null;
    }
  }
Пример #4
0
  /**
   * フィルタ用の <code>Criteria</code> を構築します。
   *
   * @param crt
   * @param rundata
   * @param context
   * @return
   */
  @Override
  protected SelectQuery<TurbineUser> buildSelectQueryForFilter(
      SelectQuery<TurbineUser> query, RunData rundata, Context context) {
    // 指定部署IDの取得
    String filter = ALEipUtils.getTemp(rundata, context, LIST_FILTER_STR);
    String filter_role = ALEipUtils.getTemp(rundata, context, LIST_FILTER_ROLE_STR);

    // 指定部署が存在しているかを確認し、存在していなければ値を削除する
    Map<Integer, ALEipPost> gMap = ALEipManager.getInstance().getPostMap();
    if (filter != null
        && filter.trim().length() != 0
        && !gMap.containsKey(Integer.valueOf(filter))) {
      filter = null;
    }

    String filter_type = ALEipUtils.getTemp(rundata, context, LIST_FILTER_TYPE_STR);
    String crt_key = null;
    Attributes map = getColumnMap();
    if (filter == null || filter_type == null || filter.equals("")) {
      return query;
    }
    crt_key = map.getValue(filter_type);
    if (crt_key == null) {
      return query;
    }

    Expression exp = ExpressionFactory.matchDbExp(crt_key, filter);
    query.andQualifier(exp);

    currentPost = filter;
    currentRole = filter_role;
    return query;
  }
Пример #5
0
  /**
   * @param rundata
   * @param context
   * @throws Exception
   */
  @Override
  protected void doOutput(RunData rundata, Context context) throws Exception {

    try {
      String portletId = ActivityUtils.getGlobalPortletId(rundata);
      context.put("portletId", ActivityUtils.getGlobalPortletId(rundata));
      Portlet portlet = ALEipUtils.getPortlet(rundata, portletId);
      String desktopNotificationParam =
          portlet.getPortletConfig().getInitParameter("desktopNotification");
      context.put("desktopNotification", "T".equals(desktopNotificationParam));
      String support = rundata.getParameters().getString("s");
      context.put("notifySupport", "1".equals(support));
      String permission = rundata.getParameters().getString("p");
      context.put("notifyPermission", "0".equals(permission) || "granted".equals(permission));

      ActivitySelectData listData = new ActivitySelectData();
      listData.initField();
      listData.setRowsNum(5);
      listData.doViewList(this, rundata, context);
      String layout_template = "portlets/html/ja/ajax-activity-list.vm";
      setTemplate(rundata, context, layout_template);
    } catch (Exception ex) {
      logger.error("ActivityListScreen.doOutput", ex);
      ALEipUtils.redirectDBError(rundata);
    }
  }
Пример #6
0
  /**
   * @param obj
   * @return
   */
  @Override
  protected Object getResultData(TurbineUser record) {
    try {

      AccountResultData rd = new AccountResultData();
      rd.initField();
      rd.setUserId(record.getUserId().intValue());
      rd.setUserName(record.getLoginName());
      rd.setName(
          new StringBuffer()
              .append(record.getLastName())
              .append(" ")
              .append(record.getFirstName())
              .toString());
      rd.setPostNameList(ALEipUtils.getPostNameList(record.getUserId()));
      rd.setPositionName(ALEipUtils.getPositionName(record.getPositionId().intValue()));
      rd.setDisabled(record.getDisabled());
      rd.setHasPhoto("T".equals(record.getHasPhoto()) || "N".equals(record.getHasPhoto()));
      rd.setPhotoModified(record.getPhotoModified().getTime());
      rd.setEmail(record.getEmail());

      return rd;
    } catch (Exception ex) {
      logger.error("AccountUserSelectData.getResultData", ex);
      return null;
    }
  }
Пример #7
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;
  }
Пример #8
0
  /**
   * @param rundata
   * @param context
   * @param msgList
   * @return
   */
  @Override
  protected boolean deleteFormData(RunData rundata, Context context, List<String> msgList) {
    try {
      int index;
      try {
        index = Integer.parseInt(ALEipUtils.getTemp(rundata, context, ALEipConstants.ENTITY_ID));
      } catch (Exception e) {
        return false;
      }

      String currentTab = ALEipUtils.getTemp(rundata, context, "tab");
      int type_mail =
          (WebMailUtils.TAB_RECEIVE.equals(currentTab))
              ? ALFolder.TYPE_RECEIVE
              : ALFolder.TYPE_SEND;
      ALMailHandler handler = ALMailFactoryService.getInstance().getMailHandler();
      ALFolder folder = handler.getALFolder(type_mail, orgId, userId, Integer.valueOf(accountId));
      folder.deleteMail(index);

    } catch (Exception e) {
      logger.error("webmail", e);
      return false;
    }
    return true;
  }
Пример #9
0
 /**
  * 初期化する <br>
  *
  * @param action
  * @param rundata
  * @param context
  */
 @Override
 public void init(ALAction action, RunData rundata, Context context)
     throws ALPageNotFoundException, ALDBErrorException {
   if (ALEipUtils.isMatch(rundata, context)) {
     ALEipUtils.setTemp(
         rundata, context, ALEipConstants.ENTITY_ID, rundata.getUser().getUserName());
   }
 }
Пример #10
0
 /**
  * 入力値を取得する。フォーム値、セッション値の順で取得する。
  *
  * @param rundata Rundata
  * @param context Context
  * @param key フォーム名
  * @return 値
  */
 public static String getParameter(RunData rundata, Context context, String key) {
   String val = rundata.getParameters().getString(key);
   if (val == null) {
     val = ALEipUtils.getTemp(rundata, context, key);
   } else {
     ALEipUtils.setTemp(rundata, context, key, val);
   }
   return val;
 }
  /**
   * @param action
   * @param rundata
   * @param context
   * @throws ALPageNotFoundException
   * @throws ALDBErrorException
   */
  @Override
  public void init(ALAction action, RunData rundata, Context context)
      throws ALPageNotFoundException, ALDBErrorException {
    login_user = ALEipUtils.getALEipUser(rundata);

    groups = ALEipUtils.getMyGroups(rundata);

    // スーパークラスのメソッドを呼び出す。
    super.init(action, rundata, context);
  }
  @Override
  public void init(ALAction action, RunData rundata, Context context)
      throws ALPageNotFoundException, ALDBErrorException {
    super.init(action, rundata, context);

    loginuserid = ALEipUtils.getUserId(rundata);
    viewtype = "detail";

    if (ALEipUtils.isMatch(rundata, context)) {
      if (rundata.getParameters().containsKey("view_date")) {
        view_date = new ALDateTimeField("yyyy-MM-dd");
        String tmpViewDate = rundata.getParameters().getString("view_date");
        view_date.setValue(tmpViewDate);
        if (!view_date.validate(new ArrayList<String>())) {
          view_date = null;
        }
      }
    }

    if (rundata.getParameters().containsKey("userid")) {
      String tmpid = rundata.getParameters().getString("userid");
      if (tmpid != null && tmpid.startsWith(ScheduleUtils.TARGET_FACILITY_ID)) {
        userid =
            Integer.parseInt(
                tmpid.substring(ScheduleUtils.TARGET_FACILITY_ID.length(), tmpid.length()));
        type = ScheduleUtils.SCHEDULEMAP_TYPE_FACILITY;
      } else {
        userid = rundata.getParameters().getInt("userid");
        type = ScheduleUtils.SCHEDULEMAP_TYPE_USER;
      }
    } else if (rundata.getParameters().containsKey("facilityid")) {
      userid = Integer.parseInt(rundata.getParameters().getString("facilityid"));
      type = ScheduleUtils.SCHEDULEMAP_TYPE_FACILITY;
    }

    // アクセス権限
    ALAccessControlFactoryService aclservice =
        (ALAccessControlFactoryService)
            ((TurbineServices) TurbineServices.getInstance())
                .getService(ALAccessControlFactoryService.SERVICE_NAME);
    ALAccessControlHandler aclhandler = aclservice.getAccessControlHandler();

    hasAclviewOther =
        aclhandler.hasAuthority(
            loginuserid,
            ALAccessControlConstants.POERTLET_FEATURE_SCHEDULE_OTHER,
            ALAccessControlConstants.VALUE_ACL_LIST);

    con = new ScheduleOnedayContainer();
    con.initField();
    con.initHour(0, 24);
  }
Пример #13
0
  /**
   * @param rundata
   * @param context
   * @param values
   * @param msgList
   * @return
   * @throws ALPageNotFoundException
   * @throws ALDBErrorException
   */
  @Override
  protected boolean action(
      RunData rundata, Context context, List<String> values, List<String> msgList)
      throws ALPageNotFoundException, ALDBErrorException {
    try {

      Expression exp1 =
          ExpressionFactory.matchExp(
              EipTNoteMap.USER_ID_PROPERTY, Integer.valueOf(ALEipUtils.getUserId(rundata)));
      Expression exp2 = ExpressionFactory.inDbExp(EipTNote.NOTE_ID_PK_COLUMN, values);

      List<EipTNoteMap> list =
          Database.query(EipTNoteMap.class, exp1).andQualifier(exp2).fetchList();

      if (list == null || list.size() <= 0) {
        return false;
      }

      for (EipTNoteMap notemap : list) {
        notemap.setNoteStat(NoteUtils.NOTE_STAT_READ);
      }

      Database.commit();
    } catch (Exception ex) {
      Database.rollback();
      logger.error("note", ex);
      return false;
    }
    return true;
  }
Пример #14
0
  /**
   * プロジェクトオブジェクトよりプロジェクトResult情報を返す
   *
   * @param model プロジェクトオブジェクト
   * @return プロジェクトResult情報
   */
  public static ProjectResultData getProjectResultData(EipTProject model) {

    try {
      // 登録者
      ALEipUser adminUser = ALEipUtils.getALEipUser(model.getAdminUserId());

      ProjectResultData data = new ProjectResultData();
      data.initField();
      data.setProjectId(model.getProjectId()); // プロジェクトID
      data.setProjectName(model.getProjectName()); // プロジェクト名
      data.setExplanation(model.getExplanation()); // 説明
      data.setAdminUserId(model.getAdminUserId()); // 管理者ID
      data.setAdminUserName(adminUser.getAliasName().getValue()); // 管理者名
      data.setProgressFlg(model.getProgressFlg()); // 進捗率入力フラグ
      data.setProgressRate(model.getProgressRate()); // 進捗率
      data.setCreateDate(model.getCreateDate()); // 作成日
      data.setUpdateDate(model.getUpdateDate()); // 更新日
      data.setTaskUpdateDate(model.getUpdateDate()); // タスク更新日(初期値)
      return data;

    } catch (Exception ex) {
      logger.error("Exception", ex);
      return null;
    }
  }
Пример #15
0
  /**
   * 自分がオーナのグループを取得しID/Objectのマップを返却する。
   *
   * @param rundata
   * @param context
   * @return
   */
  public static Map<Integer, AddressBookGroup> getGroupMap(RunData rundata, Context context) {
    try {
      Map<Integer, AddressBookGroup> groupMap = new LinkedHashMap<Integer, AddressBookGroup>();

      SelectQuery<EipMAddressGroup> query = Database.query(EipMAddressGroup.class);
      Expression exp =
          ExpressionFactory.matchExp(
              EipMAddressGroup.OWNER_ID_PROPERTY, Integer.valueOf(ALEipUtils.getUserId(rundata)));
      query.setQualifier(exp);

      List<EipMAddressGroup> list = query.fetchList();
      int size = list.size();
      for (int i = 0; i < size; i++) {
        EipMAddressGroup record = list.get(i);
        AddressBookGroup group = new AddressBookGroup();
        group.initField();
        group.setGroupId(record.getGroupId().intValue());
        group.setGroupName(record.getGroupName());
        groupMap.put(record.getGroupId(), group);
      }
      return groupMap;
    } catch (Exception ex) {
      logger.error("AddressBookUtils.getGroupMap", ex);
      return null;
    }
  }
Пример #16
0
  /**
   * 指定した取引先情報の取得
   *
   * @param rundata
   * @param context
   * @return
   */
  public static EipMAddressbookCompany getEipMAddressbookCompany(RunData rundata, Context context) {
    // セッションから指定された 取引先ID を取得
    String companyid = ALEipUtils.getTemp(rundata, context, ALEipConstants.ENTITY_ID);
    try {
      if (companyid == null || Integer.valueOf(companyid) == null) {
        logger.debug("[AddressBook] Company ID...");
        return null;
      }

      SelectQuery<EipMAddressbookCompany> query = Database.query(EipMAddressbookCompany.class);
      Expression exp =
          ExpressionFactory.matchDbExp(
              EipMAddressbookCompany.COMPANY_ID_PK_COLUMN, Integer.valueOf(companyid));
      query.setQualifier(exp);

      List<EipMAddressbookCompany> companys = query.fetchList();
      if (companys == null || companys.size() == 0) {
        logger.debug("[AddressBook] Not found Company ID...");
        return null;
      }
      return companys.get(0);
    } catch (Exception ex) {
      logger.error("AddressBookUtils.getEipMAddressbookCompany", ex);
      return null;
    }
  }
  @Override
  protected String getJSONString(RunData rundata, Context context) throws Exception {
    String result = "";
    JSONArray json;

    try {

      String mode = rundata.getParameters().getString("mode");
      if ("group".equals(mode)) {
        String groupname = rundata.getParameters().getString("groupname");

        json =
            JSONArray.fromObject(
                AddressBookUserUtils.getAddressBookUserLiteBeansFromGroup(
                    groupname, ALEipUtils.getUserId(rundata)));
      } else {
        json = new JSONArray();
      }
      result = json.toString();
    } catch (Exception e) {
      logger.error("AddressBookUserLiteJSONScreen.getJSONString", e);
    }

    return result;
  }
Пример #18
0
  /**
   * タスク担当者を返す
   *
   * @param taskId タスクID
   * @return タスク担当者のリスト
   */
  public static List<ProjectTaskMemberResultData> getProjectTaskMembers(String taskId) {
    List<ProjectTaskMemberResultData> members = new ArrayList<ProjectTaskMemberResultData>();

    try {
      SelectQuery<EipTProjectTaskMember> query = Database.query(EipTProjectTaskMember.class);
      query.setQualifier(
          ExpressionFactory.matchExp(EipTProjectTaskMember.EIP_TPROJECT_TASK_PROPERTY, taskId));
      query.orderAscending(EipTProjectTaskMember.USER_ID_PROPERTY);

      List<EipTProjectTaskMember> list = query.fetchList();

      for (EipTProjectTaskMember member : list) {
        ALEipUser user = ALEipUtils.getALEipUser(member.getUserId());
        ProjectTaskMemberResultData data = new ProjectTaskMemberResultData();
        data.initField();
        data.setUserId(user.getUserId().getValue());
        data.setUserName(user.getAliasName().getValue());
        BigDecimal workload = new BigDecimal(df.format(member.getWorkload()));
        data.setWorkload(workload);
        members.add(data);
      }
    } catch (Exception ex) {
      logger.error("Exception", ex);
    }

    return members;
  }
Пример #19
0
  /**
   * タスク担当者へ通知メールを送る
   *
   * @param taskId タスクID
   * @return 成否
   */
  public static boolean sendMailForTaskMembers(
      RunData rundata,
      Context context,
      EipTProjectTask task,
      EipTProject project,
      List<ProjectTaskMemberResultData> mailUserList) {

    String orgId = Database.getDomainName();
    String subject =
        "["
            + ALOrgUtilsService.getAlias()
            + "]"
            + ALLocalizationUtils.getl10n("PROJECT_MAIL_TITLE");

    try {
      List<ALEipUser> memberList = new ArrayList<ALEipUser>();
      for (ProjectTaskMemberResultData rd : mailUserList) {
        memberList.add(ALEipUtils.getALEipUser(rd.getUserId().getValueWithInt()));
      }

      List<ALEipUserAddr> destMemberList =
          ALMailUtils.getALEipUserAddrs(memberList, ALEipUtils.getUserId(rundata), false);

      List<ALAdminMailMessage> messageList = new ArrayList<ALAdminMailMessage>();
      for (ALEipUserAddr destMember : destMemberList) {
        ALAdminMailMessage message = new ALAdminMailMessage(destMember);
        message.setPcSubject(subject);
        message.setCellularSubject(subject);
        message.setPcBody(createTaskMemberMsg(rundata, message.getPcMailAddr(), task, project));
        message.setCellularBody(
            createTaskMemberMsg(rundata, message.getCellMailAddr(), task, project));
        messageList.add(message);
      }

      ALMailService.sendAdminMailAsync(
          new ALAdminMailContext(
              orgId,
              ALEipUtils.getUserId(rundata),
              messageList,
              ALMailUtils.getSendDestType(ALMailUtils.KEY_MSGTYPE_WORKFLOW)));

    } catch (Exception ex) {
      logger.error("project", ex);
      return false;
    }
    return true;
  }
Пример #20
0
 /**
  * @param userId
  * @return
  */
 public String getUserFullName(String userId) {
   try {
     ALEipUser user = ALEipUtils.getALEipUser(Integer.valueOf(userId).intValue());
     return user.getAliasName().getValue();
   } catch (Exception e) {
     return "";
   }
 }
Пример #21
0
  /**
   * @param rundata
   * @param context
   * @throws Exception
   */
  @Override
  protected void doOutput(RunData rundata, Context context) throws Exception {
    try {
      UserSelectData detailData = new UserSelectData();
      detailData.initField();
      detailData.doViewDetail(this, rundata, context);

      String entityid = ALEipUtils.getTemp(rundata, context, ALEipConstants.ENTITY_ID);
      context.put(ALEipConstants.ENTITY_ID, entityid);

      String layout_template = "portlets/html/ajax-userlist-detail.vm";
      setTemplate(rundata, context, layout_template);
    } catch (Exception ex) {
      logger.error("[AccountUserDetailScreen] Exception.", ex);
      ALEipUtils.redirectDBError(rundata);
    }
  }
Пример #22
0
  @Override
  public void init(ALAction action, RunData rundata, Context context)
      throws ALPageNotFoundException, ALDBErrorException {
    super.init(action, rundata, context);

    userId = ALEipUtils.getUserId(rundata);
    try {
      accountId = Integer.parseInt(ALEipUtils.getTemp(rundata, context, WebMailUtils.ACCOUNT_ID));
    } catch (Exception e) {
      accountId = 0;
    }

    folderName = rundata.getParameters().getString("folderName");

    orgId = Database.getDomainName();

    mailAccountList = WebMailUtils.getMailAccountList(rundata, context);
  }
Пример #23
0
  /**
   * @param rundata
   * @param context
   * @throws Exception
   */
  @Override
  protected void doOutput(RunData rundata, Context context) throws Exception {

    // VelocityPortlet portlet = ALEipUtils.getPortlet(rundata, context);
    // String mode = rundata.getParameters().getString(ALEipConstants.MODE);
    try {
      int rows = 20;
      int scrollTop = 0;
      if (rundata.getParameters().containsKey("rows")) {
        rows = rundata.getParameters().getInt("rows");
      }
      if (rundata.getParameters().containsKey("scrollTop")) {
        scrollTop = rundata.getParameters().getInt("scrollTop");
      }
      if (rundata.getUserAgent().trim().indexOf("Mac") != -1) {
        context.put("isMacOS", "true");
      }

      ParameterParser parser = rundata.getParameters();

      ALEipUtils.passPSML(
          rundata, context, "p3a-group", parser.getString(TimelineUtils.TARGET_GROUP_NAME));
      ALEipUtils.passPSML(
          rundata, context, "p4a-group", parser.getString(TimelineUtils.TARGET_DISPLAY_NAME));

      TimelineSelectData listData = new TimelineSelectData();
      listData.initField();
      listData.setContentHeightMax(
          Integer.parseInt(
              ALEipUtils.getPortlet(rundata, context)
                  .getPortletConfig()
                  .getInitParameter("p1a-rows", "0")));
      listData.setRowsNum(rows);
      listData.setScrollTop(scrollTop);
      listData.doViewList(this, rundata, context);

      String layout_template = "portlets/html/ajax-timeline.vm";
      setTemplate(rundata, context, layout_template);

    } catch (Exception ex) {
      logger.error("[TimelineScreen] Exception.", ex);
      ALEipUtils.redirectDBError(rundata);
    }
  }
Пример #24
0
  /**
   * @param rundata
   * @param context
   * @throws Exception
   */
  @Override
  protected void doOutput(RunData rundata, Context context) throws Exception {

    try {
      doReport_form(rundata, context);
    } catch (Exception ex) {
      logger.error("[ReportFormScreen] Exception.", ex);
      ALEipUtils.redirectDBError(rundata);
    }
  }
Пример #25
0
 private void clearActivitySession(RunData rundata, Context context) {
   List<String> list = new ArrayList<String>();
   // エンティティIDの初期化
   list.add("entityid");
   // 選択しているタブ情報の削除
   list.add("tab");
   // 選択しているタブ情報の削除2
   list.add("category");
   ALEipUtils.removeTemp(rundata, context, list);
 }
Пример #26
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;
    }
  }
Пример #27
0
  /**
   * @param action
   * @param rundata
   * @param context
   * @throws ALPageNotFoundException
   * @throws ALDBErrorException
   */
  @Override
  public void init(ALAction action, RunData rundata, Context context)
      throws ALPageNotFoundException, ALDBErrorException {

    String sort = ALEipUtils.getTemp(rundata, context, LIST_SORT_STR);
    if (sort == null || sort.equals("")) {
      ALEipUtils.setTemp(
          rundata,
          context,
          LIST_SORT_STR,
          ALEipUtils.getPortlet(rundata, context).getPortletConfig().getInitParameter("p2a-sort"));
      logger.debug(
          "Init Parameter (Note) : "
              + ALEipUtils.getPortlet(rundata, context)
                  .getPortletConfig()
                  .getInitParameter("p2a-sort"));
    }

    super.init(action, rundata, context);
  }
Пример #28
0
  /** 初期化します。 */
  @Override
  public void init(ALAction action, RunData rundata, Context context)
      throws ALPageNotFoundException, ALDBErrorException {
    String sort = ALEipUtils.getTemp(rundata, context, LIST_SORT_STR);
    if (sort == null || sort.equals("")) {
      ALEipUtils.setTemp(rundata, context, LIST_SORT_STR, "userposition");
    }

    if (rundata.getParameters().containsKey(LIST_FILTER_ROLE)) {
      ALEipUtils.setTemp(
          rundata,
          context,
          LIST_FILTER_ROLE_STR,
          rundata.getParameters().getString(LIST_FILTER_ROLE));
    }

    target_keyword = new ALStringField();

    super.init(action, rundata, context);
  }
  /**
   * フォームを表示します。
   *
   * @param action
   * @param rundata
   * @param context
   * @return TRUE 成功 FALSE 失敗
   */
  @Override
  public boolean doViewForm(ALAction action, RunData rundata, Context context) {
    try {
      init(action, rundata, context);

      action.setMode(ALEipConstants.MODE_NEW_FORM);
      setMode(action.getMode());
      List<String> msgList = new ArrayList<String>();
      action.setResultData(this);
      action.addErrorMessages(msgList);
      action.putData(rundata, context);
      return true;
    } catch (ALPageNotFoundException e) {
      ALEipUtils.redirectPageNotFound(rundata);
      return false;
    } catch (ALDBErrorException e) {
      ALEipUtils.redirectDBError(rundata);
      return false;
    }
  }
Пример #30
0
 private static List<ALEipUser> getALEipUsers(List<Integer> idList) {
   List<TurbineUser> list = getTurbineUsers(idList);
   List<ALEipUser> users = new ArrayList<ALEipUser>();
   for (TurbineUser user : list) {
     try {
       users.add(ALEipUtils.getALEipUser(user));
     } catch (ALDBErrorException ignore) {
       // no occur
     }
   }
   return users;
 }