Package net.naijatek.myalumni.modules.common.helper

Examples of net.naijatek.myalumni.modules.common.helper.PrivateMessageHelper


            folderType.equalsIgnoreCase(BaseConstants.FOLDER_SENT) ||
            folderType.equalsIgnoreCase(BaseConstants.FOLDER_TRASH) ||
            folderType.equalsIgnoreCase(BaseConstants.FOLDER_STORAGE))
        {
          MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
            PrivateMessageHelper pmHelper = pmService.getAdminMessageCenter(adminUserId, folderType, container );
            setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);
        }
        else{
          ActionMessages errors = new ActionMessages();
          errors.add(BaseConstants.WARN_KEY, new ActionMessage("error.folderdoesnotexist"));
View Full Code Here


        pmForm.setMessageDate(DateFormatUtil.getDateYYYYMMMDDHHMMA(pmVO.getMessageDate()));
        pmForm.setFromMemberFirstName(pmVO.getMessageFromMember().getFirstName());
        pmForm.setFromMemberLastName(pmVO.getMessageFromMember().getLastName());
       
        MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
        PrivateMessageHelper pmHelper = pmService.getAdminMessageCenter(BaseConstants.ADMIN_USERNAME_ID, BaseConstants.FOLDER_INBOX, container );
        setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);

        return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }
View Full Code Here

      saveMessages(request, errors);
      return mapping.getInputForward();
    }

    MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
    PrivateMessageHelper pmHelper = pmService.getAdminMessageCenter(BaseConstants.ADMIN_USERNAME_ID, BaseConstants.FOLDER_INBOX, container );
    setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);

    return mapping.findForward(BaseConstants.FWD_SUCCESS);

   
View Full Code Here

    }
   
   
    private void doMailDuties(final MemberVO token, final HttpServletRequest request){
      MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
      PrivateMessageHelper pmHelper = pmService.getAdminMessageCenter(BaseConstants.ADMIN_USERNAME_ID, BaseConstants.FOLDER_INBOX, container );
      setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);
    }
View Full Code Here

    }


    private void doMailDuties(final MemberVO token, final HttpServletRequest request){
      MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
        PrivateMessageHelper pmHelper = pmService.getMessageCenter(token.getMemberId(), BaseConstants.FOLDER_INBOX, container );
        setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);
    }
View Full Code Here

        return mapping.findForward(BaseConstants.FWD_LOGIN);
      }
 
     
      MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
      PrivateMessageHelper pmHelper = pmService.getMessageCenter(token.getMemberId(), BaseConstants.FOLDER_INBOX, container );
      setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);
      return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }   
View Full Code Here

          folderName.equalsIgnoreCase(BaseConstants.FOLDER_SENT) ||
          folderName.equalsIgnoreCase(BaseConstants.FOLDER_TRASH) ||
          folderName.equalsIgnoreCase(BaseConstants.FOLDER_STORAGE))
      {
        MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
          PrivateMessageHelper pmHelper = pmService.getMessageCenter(token.getMemberId(), folderName, container );
          setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);
      }
      else{
        ActionMessages errors = new ActionMessages();
        errors.add(BaseConstants.WARN_KEY, new ActionMessage("error.folderdoesnotexist"));
View Full Code Here

        return mapping.getInputForward();
      }
     

      MyAlumniUserContainer container = (MyAlumniUserContainer)request.getSession().getAttribute(BaseConstants.USER_CONTAINER);
      PrivateMessageHelper pmHelper = pmService.getMessageCenter(token.getMemberId(), BaseConstants.FOLDER_INBOX, container );
      setSessionObject(request, BaseConstants.MESSAGE_CENTER , pmHelper);
 
      return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }   
View Full Code Here

    public int getQuotaRatioByMemberId(String memberId){
       return pmDao.getQuotaRatioByMemberId(memberId);
    }
   
    public PrivateMessageHelper getMessageCenter(String memberId, String folderType, MyAlumniUserContainer container){
      PrivateMessageHelper pmHelper = new PrivateMessageHelper();
     
      // set the messges
      pmHelper.setListOfMessages(pmDao.getMailListByMemberId(memberId, folderType));
     
      //set member folders
      pmHelper.setMessageFolders(messageFolderDao.getMessageFoldersForMemberByMemberId(memberId));
     
      //set Max quota
      pmHelper.setMaxQuota(SystemConfigConstants.MAIL_QUOTA);

      //set member quota
      pmHelper.setMemberQuota(pmDao.getQuotaRatioByMemberId(memberId));

      //set folder type
      pmHelper.setFolderType(folderType.toLowerCase());
     
      //set number of new and old message
      container.setNewMailCount(pmDao.getMailCountByUserName(memberId, BaseConstants.PM_STATUS_NEW));   
     
      return pmHelper;
View Full Code Here

      return pmHelper;
    }
   
   
    public PrivateMessageHelper getAdminMessageCenter(String memberId, String folderType, MyAlumniUserContainer container){
      PrivateMessageHelper pmHelper = new PrivateMessageHelper();
     
      // set the messges
      pmHelper.setListOfMessages(pmDao.getAdminMailListByAdminId(memberId, folderType));
     
      //set member folders
      pmHelper.setMessageFolders(messageFolderDao.getAdminMessageFoldersForMemberByMemberId(memberId));
     
      //set Max quota
      pmHelper.setMaxQuota(SystemConfigConstants.MAIL_QUOTA);

      //set member quota
      pmHelper.setMemberQuota(pmDao.getAdminQuotaRatioByMemberId(memberId));

      //set folder type
      pmHelper.setFolderType(folderType.toLowerCase());
     
      //set number of new and old message
      container.setNewMailCount(pmDao.getAdminMailCountByUserName(memberId, BaseConstants.PM_STATUS_NEW));   
     
      return pmHelper;
View Full Code Here

TOP

Related Classes of net.naijatek.myalumni.modules.common.helper.PrivateMessageHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.