Package com.knowgate.hipergate

Examples of com.knowgate.hipergate.ProductLocation


            Product oProd = new Product();
            oProd.put(DB.gu_owner, oCatg.getString(DB.gu_owner));
            oProd.put(DB.nm_product, oCatg.getString(DB.nm_category));
            oProd.store(oConn);

            ProductLocation oLoca = new ProductLocation();
            oLoca.put(DB.gu_product, oProd.getString(DB.gu_product));
            oLoca.put(DB.gu_owner, oCatg.getString(DB.gu_owner));
            oLoca.put(DB.pg_prod_locat, 1);
            oLoca.put(DB.id_cont_type, 1);
            oLoca.put(DB.id_prod_type, "MBOX");
            oLoca.put(DB.len_file, 0);
            oLoca.put(DB.xprotocol, "file://");
            oLoca.put(DB.xhost, "localhost");
            oLoca.put(DB.xpath, Gadgets.chomp(sFolderDir, File.separator));
            oLoca.put(DB.xfile, oCatg.getString(DB.nm_category)+".mbox");
            oLoca.put(DB.xoriginalfile, oCatg.getString(DB.nm_category)+".mbox");
            oLoca.store(oConn);

            oStmt = oConn.prepareStatement("INSERT INTO "+DB.k_x_cat_objs+" ("+DB.gu_category+","+DB.gu_object+","+DB.id_class+") VALUES (?,?,15)");
            oStmt.setString(1, oCatg.getString(DB.gu_category));
            oStmt.setString(2, oProd.getString(DB.gu_product));
            oStmt.executeUpdate();
View Full Code Here


    oProd.put(DB.gu_owner, sGuWriter);
    oProd.put(DB.dt_uploaded, dtNow);
    if (sDescription!=null) oProd.put(DB.de_product, Gadgets.left(sDescription,254));
    oProd.store(oConn);

    ProductLocation oLoca = new ProductLocation();
    oLoca.put(DB.gu_owner, sGuWriter);
    oLoca.put(DB.gu_product, oProd.get(DB.gu_product));
    oLoca.put(DB.dt_uploaded, dtNow);
    oLoca.setPath  (sFileProtocol, sFileServer, sWrkAHome + sCatPath, sFileName, sFileName);
    oLoca.setLength(oFile.length());
    oLoca.replace(DB.id_cont_type, oLoca.getContainerType());
    oLoca.store(oConn);

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

    oProd.put(DB.gu_owner, sGuWriter);
    oProd.put(DB.dt_uploaded, dtNow);
    if (sDescription!=null) oProd.put(DB.de_product, Gadgets.left(sDescription,254));
    oProd.store(oConn);

    ProductLocation oLoca = new ProductLocation();
    oLoca.put(DB.gu_owner, sGuWriter);
    oLoca.put(DB.gu_product, oProd.get(DB.gu_product));
    oLoca.put(DB.dt_uploaded, dtNow);
    oLoca.setPath  (sFileProtocol, sFileServer, sWrkAHome + sCatPath, sFileName, sFileName);
    oLoca.setLength(oFile.length());
    oLoca.replace(DB.id_cont_type, oLoca.getContainerType());
    oLoca.store(oConn);

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

    Attachment oAttach = new Attachment();
    oAttach.put(DB.gu_contact, getString(DB.gu_contact));
    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());
View Full Code Here

TOP

Related Classes of com.knowgate.hipergate.ProductLocation

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.