Package com.knowgate.hipergate

Examples of com.knowgate.hipergate.Category


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

  protected DBFolder(Store oStor, String sName) {
    super(oStor);
    oCatg = new Category();
    iOpenMode = 0;
    sFolderName = sName;
  }
View Full Code Here


      if (DebugFile.trace) {
        DBFolder oSrcFldr = (DBFolder) oSrcMsg.getFolder();
        if (null==oSrcFldr)
          DebugFile.writeln("Source message folder is null");
        else {
          Category oSrcCatg = oSrcFldr.getCategory();
          if (null==oSrcCatg)
            DebugFile.writeln("Source message category is null");
          else {
            sSrcCatg = oSrcCatg.getStringNull(DB.gu_category,null);
          }
        }
        if (null==sSrcCatg) {
          DebugFile.decIdent();
          throw new MessagingException("Could not find folder for source message");
View Full Code Here

  public boolean create(String sFolderName) throws MessagingException {

    try {
      String sGuid = ((DBStore) getStore()).getUser().getMailFolder(getConnection(),
                     Category.makeName(getConnection(), sFolderName));
      oCatg = new Category(getConnection(), sGuid);
    } catch (SQLException sqle) {
      throw new MessagingException(sqle.getMessage(), sqle);
    }
    return true;
  }
View Full Code Here

  } // deleteCategorySet

  public boolean delete(JDCConnection oConn)
    throws SQLException {
    ACLUser oUsr = new ACLUser(getString(DB.gu_user));
    Category oRootCat = new Category(oConn, oUsr.getMailRoot(oConn));
    DBSubset oMailFoldersCatgs = new DBSubset(DB.k_cat_tree, DB.gu_child_cat, DB.gu_parent_cat+"=?", 10);
    oMailFoldersCatgs.load(oConn, new Object[]{oRootCat.getString(DB.gu_category)});
    try {
      deleteCategorySet(oConn, oMailFoldersCatgs);
    } catch (IOException ioe) {
      throw new SQLException (ioe.getMessage());
    }
View Full Code Here

    StringBuffer oXML = new StringBuffer(8192);

    oXML.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<?xml-stylesheet type=\"text/xsl\"?>\n<categories count=\"" + String.valueOf(iCatCount) + "\">\n");

    Category oCurrentCat = new Category();

    for (int c=0; c<iCatCount; c++) {
      oXML.append("  <category>");
      oXML.append("<gu_category>"+dbs.getString(0,c)+"</gu_category><nm_category>"+dbs.getString(1,c)+"</nm_category><tr_category><![CDATA["+dbs.getStringNull(2,c,"")+"]]></tr_category><de_category><![CDATA["+dbs.getStringNull(3,c,"")+"]]></de_category>");

      oXML.append("<images>");

      for (int i=0; i<iImgCount; i++) {
        int iCompare = dbs.getString(0,c).compareTo(img.getString(0,i));

        if (iCompare>0)
          break;
        else if (iCompare==0) {
          oXML.append("<image><gu_image>"+img.getString(1,i)+"</gu_image>");

          oCurrentCat.replace(DB.gu_category, dbs.getString(0,c));

          try {
            oXML.append("<src_image>"+sWrkArGet+"/"+sWorkAreaId+"/apps/Shop/"+oCurrentCat.getPath(con)+"/"+img.getStringNull(3,i,"")+"</src_image>");
          }
          catch (SQLException sqle) {
            if (DebugFile.trace) DebugFile.writeln("SQLException at Category.getPath(" + dbs.getString(0,c) + ") " + sqle.getMessage());
            oXML.append("<src_image></src_image>");
          }
View Full Code Here

            if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(" + sSQL + ")");
            oInsr.executeUpdate(sSQL);

            oInsr.close();

            Category oMailRoot = new Category(sGuMailRoot);
            oMailRoot.expand(oConn);
            sRetVal = sNewGUID;
          }
        }
      }
      else {
View Full Code Here

        oProd.replace(DB.pr_list, getDecimal(DB.pr_acourse));
      else
        oProd.remove(DB.pr_list);
      oProd.store(oConn);

      Category oCatg = new Category(getString(DB.gu_category));
      oCatg.addObject(oConn, getString(DB.gu_acourse), AcademicCourse.ClassId, 0, 0);
    } // fi (gu_category!="")
    } // fi (gu_category!=null)
         
    }
View Full Code Here

      String sGuid = oUser.getMailRoot(oConn);

      if (null == sGuid)
        throw new FolderNotFoundException(new DBFolder(this, "mailroot"), "mailroot");

      Category oMailRoot = new Category(sGuid);
      DBSubset oChilds = oMailRoot.getChilds(oConn);
      int iFolders = oChilds.getRowCount();

      if (0==iFolders)
        aRetVal = null;
      else {
View Full Code Here

      String sGuid = oUsr.getMailRoot(oConn);

      if (null == sGuid)
        throw new FolderNotFoundException(new DBFolder(this, "mailroot"), "mailroot");

      Category oMailRoot = new Category(sGuid);
      DBSubset oChilds = oMailRoot.getChilds(oConn);
      int iFolders = oChilds.getRowCount();

      if (0==iFolders)
        aRetVal = null;
      else {
View Full Code Here

    sCatName = DBCommand.queryStr(oConn, "SELECT d."+DB.nm_domain+",'_',u."+DB.tx_nickname+",'_pwds' FROM "+DB.k_domains+" d,"+DB.k_users+" u WHERE d."+DB.id_domain+"=u."+DB.id_domain+" AND u."+DB.gu_user+"='"+getString(DB.gu_user)+"'");
     
    String sPwdsCat = DBCommand.queryStr(oConn, "SELECT "+DB.gu_category+" FROM "+DB.k_categories+" c, " + DB.k_cat_tree+ " t WHERE c."+DB.gu_category+"=t."+DB.gu_child_cat+" AND t."+DB.gu_parent_cat+" IN (SELECT "+DB.gu_category+" FROM "+DB.k_users+" WHERE "+DB.gu_user+"='"+getString(DB.gu_user)+"') AND c."+DB.nm_category+"='"+sCatName+"'");
     
      if (null!=sPwdsCat) {
        Category oPwdsCat = new Category(sPwdsCat);
        Integer oPos = DBCommand.queryMaxInt(oConn, DB.od_position, DB.k_x_cat_objs,
                           DB.gu_category+"='"+sPwdsCat+"'");
        if (null==oPos) oPos = new Integer(1); else oPos = new Integer(oPos.intValue()+1);
        oPwdsCat.addObject(oConn, getString(DB.gu_pwd), ClassId, 0, oPos.intValue());
      } // fi
    } // fi
    return bRetVal;
  } // store
View Full Code Here

TOP

Related Classes of com.knowgate.hipergate.Category

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.