Package org.xdams.conf.master

Examples of org.xdams.conf.master.ConfBean


  }

  public ManagingBean execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    ManagingBean managingBean = null;
    String physDoc =  MyRequest.getParameter("physDoc", parameterMap);//myRequest.getParameter("physDoc");
    String makeAction = MyRequest.getParameter("makeAction", parameterMap);//myRequest.getParameter("makeAction");
    String codiceId = MyRequest.getParameter("codiceId", parameterMap);//myRequest.getParameter("codiceId");
    String numZeri = MyRequest.getParameter("numZeri", parameterMap);//myRequest.getParameter("numZeri");
View Full Code Here


  }

  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    ViewBean viewBean = null;
    String physDoc = MyRequest.getParameter("physDoc", parameterMap);
    String selid = MyRequest.getParameter("selid", parameterMap);
    String totSelid = MyRequest.getParameter("totSelid", parameterMap);
    String pos = MyRequest.getParameter("pos", parameterMap);
View Full Code Here

    String selid = MyRequest.getParameter("selid", parameterMap);
    String pos = MyRequest.getParameter("pos", parameterMap);
    String docXML = MyRequest.getParameter("docXML", parameterMap);
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    ManagingBean managingBean = null;
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
    try {
      managingBean = new ManagingBean();
View Full Code Here

    String physDoc = MyRequest.getParameter("physDoc", req.getParameterMap());
    ManagingBean managingBean = null;
    String valori = "";
    ConnectionManager connectionManager = new ConnectionManager();
    XWConnection xwconn = null;
    ConfBean confBean = null;
    WorkFlowBean workFlowBean = null;
    XMLCopy xmlCopy = new XMLCopy();
    // questa lista pu� essere presa da un file di configurazione
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
View Full Code Here

    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    int totNum = 0;
    boolean multi = true;
    String vocabolario_phrase = "";
    ConfBean confBean = null;
    WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
    UserBean userBean = (UserBean) modelMap.get("userBean");
    try {
      Map<String, String> hashChekbox = null;
      if (workFlowBean.getRequest().getParameter("vocabolario_tocheck") != null) {
View Full Code Here

  }

  public ManagingBean execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    ManagingBean managingBean = null;
    String physDoc = MyRequest.getParameter("physDoc", parameterMap);
    String selid = MyRequest.getParameter("selid", parameterMap);
    String makeAction = MyRequest.getParameter("makeAction", parameterMap);
    String applyTo = MyRequest.getParameter("applyTo", parameterMap);
View Full Code Here

  }

  public AjaxBean execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    WorkFlowBean workFlowBean = null;
    AjaxBean ajaxBean = new AjaxBean();
    String valori = "";
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
    confControl.add("query");
    try {
      String physDoc = MyRequest.getParameter("numDoc", req.getParameterMap());
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");

      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      MultiEditingManager editingManager = new MultiEditingManager(req.getParameterMap(), confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder(xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc)), "ISO-8859-1"));
      confBean = editingManager.rewriteMultipleConf(confControl);

      if (MyRequest.getParameter("calcButtons", req.getParameterMap()).equals("true")) {
        calcolaBottoni(xwconn, ajaxBean, physDoc);
        return ajaxBean;
      }
      QueryResult qr = xwconn.getQRFromHier(Integer.parseInt(physDoc), false);
      String extraQuery = confBean.getTheXMLConfQuery().valoreNodoNoEscape("/root/infoDoc/element[@type='extraQuery']/text()");
      // System.out.println("AjaxDocInfoCommand.execute() extraQuery " + extraQuery);
      if (!extraQuery.equals("")) {
        try {
          // System.out.println("AjaxDocInfoCommand.execute() extraQuery " + "([?SEL]=\"" + qr.id + "\") " + extraQuery);
          qr = xwconn.getQRfromPhrase("([?SEL]=\"" + qr.id + "\") " + extraQuery);
        } catch (Exception e) {
          System.out.println("ERRORE IN AjaxDocInfoCommand extraQuery " + "([?SEL]=\"" + qr.id + "\") " + extraQuery);
          System.out.println("ERRORE IN AjaxDocInfoCommand error " + e.getMessage());
        }

      }

      // ELEMENTI INFERIORI COLLEGATI
      if (qr.elements > 0) { /* se ha dei figli */
        valori += "<li>Elementi inferiori collegati: <strong>" + qr.elements + "</strong></li>";
        // QueryResult queryResult = xwconn.getQRFromHier(Integer.parseInt(physDoc),false);
        // // ELEMENTI INFERIORI COLLEGATI
        // if (queryResult.elements > 0) { /* se ha dei figli */
        // valori += "<li>Elementi figli di primo livello: <strong>" + queryResult.elements + "</strong></li>";
        // }
      }

      int numDocFather = xwconn.getNumDocFather(Integer.parseInt(physDoc));

      if (numDocFather > 0) {
        // POSIZIONE NEL RAMO
        int numDocSon = xwconn.getNumDocFirstSon(numDocFather);
        int count = 0;
        while (numDocSon != Integer.parseInt(physDoc)) {
          ++count;
          numDocSon = xwconn.getNumDocNextBrother(numDocSon);
        }
        valori += "<li>Posizione all'interno del ramo: <strong>" + (count + 1) + "</strong></li>";

        // LIVELLO DI PROFONDITA
        int depthLevel = 1;

        while ((numDocFather = xwconn.getNumDocFather(numDocFather)) > 0) {
          ++depthLevel;
        }

        valori += "<li>Livello di profondit&agrave;: <strong>" + depthLevel + "</strong></li>";
      }

      if (qr.elements > 0) { /*
                   * se ha dei figli CALCOLO ESTREMI CRONOLOGICI
                   */
        try {
          TitleManager titleManager = new TitleManager(confBean.getTheXMLConfTitle());
          String normalDatePath = confBean.getTheXMLConfQuery().valoreNodoNoEscape("/root/infoDoc/element[@type='normalDatePath']/text()");
          if (normalDatePath.equals("")) {
            normalDatePath = "/c/did/unittitle/unitdate";
          }
          String laSel = qr.id;
          String ilMaggiore = "";
View Full Code Here

  }

  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    QueryResult queryResult = null;
    HttpSession httpSession = null;
    String titleRole = "";
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
View Full Code Here

    this.modelMap = modelMap;
  }

  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConfBean confBean = null;
    ConnectionManager connectionManager = new ConnectionManager();
    // questa lista pu essere presa da un file di configurazione
    List<String> confControl = new ArrayList<String>();
    confControl.add("query-multiarchive");
    confControl.add("valoriControllati");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder("root"));
      confBean = editingManager.rewriteMultipleConf(confControl);
     
      confBean.setTheXMLConfQuery(confBean.getTheXMLConfQueryMultiArchive());
      QueryBean queryBean = new QueryBean();
      try {
        xwconn = connectionManager.getConnection(workFlowBean.getArchive());
        XMLBuilder theXMLconf = confBean.getTheXMLConfQuery();
        // System.out.println("theXMLconftheXMLconftheXMLconftheXMLconf " + theXMLconf);
        it.highwaytech.db.QueryResult qr = null;
        if (theXMLconf.valoreNodo("/root/query/@numDocInfoQuery").equals("")) {
          qr = xwconn.selectQR("([UD,/xw/@UdType/]=\"" + workFlowBean.getArchive().getPne() + "\")");
        } else {
View Full Code Here

  }

  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    String physDoc = MyRequest.getParameter("physDoc", parameterMap);
    String titleRule = "";
    List<String> confControl = new ArrayList<String>();
    confControl.add("docEdit");
    confControl.add("valoriControllati");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      XMLBuilder builderDoc = null;
      if (physDoc == null || physDoc.equals("") || physDoc.equals("-1")) {
        builderDoc = new XMLBuilder("root");
      } else {
        builderDoc = new XMLBuilder(xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc)), "ISO-8859-1");
      }

      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(builderDoc);
      confBean = editingManager.rewriteMultipleConf(confControl);

      int newNrecord = 0;
      int relation = 0;
      int firstRecord = -1;
      if (!(MyRequest.getParameter("relation", parameterMap)).equals("")) {
        relation = Integer.parseInt(MyRequest.getParameter("relation", parameterMap));
      }

      // String theArch = myRequest.getParameter("db");
      String pne = workFlowBean.getArchive().getPne();
      String dataCompilatoreCMPN = DateUtil.getDataSystem("dd/MM/yyyy");
      String nomeCompilatoreCMPN = userBean.getName() + " " + userBean.getLastName();

      int relatedPhysDoc = 0;
      int elementiMultipli = 0;

      if (MyRequest.getParameter("elementiMultipli", parameterMap).equals("")) {
        elementiMultipli = 1;
      } else {
        elementiMultipli = Integer.parseInt(MyRequest.getParameter("elementiMultipli", parameterMap));
      }
      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")) {
                ilNome = StringUtils.chomp(ilNome, "/@cdata");
                builder.insertNode(ilNome, ilValore, true);
              } else {
                builder.insertNode(ilNome, ilValore); // QUI INSERISCO IL VERO VALORE
              }

            }
          }
        }

        /* fine ordino la request e creo l'XML */
        XMLBuilder theXMLconf = confBean.getTheXMLConfEditing();

        for (int a = 0; a < theXMLconf.contaNodi("/root/fixedValues/cdata/elemento"); a++) {
          String ilNodoCorrente = theXMLconf.valoreNodo("/root/fixedValues/cdata/elemento[" + (a + 1) + "]/@path");
          String ilValoreCorrente = theXMLconf.valoreNodo("/root/fixedValues/cdata/elemento[" + (a + 1) + "]/text()");
          ilValoreCorrente = ilValoreCorrente.replaceAll(" ", "_");
View Full Code Here

TOP

Related Classes of org.xdams.conf.master.ConfBean

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.