Package com.knowgate.acl

Examples of com.knowgate.acl.ACLUser


   * @throws SQLException
   */
  public boolean store (JDCConnection oConn) throws SQLException {
    boolean bRetVal = super.store(oConn);
    if (oUser==null)
      oUser = new ACLUser(oConn, getString(DB.gu_sales_man));
    return bRetVal;
  }
View Full Code Here


  } // getSubject

  // ---------------------------------------------------------------------------

  public ACLUser getWriter(JDCConnection oConn) throws SQLException {
    ACLUser oUsr = new ACLUser();
    if (!oUsr.load(oConn, new Object[]{get(DB.gu_writer)}))
      oUsr = null;
    return oUsr;
  } // getWriter
View Full Code Here

  if (!containsKey(DB.tl_workreport)) {
    String sNmProject = DBCommand.queryStr(oConn, "SELECT "+DB.nm_project+" FROM "+DB.k_projects+" WHERE "+DB.gu_project+"='"+getStringNull(DB.gu_project,"")+"'");
    put(DB.tl_workreport, sNmProject+" "+dtNow.toString());
  }

  ACLUser oWriter = new ACLUser(oConn, getString(DB.gu_writer));
  Project oProj = new Project(oConn, getString(DB.gu_project));

   HashMap oPrioritiesMap = DBLanguages.getLookUpMap(oConn, DB.k_duties_lookup, oProj.getString(DB.gu_owner), DB.od_priority, sLanguage);
   HashMap oDutyTypesMap = DBLanguages.getLookUpMap(oConn, DB.k_duties_lookup, oProj.getString(DB.gu_owner), DB.tp_duty, sLanguage);
   HashMap oStatusMap = DBLanguages.getLookUpMap(oConn, DB.k_duties_lookup, oProj.getString(DB.gu_owner), DB.tx_status, sLanguage);
   HashMap oResourcesMap = DBLanguages.getLookUpMap(oConn, DB.k_duties_lookup, oProj.getString(DB.gu_owner), DB.nm_resource, sLanguage);

    int nDuties = oDuties.size();
    StringBuffer oStrBuf = new StringBuffer(1000+500*nDuties);

    oStrBuf.append("<DutiesWorkReport>\n");

    oStrBuf.append("<tl_workreport><![CDATA["+getString(DB.tl_workreport)+"]]></tl_workreport>\n");
    oStrBuf.append("<dt_created>"+oXMLDate.format(dtNow)+"</dt_created>\n");
    oStrBuf.append("<de_workreport><![CDATA["+getStringNull(DB.de_workreport,"")+"]]></de_workreport>\n");

    oStrBuf.append("<Writer>\n");
    oStrBuf.append("  <tx_nickname>"+oWriter.getStringNull(DB.tx_nickname,"")+"</tx_nickname>\n");
    oStrBuf.append("  <tx_full_name><![CDATA["+(oWriter.getStringNull(DB.nm_user,"")+" "+oWriter.getStringNull(DB.tx_surname1,"")+" "+oWriter.getStringNull(DB.tx_surname2,"")).trim()+"]]></tx_full_name>\n");
    oStrBuf.append("  <nm_company><![CDATA["+oWriter.getStringNull(DB.nm_company,"")+"]]></nm_company>\n");
    oStrBuf.append("  <tx_main_email><![CDATA["+oWriter.getStringNull(DB.tx_main_email,"")+"]]></tx_main_email>\n");
    oStrBuf.append("</Writer>\n");

    oStrBuf.append(oProj.toXML());
    oStrBuf.append('\n');

View Full Code Here

    sBody = null;
    oHndlr = null;
    sMBoxDir = null;
    sProfile = null;
    aBlackList = null;
    oUser = new ACLUser();
    oBeforeSend = null;
    bHasCSSStyles = null;
    oMatcher = null;
    oCompiler= null;
    oLinkCSS=null;
View Full Code Here

                 System.out.println("Composing message...");
                 DistributionList oLst = new DistributionList(oCon, oLists.getString(0,0));
                 oLists = null;
                 System.out.println("Getting mail account...");
                 MailAccount oAcc = new MailAccount(oCon, oMaccs.getString(0,0));
                 ACLUser oUsr = new ACLUser(oCon, oAcc.getString(DB.gu_user));
                 System.out.println("Got mail");
                 String sMBoxDir = DBStore.MBoxDirectory(oDbb.getProfileName(),
                                                       oUsr.getInt(DB.id_domain),
                                                       oUsr.getString(DB.gu_workarea));
                 System.out.println("mbox directory is "+sMBoxDir);
                 System.out.println("Opening mail session... ");
                 oHnl = new SessionHandler(oAcc);
        
                 oSto = DBStore.open (oHnl.getSession(), oDbb.getProfileName(), sMBoxDir,
                                      oUsr.getString(DB.gu_user), oUsr.getString(DB.tx_pwd));
                 oFld = oSto.openDBFolder("outbox", DBFolder.READ_WRITE);
                 System.out.println("Creating message template...");
        
                 DBMimeMessage oMsg = DraftsHelper.draftMessage(oFld, oDbb.getProperty("mail.host","127.0.0.1"),
                                                                oUsr.getString(DB.gu_workarea),
                                                                oUsr.getString(DB.gu_user), sType);
                 DraftsHelper.draftUpdate (oCon, oUsr.getInt(DB.id_domain),
                                           oUsr.getString(DB.gu_workarea),
                                           oMsg.getMessageGuid(),
                                           DBCommand.queryStr(oCon, "SELECT "+DB.id_message+" FROM "+DB.k_mime_msgs+
                                             " WHERE "+DB.gu_mimemsg+"='"+oMsg.getMessageGuid()+"'"),
                                           oLst.getString(DB.tx_from),
                                           oLst.getStringNull(DB.tx_reply,oLst.getString(DB.tx_from)),
                                           oLst.getStringNull(DB.tx_sender,oLst.getString(DB.tx_from)),
                                           oLst.getStringNull(DB.tx_subject,""),
                                           "text/"+sType+"; charset=utf-8",
                                           sBody, null, null, null);

                 System.out.println("Message template successfully composed");
                 String sGuJob = null;
                 if (null!=oDbb.getProperty("mail.job.title")) {
                   oStm = oCon.prepareStatement("SELECT "+DB.gu_job+" FROM "+DB.k_jobs+" WHERE "+
                                                DB.tl_job+"=? AND "+DB.gu_workarea+"=?");
                   oStm.setString(1, oDbb.getProperty("mail.job.title"));
                   oStm.setString(2, oLst.getString(DB.gu_workarea));
                   oRst = oStm.executeQuery();
                   if (oRst.next()) sGuJob = oRst.getString(1);
                   oRst.close();
                   oRst=null;
                   oStm.close();
                   oStm=null;
                 } // fi
        
                 if (null==sGuJob) {
                   oSnd = newInstance(oCon, oLst.getString(DB.gu_list),
                                      oLst.getString(DB.gu_workarea),
                                      oUsr.getString(DB.gu_user), dtNow,
                                      Job.STATUS_RUNNING,
                                      oDbb.getProperty("mail.job.title",oLst.getStringNull(DB.de_list,"")+" "+dtNow.toString()),
                                      "profile:"+oDbb.getProfileName()+
                                      ",id:"+oMsg.getMessageID()+
                                      ",message:"+oMsg.getMessageGuid()+
View Full Code Here

   if (DebugFile.trace) {
     DebugFile.writeln("Begin WorkingCalendar.forUser([JDCConnection], "+sUserId+","+dtFrom+","+dtTo+","+sCountryId+","+sStateId);
     DebugFile.incIdent();
   }

    ACLUser oUser = new ACLUser(oConn, sUserId);
  Timestamp tmFrom = new Timestamp(dtFrom.getTime());
  Timestamp tmTo = new Timestamp(dtTo.getTime());
    DBSubset oGroupCalendars = new DBSubset(DB.k_working_calendar + " c",
                        "c."+DB.gu_calendar+",c."+DB.gu_acl_group+",c."+DB.gu_user+",c."+DB.gu_geozone+",c."+DB.id_country+",c."+DB.id_state,
                          "c."+DB.gu_workarea+"=? AND c."+DB.id_domain+"=? AND "+
                        "(c."+DB.gu_user+"=? OR EXISTS (SELECT g."+DB.gu_acl_group+" FROM "+DB.k_x_group_user+" g WHERE g."+DB.gu_acl_group+"=c."+DB.gu_acl_group+" AND g."+DB.gu_user+"=?)) AND "+
                        "(c."+DB.dt_from+" BETWEEN ? AND ? OR c."+DB.dt_to+" BETWEEN ? AND ? OR (c."+DB.dt_from+"<=? AND c."+DB.dt_to+">=?)) "+
                        "ORDER BY c."+DB.dt_from, 4);
    int nCals = oGroupCalendars.load(oConn, new Object[]{oUser.get(DB.gu_workarea),oUser.get(DB.id_domain),
                                                         sUserId, sUserId,
                                                         tmFrom,tmTo,tmFrom,tmTo,tmFrom,tmTo});
    if (0==nCals) {
      oRetCal = null;
    } else {
View Full Code Here

TOP

Related Classes of com.knowgate.acl.ACLUser

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.