Package org.xdams.conf.master

Examples of org.xdams.conf.master.ConfBean


    String jspDispatchResult = MyRequest.getParameter("jspDispatchResult", "updateAutherResult", parameterMap);
    final String nameToChange = MyRequest.getParameter("nameToChange", parameterMap);

    ConnectionManager connectionManager = new ConnectionManager();
    BuildElementToFindBean buildElementToFindBean = new BuildElementToFindBean();
    ConfBean confBean = null;
    ModifyAutherBean modifyAutherBean = new ModifyAutherBean();
    WorkFlowBean workFlowBean = null;
    // questa lista pu� essere presa da un file di configurazione
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
    confControl.add("docEdit");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      XWConnection xwconnone = connectionManager.getConnection(workFlowBean.getArchive());
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder(xwconnone.getSingleXMLFromNumDoc(Integer.parseInt(physDoc)), "ISO-8859-1"));
      confBean = editingManager.rewriteMultipleConf(confControl);
      connectionManager.closeConnection(xwconnone);
      XMLBuilder theXMLconf = confBean.getTheXMLConfEditing();
      if (!codeToFind.equals("") && makeAction.equals("")) {
       
        Map<String, List<ElementToFindBean>> hashDbToFind = buildElementToFindBean.buildElementToFindBean(theXMLconf, workFlowBean.getAlias());
        System.out.println("ModifyAuther.execute() (hashDbToFind) " + (hashDbToFind));
        int contaArchProc = 0;
View Full Code Here


  }

  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    EditingBean editingBean = null;
    String physDoc = MyRequest.getParameter("physDoc", "", parameterMap);
    //vuol dire che vengo dal preinsert
    if(modelMap.get("physDoc")!=null){
      physDoc = (String) modelMap.get("physDoc");
    }
   
    List<String> confControl = new ArrayList<String>();
    confControl.add("docEdit");
    confControl.add("valoriControllati");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      //confBean = (ConfBean) modelMap.get("confBean");
      confBean = new ConfBean();
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      if (physDoc.equals("")) {
        physDoc = (String) workFlowBean.getRequest().getAttribute("physDoc");
      }
      editingBean = new EditingBean();
View Full Code Here

    String physDocToPaste = MyRequest.getParameter("physDocToPaste", req.getParameterMap());
    ManagingBean managingBean = null;
    String valori = "";
    ConnectionManager connectionManager = new ConnectionManager();
    XWConnection xwconn = null;
    ConfBean confBean = null;
    WorkFlowBean workFlowBean = null;
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
    confControl.add("docEdit");

    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      httpSession = workFlowBean.getRequest().getSession(false);
      if (httpSession.getAttribute(workFlowBean.getManagingBeanName()) == null) {
        managingBean = new ManagingBean();
        managingBean.setMultipleChoise("none");
      } else {
        managingBean = (ManagingBean) httpSession.getAttribute(workFlowBean.getManagingBeanName());
      }

      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 (actionType.equals("cut") || actionType.equals("paste") || actionType.equals("no_rel") || actionType.equals("only_hier")) {
        TitleManager titleManager = new TitleManager(confBean.getTheXMLConfTitle());
      //  System.out.println("AjaxCutPasteCopyCommand.execute() getTheXMLConfTitle " + confBean.getTheXMLConfTitle().getXML("ISO-8859-1"));
        try {
          managingBean.setCutPhysDoc(Integer.parseInt(physDoc));
          String titoloDoc = xwconn.getTitleFromNumDoc(Integer.parseInt(physDoc));
          System.out.println("AjaxCutPasteCopyCommand.execute() titoloDoc " + titoloDoc);
          managingBean.setCutTitle(titoloDoc);
        } catch (Exception e) {
          e.printStackTrace();
        }
        String azioneDescr = "";
        if (actionType.equals("cut")) {
          azioneDescr = "tagliato";
        } else if (actionType.equals("paste")) {
          azioneDescr = "copiato";
        } else if (actionType.equals("no_rel")) {
          azioneDescr = "copiato";
        } else if (actionType.equals("only_hier")) {
          azioneDescr = "copiato";
        }

        String contenitoreIni = "\n<div class=\"cont_ul2\"><ul class=\"bottoniMenu\">";
        String string0 = "";
        String string1 = "";
        String string2 = "";
        if (!actionType.equals("no_rel")) {
          string0 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_son','" + workFlowBean.getAlias() + "');\" >INC.FIGLIO</a></li>";
          string1 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_before','" + workFlowBean.getAlias() + "');\" >INC.PRIMA</a></li>";
          string2 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_after','" + workFlowBean.getAlias() + "');\" >INC.DOPO</a></li>";
        }

        String string3 = "";
        // if(actionType.equals("paste") || actionType.equals("no_rel")){
        if (actionType.equals("no_rel")) {
          actionType = "paste";
          string3 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_as_norel','" + workFlowBean.getAlias() + "');\" >NO REL</a></li>";
        }

        String string4 = "<li><a href=\"#\" target=\"\" onclick=\"ajaxSetSessionDocsToCut('" + managingBean.getCutPhysDoc() + "','@@physDocToPaste@@','" + actionType + "_delete','" + workFlowBean.getAlias() + "');\" >ANNULLA</a></li>";
        String contenitoreEnd = "</ul></div><div class=\"cutPasteClazz\">elemento " + azioneDescr + " " + (titleManager.defaultParsedTitle(managingBean.getCutTitle(), "hierTitle")) + "</div>";
        String string = contenitoreIni + string0 + string1 + string2 + string3 + string4 + contenitoreEnd;
        ajaxBean.setStrXmlOutput(string);
        managingBean.setCutHtmlOutput(string);
        // managingBean.setCutHtmlOutput(managingBean.getCutHtmlOutput(String.valueOf(managingBean.getCutPhysDoc())));
      }

      boolean cutTest = true;
      boolean pasteTest = true;
      try {
        if (actionType.startsWith("cut_as")) {
          HierPath hierPath = xwconn.getHierPath(Integer.parseInt(physDocToPaste));
          int numeroLivelli = hierPath.depth();
          for (int i = 1; i < numeroLivelli; i++) {
            int theFatherTemp = hierPath.docNumber(i);
            if (theFatherTemp == Integer.parseInt(physDoc) || Integer.parseInt(physDoc) == Integer.parseInt(physDocToPaste)) {
              cutTest = false;
              break;
            }
          }
        }
      } catch (Exception e) {
        cutTest = false;
      }

      if (!cutTest) {
        ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<error>" + StringEscapeUtils.escapeXml("Attenzione:\nNon e possibile effettuare l'operazione richiesta") + "</error>");
      }

      if (actionType.equals("cut_as_son")) {
        // elemento da tagliare physDoc
        if (cutTest) {
          xwconn.cut_paste(Integer.parseInt(physDoc), Integer.parseInt(physDocToPaste), it.highwaytech.broker.ServerCommand.navigarel_FIGLIOPADRE);
          ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<succes>reloadLocation()</succes>");
        }
        // elemento in cui spostare il documento tagliato physDocToPaste
      } else if (actionType.equals("cut_as_before")) {
        // elemento da tagliare physDoc
        if (cutTest) {
          xwconn.cut_paste(Integer.parseInt(physDoc), Integer.parseInt(physDocToPaste), it.highwaytech.broker.ServerCommand.navigarel_MINOREMAGGIORE);
          ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<succes>reloadLocation()</succes>");
        }
        // elemento in cui spostare il documento tagliato physDocToPaste
      } else if (actionType.equals("cut_as_after")) {
        // elemento da tagliare physDoc
        if (cutTest) {
          xwconn.cut_paste(Integer.parseInt(physDoc), Integer.parseInt(physDocToPaste), it.highwaytech.broker.ServerCommand.navigarel_MAGGIOREMINORE);
          ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<succes>reloadLocation()</succes>");
        }
        // elemento in cui spostare il documento tagliato physDocToPaste
      } else if (actionType.equals("cut_delete")) {
        managingBean.setCutTitle("");
        managingBean.setCutHtmlOutput("<div id=\"scriviQui\"></div>");
        ajaxBean.setStrXmlOutput("<div id=\"scriviQui\"></div>");
        managingBean.setCutPhysDoc(-1);
      } else if (actionType.equals("paste_as_son")) {
        // elemento da tagliare physDoc
        String xmlDoc = xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc));
        String newXML = XMLCopy.xmlCopy(confBean.getTheXMLConfEditing(), new XMLBuilder(xmlDoc, "ISO-8859-1"), userBean);
        int recordNum = xwconn.insert(newXML);
        int toPaste = -1;
        try {
          toPaste = Integer.parseInt(physDocToPaste);
        } catch (Exception e) {
          toPaste = Integer.parseInt(physDoc);
        }
        System.out.println("AjaxCutPasteCopyCommand.execute() " + newXML);
        int esitoAzione = xwconn.docRelInsert(xwconn.connection, xwconn.getTheDb(), it.highwaytech.broker.ServerCommand.navigarel_FIGLIOPADRE, recordNum, toPaste);
        ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<succes>reloadLocation()</succes>");
        // elemento in cui spostare il documento tagliato physDocToPaste
      } else if (actionType.equals("paste_as_before")) {
        // elemento da tagliare physDoc
        String xmlDoc = xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc));
        String newXML = XMLCopy.xmlCopy(confBean.getTheXMLConfEditing(), new XMLBuilder(xmlDoc, "ISO-8859-1"), userBean);
        int recordNum = xwconn.insert(newXML);
        int toPaste = -1;
        try {
          toPaste = Integer.parseInt(physDocToPaste);
        } catch (Exception e) {
          toPaste = Integer.parseInt(physDoc);
        }
        int esitoAzione = xwconn.docRelInsert(xwconn.connection, xwconn.getTheDb(), it.highwaytech.broker.ServerCommand.navigarel_MINOREMAGGIORE, recordNum, toPaste);
        ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<succes>reloadLocation()</succes>");
        // elemento in cui spostare il documento tagliato physDocToPaste
      } else if (actionType.equals("paste_as_after")) {
        // elemento da tagliare physDoc
        String xmlDoc = xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc));
        String newXML = XMLCopy.xmlCopy(confBean.getTheXMLConfEditing(), new XMLBuilder(xmlDoc, "ISO-8859-1"), userBean);
        int recordNum = xwconn.insert(newXML);
        int toPaste = -1;
        try {
          toPaste = Integer.parseInt(physDocToPaste);
        } catch (Exception e) {
          toPaste = Integer.parseInt(physDoc);
        }
        System.out.println("AjaxCutPasteCopyCommand.execute() " + newXML);
        int esitoAzione = xwconn.docRelInsert(xwconn.connection, xwconn.getTheDb(), it.highwaytech.broker.ServerCommand.navigarel_MAGGIOREMINORE, recordNum, toPaste);
        ajaxBean.setStrXmlOutput("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<succes>reloadLocation()</succes>");
        // elemento in cui spostare il documento tagliato physDocToPaste
      } else if (actionType.equals("paste_as_norel")) {
        // elemento da tagliare physDoc
        String xmlDoc = xwconn.getSingleXMLFromNumDoc(Integer.parseInt(physDoc));
        String newXML = XMLCopy.xmlCopy(confBean.getTheXMLConfEditing(), new XMLBuilder(xmlDoc, "ISO-8859-1"), userBean);
        int recordNum = xwconn.insert(newXML);
        /*
         * int toPaste = -1; try { toPaste = Integer.parseInt(physDocToPaste); } catch (Exception e) { toPaste = Integer.parseInt(physDoc); } System.out.println("AjaxCutPasteCopyCommand.execute() " + newXML); int esitoAzione = xwconn.docRelInsert(xwconn.connection, xwconn.getTheDb(),
         * it.highwaytech.broker.ServerCommand.navigarel_MAGGIOREMINORE, recordNum, toPaste);
         */
 
View Full Code Here

  }

  public void execute() throws Exception {
    XWConnection xwconn = null;
    ConnectionManager connectionManager = new ConnectionManager();
    ConfBean confBean = null;
    TreeBean treeBean = null;
    String titleRole = "";
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
    confControl.add("query");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      treeBean = new TreeBean();
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(new XMLBuilder("root"));
      confBean = editingManager.rewriteMultipleConf(confControl);
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      if (MyRequest.getParameter("docStart", parameterMap) != null && !MyRequest.getParameter("docStart", parameterMap).equals("")) {
        treeBean.setDocStart(Integer.parseInt(MyRequest.getParameter("docStart", parameterMap)));
        String docXML = xwconn.getSingleXMLFromNumDoc(treeBean.getDocStart());
        editingManager.setTheXML(new XMLBuilder(docXML, "ISO-8859-1"));
        confBean = editingManager.rewriteMultipleConf(confControl);
      } else {
        confBean = editingManager.rewriteMultipleConf(confControl);
      }
      if (modelMap.get("pageName") != null && modelMap.get("pageName").equals("tree")) {
        System.out.println("HierBrowserPageCommand.execute()");
        XMLBuilder builder = confBean.getTheXMLConfTitle();
        titleRole = builder.valoreNodo("/root/titleManager/sezione[@name='hierBrowser']/titleRole/text()", false);
        System.out.println("HierBrowserPageCommand.execute()" + titleRole);
        try {
          if (!titleRole.trim().equals("")) {
            xwconn.setTitleRole(titleRole);
View Full Code Here

    String nameFileXml = MyRequest.getParameter("nameFileXml", req.getParameterMap());
    // aReq.getParameter("nameFileXml");
    String xpath = MyRequest.getParameter("xpath", req.getParameterMap());// aReq.getParameter("xpath");
    // System.err.println("aaaaaaaaaaaaaaaaaaaaaaa xpath " + xpath);
    // System.err.println("aaaaaaaaaaaaaaaaaaaaaaa nameFileXml " + nameFileXml);
    ConfBean confBean = null;
    WorkFlowBean workFlowBean = null;
    ConnectionManager connectionManager = new ConnectionManager();
    XWConnection xwconn = null;
    List<String> confControl = new ArrayList<String>();
    confControl.add("query");
    try {
      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("root"));
      confBean = editingManager.rewriteMultipleConf(confControl);
      XMLBuilder xmlBuilder = confBean.getTheXMLConfQuery();
      String qlphrase = xmlBuilder.valoreNodo("/root/access_method/query[@ajaxCheck='notinhier']/text()");
      System.out.println("AjaxCommandNotInHier.execute() qlphrase " + qlphrase);
      if (!qlphrase.trim().equals("")) {
        int intDoc = Integer.parseInt(StringUtils.substringAfter(qlphrase.toLowerCase(), "notinhier:"));
        QueryResult queryResult = xwconn.getQRFromHier(intDoc, true);
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");
    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);
      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;
    QueryResult queryResult = null;
    HttpSession httpSession = null;
    String titleRole = "";
    List<String> confControl = new ArrayList<String>();
    confControl.add("titleManager");
    confControl.add("valoriControllati");
    confControl.add("media");
    confControl.add("query");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      httpSession = workFlowBean.getRequest().getSession(false);

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

      // mettere queryBean
      System.out.println("QueryParserCommand.execute() workFlowBean.getAlias() " + workFlowBean.getAlias());
      System.out.println("QueryParserCommand.execute() aReq.getParameter(\"fromId\") " + workFlowBean.getRequest().getParameter("fromId") + "aaaaaaa");

      xwconn = connectionManager.getConnection(workFlowBean.getArchive());

      XMLBuilder builder = confBean.getTheXMLConfTitle();
      titleRole = builder.valoreNodo("/root/titleManager/sezione[@name='title']/titleRole/text()", false);
      System.out.println("QueryParserCommand.execute()" + titleRole);
      try {
        if (!titleRole.trim().equals("")) {
          xwconn.setTitleRole(titleRole);
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 makeAction = MyRequest.getParameter("makeAction", parameterMap);
    String applyTo = MyRequest.getParameter("applyTo", parameterMap);
    String selid = MyRequest.getParameter("selid", parameterMap);
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 makeAction = MyRequest.getParameter("makeAction", parameterMap);
    String sortingCriteria = MyRequest.getParameter("sortingCriteria", parameterMap);
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

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.