Package com.centraview.common

Examples of com.centraview.common.UserObject


    try
    {
      InvoiceForm invoiceForm = (InvoiceForm)form;

      HttpSession session = request.getSession(true);
      UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );
      int individualID = userobjectd.getIndividualID();
      session.setAttribute("highlightmodule", "account");

      request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.INVOICE);
      request.setAttribute("body",AccountConstantKeys.ADD );
View Full Code Here


    DynaActionForm calendardyna = (DynaActionForm) form;

    try {
      HttpSession session = request.getSession(true);
      UserObject userobject = (UserObject) session.getAttribute("userobject");
      int userID = userobject.getIndividualID();
      int individualID = userobject.getIndividualID();

      // Delegation
      if (session.getAttribute("delegatorName") != null) {
        userID = Integer.parseInt((String) session.getAttribute("delegatorName"));
      }
      if (request.getParameter("delegatorName") != null) {
        userID = Integer.parseInt(request.getParameter("delegatorName"));
      }

      session.setAttribute("delegatorName", String.valueOf(userID));
      calendardyna.set("delegatorName", session.getAttribute("delegatorName"));

      Vector userColl = Delegator.getCalendarDelegatorIds(individualID, com.centraview.common.Constants.ACTIVITYMODULE,
          com.centraview.common.Constants.VIEW, dataSource);
      DDNameValue mydd = new DDNameValue(String.valueOf(individualID), (userobject.getfirstName() + ' ' + userobject.getlastName()));
      userColl.add(mydd);
      request.setAttribute("delegatorNameVec", userColl);

      // Selected Acitivity Type
      String activityType = request.getParameter("activityType");

      if (session.getAttribute("activityType") == null) {
        session.setAttribute("activityType", "All");
      }

      if (activityType != null) {
        session.setAttribute("activityType", activityType);
      }

      activityType = (String) session.getAttribute("activityType");
      calendardyna.set("activityType", activityType);

      Vector activityTypeVec = new Vector();

      activityTypeVec.add(new DDNameValue("All", "All Activities"));
      activityTypeVec.add(new DDNameValue("Appointment", "Appointment"));
      activityTypeVec.add(new DDNameValue("Meeting", "Meeting"));
      activityTypeVec.add(new DDNameValue("Call", "Call"));
      activityTypeVec.add(new DDNameValue("NextAction", "NextAction"));
      activityTypeVec.add(new DDNameValue("OpportunityInfo", "OpportunityInfo"));
      activityTypeVec.add(new DDNameValue("ProjectInfo", "ProjectInfo"));
      activityTypeVec.add(new DDNameValue("Event", "Event"));
      activityTypeVec.add(new DDNameValue("Task", "Task"));
      request.setAttribute("activityTypeVec", activityTypeVec);

      // What the hell??? what is the purpose of the default values here?
      int timespan = 30;
      TimeZone tz = null;

      // get time zone from parameter or from preferences; worst case default to
      // EST.
      try {
        if (request.getParameter("timeZone") != null) {
          tz = TimeZone.getTimeZone(request.getParameter("timeZone"));
        } else {
          tz = TimeZone.getTimeZone((userobject.getUserPref()).getTimeZone());
        }
      } catch (Exception e) {
        tz = TimeZone.getTimeZone("EST");
      }
      request.setAttribute("TZ", tz);

      GlobalMasterLists globalMasterLists = GlobalMasterLists.getGlobalMasterLists(dataSource);
      Vector timeZoneVec = (Vector) globalMasterLists.get("TimeZone");
      request.setAttribute("timeZoneVec", timeZoneVec);
      String timeZoneID = tz.getID();
      calendardyna.set("timeZone", timeZoneID);

      request.setAttribute("showAdvancedSearch", new Boolean(false));
      request.setAttribute("showCustomViews", new Boolean(false));
      request.setAttribute("showComposeButton", new Boolean(false));
      request.setAttribute("showPrintButton", new Boolean(false));
      request.setAttribute("searchButtonDescription", "Perform a quick search for activities information.");
      request.setAttribute("newButtonValue", "Schedule");
      HashMap moduleList = new HashMap();

      if (globalMasterLists.get("moduleList") != null) {
        moduleList = (HashMap) globalMasterLists.get("moduleList");
      }

      String moduleID = (String) moduleList.get("Activities");
      request.setAttribute("moduleId", moduleID);

      // if the type wasn't set on the parameter
      // use the user preferences defaulting to daily view.
      type = request.getParameter("Type");
      if (type == null || type.length() <= 0) {
        // Get the preferred view from the Preferences
        UserPrefererences up = userobject.getUserPref();
        String prefView = (up.getCalendarDefaultView() == null) ? "DAILY" : up.getCalendarDefaultView(); // default
                                                                                                          // it
                                                                                                          // to
                                                                                                          // DAILY
        if (prefView.equals("DAILY")) {
View Full Code Here

      HttpSession session = request.getSession(true);

      String typeOfSave = "save";
      int individualID = 0;
      UserObject userObject = (UserObject)session.getAttribute("userobject");

    UserPrefererences userPrefererences = userObject.getUserPref();

      // no need to check for null on userobjectd here, because if it is null
      // we should fail now! instead of making an EJB call with bogus info.    
      individualID = userObject.getIndividualID();

      if (request.getParameter("buttonpress") != null)
      {
        typeOfSave = request.getParameter("buttonpress");
        String minutes = (String) (dynaForm.get("minutes"));
        String seconds = (String) (dynaForm.get("seconds"));
        Vector vec = new Vector();
        PreferenceVO pvo1 = new PreferenceVO();
        PreferenceVO pvo2 = new PreferenceVO();
        PreferenceVO pvo3 = new PreferenceVO();
        pvo1.setModuleId(4);
        pvo1.setPreferenceName("calendarrefreshmin");
        pvo1.setPreferenceValue(minutes);
        pvo2.setModuleId(4);
        pvo2.setPreferenceName("calendarrefreshsec");
        pvo2.setPreferenceValue(seconds);
        pvo3.setModuleId(4);
        pvo3.setPreferenceName("caldefaultview");
        pvo3.setPreferenceValue((String) (dynaForm.get("radio")));

        if(minutes != null && !minutes.equals("") && !minutes.equals("null")
              && seconds != null && !seconds.equals("") && !seconds.equals("null"))
        {
            userPrefererences.setCalendarRefreshMin(minutes);
          userPrefererences.setCalendarRefreshSec(seconds);
          userObject.setUserPref(userPrefererences);
          session.setAttribute("userobject",userObject);
        }
       
        if(dynaForm.get("radio") != null)
        {
          userPrefererences.setCalendarDefaultView((String) dynaForm.get("radio"));
          userObject.setUserPref(userPrefererences);
          session.setAttribute("userobject",userObject);
        }
       
        vec.addElement(pvo1);
        vec.addElement(pvo2);
View Full Code Here

    try
    {
      request.setAttribute("refreshWindow", "true");
      HttpSession session = request.getSession(true);
     
      UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );
      String rowId = (String)request.getParameter("rowId");
      request.setAttribute("rowId",rowId);
      String index = (String)request.getParameter("index");
      request.setAttribute("index",index);
      String folderid = (String)request.getParameter("folderid");
      request.setAttribute("folderid",folderid);
      String listId = (String)request.getParameter("listId");
      request.setAttribute("listId",listId);
      int individualID = userobjectd.getIndividualID();
      int messageId = Integer.parseInt(request.getParameter("MessageID"));
   
      int activityId = Integer.parseInt(request.getParameter("activityId"));
 
      String activityStatus = request.getParameter("status");
View Full Code Here

      purchaseForm.convertItemLines();

      ItemLines itemLines = null;

      HttpSession session = request.getSession(true);
      UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );//get the user object
      int individualID = userobjectd.getIndividualID();

      request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.PURCHASEORDER);

      request.setAttribute("body",AccountConstantKeys.EDIT);
View Full Code Here

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    request.setAttribute(AdminConstantKeys.PREFERENCEPAGE, "EMAIL");

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user

    ActionErrors allErrors = new ActionErrors();
    String forward = ".forward.preference.mail.account_list";
    String errorForward = ".view.preference.mail.new_account";
View Full Code Here

    String saveandclose = (String) request.getParameter("saveandclose");
    String saveandnew = (String) request.getParameter("saveandnew");
    String returnStatus = "failure";

    HttpSession session = request.getSession(true);
    UserObject userobject = (UserObject) session.getAttribute("userobject");
    currentTZ = userobject.getUserPref().getTimeZone();
    int indvID = 0;

    if (userobject != null)
    {
      indvID = userobject.getIndividualID();
    }

    TimeSlipVOX timeSlipVOX = new TimeSlipVOX(currentTZ, form);
    TimeSlipVO timeSlipVO = timeSlipVOX.getVO();
    ProjectFacadeHome aa = (ProjectFacadeHome)
View Full Code Here

  String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

  try
  {
    HttpSession session = request.getSession(true);
    UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );
    int individualId = userobjectd.getIndividualID();
    ListPreference listpreference= userobjectd.getListPreference("Email");
    MailMessage mailMessage = new MailMessage();
    DynaActionForm dynaForm = (DynaActionForm)form;

    String accountid   = (String) dynaForm.get( "AccountID" );
View Full Code Here

    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    request.setAttribute(AdminConstantKeys.PREFERENCEPAGE, "EMAIL");

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user
   
    ActionErrors allErrors = new ActionErrors();
    String forward = ".forward.preference.mail.account_list";

    // "mailAccountForm" defined in struts-config-preference.xml
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws RuntimeException, Exception
  {
    final String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user

    ActionErrors allErrors = new ActionErrors();
    String forward = "showContactDetails";

    // "webformContactForm" defined in struts-config-email.xml
View Full Code Here

TOP

Related Classes of com.centraview.common.UserObject

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.