Package com.knowgate.marketing

Examples of com.knowgate.marketing.ActivityAttachment


    if (sFileProtocol.equalsIgnoreCase("ftp://"))
      oLoca.upload(oConn, oFileSys, "file://" + sDirPath, sFileName, "ftp://" + sFileServer + sWrkAHome + sCatPath, sFileName);
    else
      oLoca.upload(oConn, oFileSys, "file://" + sDirPath, sFileName, sFileProtocol + sWrkAHome + sCatPath, sFileName);

    ActivityAttachment oAttach = new ActivityAttachment();
    oAttach.put(DB.gu_activity, getString(DB.gu_activity));
    oAttach.put(DB.gu_product, oProd.getString(DB.gu_product));
    oAttach.put(DB.gu_location, oLoca.getString(DB.gu_location));
    oAttach.put(DB.gu_writer, sGuWriter);
    oAttach.store(oConn);

    if (bDeleteOriginalFile) {
      if (DebugFile.trace) DebugFile.writeln("deleting file "+oFile.getAbsolutePath());
      oFile.delete();
      if (DebugFile.trace) DebugFile.writeln("deleting file "+sFileName+" deleted");
    }

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End Activity.addAttachment() : " + String.valueOf(oAttach.getInt(DB.pg_product)));
    }

    return oAttach;
  } // addAttachment
View Full Code Here


   * @throws NullPointerException
   * @since 5.5
   */
  public boolean removeAttachment(JDCConnection oConn, int iPgAttachment)
    throws SQLException {
    ActivityAttachment oAttach = new ActivityAttachment();
    if (oAttach.load(oConn, new Object[]{get(DB.gu_activity),new Integer(iPgAttachment)}))
      return oAttach.delete(oConn);
    else
      return false;
  } // removeAttachment
View Full Code Here

TOP

Related Classes of com.knowgate.marketing.ActivityAttachment

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.