Package com.centraview.activity.helper

Examples of com.centraview.activity.helper.ActivityHelper


            || typeOfActivity.equals(ConstantKeys.NEXTACTION)
            || typeOfActivity.equals(ConstantKeys.TODO) || typeOfActivity.equals(ConstantKeys.TASK))) {
          ActivityHelperHome home = (ActivityHelperHome)CVUtility.getHomeObject(
              "com.centraview.activity.helper.ActivityHelperHome", "ActivityHelper");
          try {
            ActivityHelper remote = home.create();
            remote.setDataSource(dataSource);
            String findActivityId = request.getParameter("rowId");
            typeOfActivity = remote.getTypeOfActivity(Integer.parseInt(findActivityId))
                .toUpperCase();
          } catch (Exception e) {
            logger.error("[execute]: Exception", e);
          }
        }
      } else if (request.getParameter(ConstantKeys.TYPEOFACTIVITY) != null) {
        typeOfActivity = request.getParameter(ConstantKeys.TYPEOFACTIVITY);
        // call to activity helper to get typeOfActivity if
        // here we get value from "TYPEOFACTIVITYLIST" hidden text box from jsp
        // pages
        if (!(typeOfActivity.equals(ConstantKeys.APPOINTMENT)
            || typeOfActivity.equals(ConstantKeys.CALL)
            || typeOfActivity.equals(ConstantKeys.FORECASTSALE)
            || typeOfActivity.equals(ConstantKeys.LITERATUREREQUEST)
            || typeOfActivity.equals(ConstantKeys.MEETING)
            || typeOfActivity.equals(ConstantKeys.NEXTACTION)
            || typeOfActivity.equals(ConstantKeys.TODO) || typeOfActivity.equals(ConstantKeys.TASK))) {

          ActivityHelperHome home = (ActivityHelperHome)CVUtility.getHomeObject(
              "com.centraview.activity.helper.ActivityHelperHome", "ActivityHelper");

          try {
            ActivityHelper remote = home.create();
            remote.setDataSource(dataSource);
            String findActivityId = request.getParameter("rowId");
            typeOfActivity = remote.getTypeOfActivity(Integer.parseInt(findActivityId))
                .toUpperCase();
          } catch (Exception e) {
            logger.error("[execute]: Exception", e);
          }
        } else {
          typeOfActivity = request.getParameter(ConstantKeys.TYPEOFACTIVITY).toUpperCase();
        }
      } else {
        // Something tells me, we'll NEVER reach this point!!!
        typeOfActivity = ConstantKeys.APPOINTMENT;
      }

      if (typeOfActivity.equals("NEXT ACTION")) {
        typeOfActivity = ConstantKeys.NEXTACTION;
      } else if (typeOfActivity.equals("TO DO")) {
        typeOfActivity = ConstantKeys.TODO;
      }

      // set request to pass to jsp
      request.setAttribute(ConstantKeys.TYPEOFACTIVITY, typeOfActivity);

      // set default opening window to detail sub-type activity
      request.setAttribute(ConstantKeys.TYPEOFSUBACTIVITY, ConstantKeys.DETAIL);
      request.setAttribute(ConstantKeys.TYPEOFOPERATION, ConstantKeys.EDIT);

      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());
View Full Code Here


      String typeOfActivity = null;

      ActivityHelperHome home = (ActivityHelperHome)CVUtility.getHomeObject(
          "com.centraview.activity.helper.ActivityHelperHome", "ActivityHelper");
      try {
        ActivityHelper remote = home.create();
        remote.setDataSource(dataSource);
        String findActivityId = request.getParameter("rowId");
        typeOfActivity = remote.getTypeOfActivity(Integer.parseInt(findActivityId)).toUpperCase();
      } catch (Exception e) {
        logger.error("[execute]: Exception", e);
      }

      if (typeOfActivity.equals("NEXT ACTION"))
        typeOfActivity = ConstantKeys.NEXTACTION;
      else if (typeOfActivity.equals("TO DO"))
        typeOfActivity = ConstantKeys.TODO;

      // set request to pass to jsp
      request.setAttribute(ConstantKeys.TYPEOFACTIVITY, typeOfActivity);
      // set default opening window to detail sub-type activity
      request.setAttribute(ConstantKeys.TYPEOFSUBACTIVITY, ConstantKeys.DETAIL);
      request.setAttribute(ConstantKeys.TYPEOFOPERATION, ConstantKeys.ADD);

      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);

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

TOP

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

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.