Package com.centraview.activity.helper

Examples of com.centraview.activity.helper.ActivityVO


      request.setAttribute("actionName", "");

      String currTimeZone = userObject.getUserPref().getTimeZone();
      String findActivityId = request.getParameter("rowId");

      ActivityVO activityVO = new ActivityVO();
      ActivityFacadeHome aa = (ActivityFacadeHome)CVUtility.getHomeObject(
          "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
      ActivityFacade remote = aa.create();
      remote.setDataSource(dataSource);

      activityVO = remote.getActivity(Integer.parseInt(findActivityId), individualId);
      activityVO.changeTimeZoneOfAllDates("EST", currTimeZone);

      ActivityForm actFrm = (ActivityForm)form;
      ActivityGenericFillVOX agf = new ActivityGenericFillVOX();
      actFrm.setLocale(request.getLocale());
      actFrm = agf.fillBasicForm(activityVO, actFrm);

      request.setAttribute("activityform", actFrm);
      session.setAttribute("activityform", actFrm);

      request.setAttribute("RECORDOPERATIONRIGHT", new Integer(CVUtility.getRecordPermission(
          individualId, "Activities", activityVO.getActivityID(), dataSource)));
      FORWARD_final = FORWARD_view;
    } catch (Exception e) {
      logger.error("[execute]: Exception", e);
      FORWARD_final = GLOBAL_FORWARD_failure;
    }
View Full Code Here


      NamingException
  {
    int results = 0;

    ActivityVOX activityVOX = new ActivityVOX(form);
    ActivityVO activityVO = activityVOX.getVO();
    ActivityFacadeHome activityFacade = (ActivityFacadeHome)CVUtility.getHomeObject(
        "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");

    try {
      String entityName = form.getLinkCompany();
      if (entityName != null && !entityName.equals("")) {
        // first, check to see if a entity with a matching name exists
        // if yes, then associate this invidivual with that entity
        // if no, then create a new entity, and associate this individual with
        // that entity
        SyncFacadeHome syncHome = (SyncFacadeHome)CVUtility.getHomeObject(
            "com.centraview.syncfacade.SyncFacadeHome", "SyncFacade");
        com.centraview.syncfacade.SyncFacade sfremote = syncHome.create();
        sfremote.setDataSource(dataSource);
        int newEntityID = sfremote.findCompanyNameMatch(entityName, userId);
        activityVO.setEntityID(newEntityID);
      }
      ActivityFacade remote = activityFacade.create();
      remote.setDataSource(this.dataSource);
      results = remote.addActivity(activityVO, userId);
    } catch (Exception e) {
View Full Code Here

   */
  public String updateActivity(ActivityForm form, int userId) throws CommunicationException,
      NamingException
  {
    ActivityVOX activityVOX = new ActivityVOX(form);
    ActivityVO activityVO = activityVOX.getVO();
    ActivityFacadeHome activityFacade = (ActivityFacadeHome)CVUtility.getHomeObject(
        "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
    try {
      ActivityFacade remote = activityFacade.create();
      remote.setDataSource(this.dataSource);
View Full Code Here

   * @return A fully populated <code>ActivityVO</code> object
   */
  public ActivityVO getActivity(int activityId, int userId)
      throws CommunicationException, NamingException
  {
    ActivityVO vo = null;
    ActivityFacadeHome activityFacade = (ActivityFacadeHome)CVUtility.getHomeObject(
        "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");

    try {
      ActivityFacade remote = activityFacade.create();
View Full Code Here

      // populate VOX
      ActivityVOX activityVOX = new ActivityVOX(form);

      // initialize VO
      ActivityVO activityVO = activityVOX.getVO();

      UserObject userObject = (UserObject)session.getAttribute("userobject");
      int IndividualId = userObject.getIndividualID();

      // this method will convert the date to GMT
      String currTimeZone = userObject.getUserPref().getTimeZone();
      activityVO.changeTimeZoneOfAllDates(currTimeZone, "EST");

      String emailinvitation = ((ActivityForm)form).getActivityEmailInvitation();
      if (emailinvitation != null && emailinvitation.equals("on")) {
        ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
View Full Code Here

      // populate VOX
      ActivityVOX activityVOX = new ActivityVOX(form);

      // initialize VO
      ActivityVO activityVO = activityVOX.getVO();

      UserObject userObject = (UserObject)session.getAttribute("userobject");
      int IndividualId = userObject.getIndividualID();

      // this method will convert the date to GMT
      // TODO timezone!
      String currTimeZone = userObject.getUserPref().getTimeZone();
      activityVO.changeTimeZoneOfAllDates(currTimeZone, "EST");

      try {
        ActivityFacade remote = activityFacade.create();
        remote.setDataSource(dataSource);

        int activityID = Integer.parseInt(request.getParameter(ConstantKeys.ACTIVITYID
            .toLowerCase()));
        activityVO.setActivityID(activityID); // to be removed

        remote.updateActivity(activityVO, IndividualId);

        AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject(
            "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
View Full Code Here

      UserObject userObject = (UserObject)session.getAttribute("userobject");

      int individualId = userObject.getIndividualID();

      String findActivityId = request.getParameter("rowId");
      ActivityVO activityVO = new ActivityVO();
      ActivityFacadeHome aa = (ActivityFacadeHome)CVUtility.getHomeObject(
          "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
      ActivityFacade remote = aa.create();
      remote.setDataSource(dataSource);
      activityVO = remote.getActivity(Integer.parseInt(findActivityId), individualId);
View Full Code Here

      InitialContext ic = CVUtility.getInitialContext();
      ActivityHelperLocalHome home = (ActivityHelperLocalHome)ic.lookup("local/ActivityHelper");
      ActivityHelperLocal remote = (ActivityHelperLocal) home.create();
      remote.setDataSource(dataSource);

      ActivityVO actVo = new ActivityVO();
      actVo.setEntityID(0);
      actVo.setIndividualID(tvo.getIndividualID());
      actVo.setActivityType(8);
      actVo.setOwner(userId);
      actVo.setTitle(tvo.getTitle());
      actVo.setActivityDetails(tvo.getActivityDetails());
      actVo.setActivityStartDate(tvo.getStart());
      actVo.setActivityDueDate(tvo.getEnd());
      actVo.setVisibility("PUBLIC");
      activityId = remote.addActivity(actVo,userId);

      int taskCount = 1;
      dl.setSql("projecttask.selecttaskcount");
      dl.setInt(1, tvo.getProjectID());
View Full Code Here

      InitialContext ic = CVUtility.getInitialContext();
      ActivityHelperLocalHome home = (ActivityHelperLocalHome)ic.lookup("local/ActivityHelper");
      ActivityHelperLocal remote = (ActivityHelperLocal) home.create();
      remote.setDataSource(dataSource);
      ActivityVO actVo = new ActivityVO();
      actVo = remote.getActivity(taskId,userId);

      tvo.setTitle(actVo.getTitle());
      tvo.setActivityDetails(actVo.getActivityDetails());
      tvo.setCreatedBy(actVo.getCreatedBy());
      tvo.setCreatedOn(actVo.getCreatedOn());
      tvo.setModifiedOn(actVo.getModifiedOn());
      tvo.setOwner(tvo.getOwner());
      tvo.setModifiedBy(actVo.getModifiedBy());
      tvo.setStatus(actVo.getStatus());
      tvo.setStart(actVo.getActivityStartDate());
      tvo.setEnd(actVo.getActivityDueDate());
      tvo.fillAuditDetails(this.dataSource);

      if (actVo.getIndividualID() != 0)
      {
        tvo.setIndividualID(actVo.getIndividualID());
        tvo.setIndividualName(actVo.getIndividualName());
      }

      dl.setSql("projecttask.gettask");
      dl.setInt(1, taskId);
      Collection col = dl.executeQuery();
View Full Code Here

      InitialContext ic = CVUtility.getInitialContext();
      ActivityHelperLocalHome home = (ActivityHelperLocalHome)ic.lookup("local/ActivityHelper");
      ActivityHelperLocal remote = (ActivityHelperLocal) home.create();
      remote.setDataSource(dataSource);

      ActivityVO actVo = new ActivityVO();
      actVo.setActivityID(tvo.getActivityID());
      actVo.setEntityID(0);
      actVo.setIndividualID(tvo.getIndividualID());
      actVo.setActivityType(8);
      actVo.setTitle(tvo.getTitle());
      actVo.setActivityDetails(tvo.getActivityDetails());
      actVo.setActivityStartDate(tvo.getStart());
      actVo.setActivityDueDate(tvo.getEnd());
      actVo.setStatus(tvo.getStatus());

      remote.updateActivity(actVo,userId);

      dl.setSql("projecttask.updatetask");
      dl.setInt(1, tvo.getProjectID());
View Full Code Here

TOP

Related Classes of com.centraview.activity.helper.ActivityVO

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.