Package com.centraview.calendar

Examples of com.centraview.calendar.CalendarActivityObject


        AvailableList avlList = (AvailableList)userIdNames.get(user);
        boolean activityArray[] = avlList.getAvailable();
        Enumeration activityEnum = activityObjects.elements();

        while (activityEnum.hasMoreElements()) {
          CalendarActivityObject activityobject = (CalendarActivityObject)activityEnum
              .nextElement();

          GregorianCalendar starttime = activityobject.getStartTime();
          GregorianCalendar endtime = activityobject.getEndTime();

          GregorianCalendar endTimeuser = endDate;
          GregorianCalendar starttimeuser = startDate;

          if ((starttime.getTimeInMillis() > endTimeuser.getTimeInMillis())
View Full Code Here


      CalendarListElement ele = (CalendarListElement)calendarList.get(key);
      Set elekey = ele.keySet();
      Iterator eleit = elekey.iterator();
      while (eleit.hasNext()) {
        CalendarMember calmember = (CalendarMember)ele.get(eleit.next());
        CalendarActivityObject activity = calmember.getActivityobject();
        Calendar start = activity.getStartTime();
        start.setTimeZone(tz);
        Calendar end = activity.getEndTime();
        end.setTimeZone(tz);
        String timeRange = dateTimeFormat.format(start.getTime()) + " - "
            + dateTimeFormat.format(end.getTime());
        String activityStartTime = timeFormat.format(start.getTime());
        // type is that stored in the activitytype database table.
        String activityType = activity.getActivityType();
        String icon = this.determineActivityIcon(activityType);
        activityType = this.convertActivityType(activityType);

        ArrayList activitiesAttendeesList = activity.getActivityAttendee();
        if ("PRIVATE".equals(activity.getActivityVisibility())
            && activity.getActivityOwnerId() != individualId
            && !activitiesAttendeesList.contains(String.valueOf(individualId))) {
          activity.setActivity("Private");
          activity.setActivityDetail("Private");
        }

        String requestURL = "";
        if ((activity.getActivity() != null) && (!activity.getActivity().equals("Private"))) {
          requestURL = "c_openPopup('/activities/view_activity.do?rowId="
              + activity.getActivityID() + "&" + ConstantKeys.TYPEOFACTIVITY + "=" + activityType
              + "&activityAction=Home')";
        }
        String activityTitle = activity.getActivity();
        String overLibTitle = CVUtility.cleanStringJS(activityTitle);
        String activityDetails = (activity.getActivityDetail() != null) ? activity
            .getActivityDetail() : "";
        String overLibDetail = CVUtility.cleanStringJS(activityDetails);

        HomeDisplayItem item = new HomeDisplayItem();
        item.setTitle(activityTitle);
        item.setUrl(requestURL);
        item.setOlTitle(overLibTitle);
        item.setOlDescription(overLibDetail);
        item.setOlCaption(timeRange);
        item.setSubTitle(activityStartTime);
        item.setIcon(icon);
        item.setRelatedTitle(activity.getEntityName());
        item.setRelatedId(activity.getEntityID());
        calendarDisplayList.add(item);
      }
    } // end while scheduled activity iterator
    request.setAttribute("calendarDisplayList", calendarDisplayList);

    // unscheduled activities portlet

    ArrayList unscheduledDisplayList = new ArrayList();
    // pull out the unscheduled activities from that stupid map retreived
    // earlier
    HashMap unscheduledActivityMap = (HashMap)calendarMap.get("unscheduledactivity");
    Set unscheduledKeys = unscheduledActivityMap.keySet();
    it = unscheduledKeys.iterator();
    while (it.hasNext()) {
      CalendarActivityObject activity = (CalendarActivityObject)unscheduledActivityMap.get(it
          .next());
      String activityType = activity.getActivityType();
      String icon = this.determineActivityIcon(activityType);
      activityType = this.convertActivityType(activityType);
      // determine requestURL based on the type
      // TODO make view_activity.do do this for me (maybe a dispatcher action
      // first)
      String requestURL;
      if (activityType.equals(ConstantKeys.FORECASTSALE)) {
        requestURL = "/sales/view_opportunity.do?TYPEOFOPERATION=EDIT&activityId=";
        requestURL += activity.getActivityID();
      } else if (activityType.equals(ConstantKeys.LITERATUREREQUEST)) {
        requestURL = "/marketing/view_literaturefulfillment.do?TYPEOFOPERATION=EDIT&activityid=";
        requestURL += activity.getActivityID();
      } else {
        requestURL = "/activities/view_activity.do?rowId=";
        requestURL += activity.getActivityID();
        requestURL += "&activityAction=Home&TYPEOFACTIVITY=";
        requestURL += activityType;
      }
      HomeDisplayItem item = new HomeDisplayItem();
      item.setTitle(activity.getActivity());
      item.setIcon(icon);
      item.setUrl(requestURL);
      item.setRelatedTitle(activity.getEntityName());
      item.setRelatedId(activity.getEntityID());
      unscheduledDisplayList.add(item);
    } // end while unscheduled activity iterator
    request.setAttribute("unscheduledDisplayList", unscheduledDisplayList);

    // project tasks
View Full Code Here

TOP

Related Classes of com.centraview.calendar.CalendarActivityObject

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.