Package org.xdams.utility

Examples of org.xdams.utility.SharpIncrementTool


        managingBean.setTitle((xwconn.getTitle(xwconn.connection, xwconn.getTheDb(), Integer.parseInt(physDoc))).getTitle());
        managingBean.setDispatchView("multiModResult");
        int totElementi = elementiNum.size();
        int processati = 0;
        int errori = 0;
        SharpIncrementTool sharpIncrementTool = new SharpIncrementTool();
        for (int i = 0; i < totElementi; i++) {
          int docCorrente = 0;
          try {
            docCorrente = ((Integer) elementiNum.get(i)).intValue();
          } catch (Exception e) {
            docCorrente = (Integer.parseInt((String) elementiNum.get(i)));
          }
          try {
            // gestire con framework
            String docXML = xwconn.getSingleXMLFromNumDoc(docCorrente);
            XMLBuilder xmlBuilder = new XMLBuilder(docXML, "ISO-8859-1");
            String ilValore = theValue;
            String ilNome = theXpath;
            // if (ilValore.indexOf("[#") > 0 && ilValore.indexOf("#]") > 0 && totElementi > 1) {
            if ((ilValore.indexOf("[#") != -1) && (ilValore.indexOf("#]") > 0) && (totElementi > 1)) {
              ilValore = sharpIncrementTool.incrementValue(ilNome, ilValore);
            }
            xmlBuilder.insertValueAt(ilNome, ilValore);
            xwconn.executeUpdateByDocNumber(xmlBuilder.getXML("ISO-8859-1", false), docCorrente);
            processati++;
          } catch (Exception e) {
View Full Code Here


      if (!MyRequest.getParameter("relatedPhysDoc", parameterMap).equals("")) {
        relatedPhysDoc = Integer.parseInt(MyRequest.getParameter("relatedPhysDoc", parameterMap));
      }
      String[] nomiRequest = MyRequest.ordinaRequest(workFlowBean.getRequest(), "." + pne + ".");
      // HashMap laMappa = new HashMap();
      SharpIncrementTool sharpIncrementTool = new SharpIncrementTool();
      for (int cicli = 0; cicli < elementiMultipli; cicli++) {
        /* ordino la request e creo l'XML */
        XMLBuilder builder = new XMLBuilder(pne);
        for (int i = 0; i < nomiRequest.length; i++) {
          String ilNome = nomiRequest[i].replace('.', '/');
          String ilValore = (workFlowBean.getRequest().getParameter(nomiRequest[i])).trim();
          // System.out.println("ilNome=" + ilNome + " -- ilValore=" + ilValore + " ---");
          // System.out.println("elementiMultipli=" + elementiMultipli + " ---");
          // System.out.println("ilValore.indexOf(\"[#\") > 0 " + (ilValore.indexOf("[#") > 0));
          // System.out.println("ilValore.indexOf(\"#]\") > 0 " + (ilValore.indexOf("#]") > 0));
          // System.out.println("elementiMultipli > 1 " + (elementiMultipli > 1));
          if (!ilValore.equals("")) {
            try {
              if ((ilValore.indexOf("[#") != -1) && (ilValore.indexOf("#]") > 0) && (elementiMultipli > 0)) {
                ilValore = sharpIncrementTool.incrementValue(ilNome, ilValore);// ilValoreIni + contatoreMultiplo + ilValoreFin;
              }
            } catch (Exception eee) {

            } finally {
              if (ilNome.endsWith("/@cdata")) {
View Full Code Here

TOP

Related Classes of org.xdams.utility.SharpIncrementTool

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.