Package org.xdams.page.view.bean

Examples of org.xdams.page.view.bean.ViewBean


      ConfBean confBean = (ConfBean) pageContext.findAttribute("confBean");

      UserBean userBean = (UserBean) pageContext.findAttribute("userBean");

      ViewBean viewBean = (ViewBean) pageContext.findAttribute("viewBean");

      EditingBean editingBean = (EditingBean) pageContext.findAttribute("editingBean");

      WorkFlowBean workFlowBean = (WorkFlowBean) pageContext.findAttribute("workFlowBean");

      JspWriter out = pageContext.getOut();

      HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
      if (request.getParameter("infoFlag") != null && request.getParameter("infoFlag").equals("true")) {
        return EVAL_BODY_INCLUDE;
      }

      MultiEditingManager editingManager = new MultiEditingManager(request.getParameterMap(), confBean, userBean, workFlowBean);
      if (editingBean != null) {
        editingManager.setTheXML(editingBean.getXmlBuilder());
      } else if (viewBean != null) {
        editingManager.setTheXML(viewBean.getXmlBuilder());
      }

      XMLBuilder builderManaging = null;
      if (getConfFile().equals("bar-vis")) {
        List<String> confControl = new ArrayList<String>();
View Full Code Here


      ConfBean confBean = (ConfBean) pageContext.findAttribute("confBean");

      UserBean userBean = (UserBean) pageContext.findAttribute("userBean");

      ViewBean viewBean = (ViewBean) pageContext.findAttribute("viewBean");

      WorkFlowBean workFlowBean = (WorkFlowBean) pageContext.findAttribute("workFlowBean");

      JspWriter out = pageContext.getOut();
      if (targetServlet.equals("")) {
View Full Code Here

    return ritorno;
  }

  public boolean visualizzaTornaEsito(Object viewBean, Object workFlowBean, String[] userLevel) {
    boolean ritorno = false;
    ViewBean bean = (ViewBean) viewBean;
    try {
      HttpSession httpSession = bean.getHttpServletRequest().getSession(false);
      Object QRParser = httpSession.getAttribute("QRParser");
      Object pageToShow = httpSession.getAttribute("pageToShow");
      Object QRPage = httpSession.getAttribute("QRPage");
      if ((QRParser != null && pageToShow != null && QRPage != null) && controllaLivello(workFlowBean, userLevel)) {
        ritorno = true;
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);
    // HttpSession httpSession = aReq.getSession(false);
    // questa lista pu� essere presa da un file di configurazione
    List<String> confControl = new ArrayList<String>();
    confControl.add("presentation");
    confControl.add("titleManager");
    confControl.add("valoriControllati");
    confControl.add("media");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      viewBean = new ViewBean();
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      XMLBuilder theXMLDoc = null;
      String idCode = MyRequest.getParameter("idCode", parameterMap);
      String queryFix = MyRequest.getParameter("queryFix", parameterMap);
      String physDoc = MyRequest.getParameter("physDoc", parameterMap);
      queryFix = "" + queryFix + "=\"" + idCode + "\"";
      if (!physDoc.equals("")) {
        viewBean.setPhysDoc(Integer.parseInt(physDoc));
      } else {
        int docNumber = xwconn.getNumDocFromQRElement(xwconn.getQRfromPhrase(queryFix), 0);
        viewBean.setPhysDoc(docNumber);
      }

      viewBean.setDocXml(XMLCleaner.clearXwXML(xwconn.getSingleXMLFromNumDoc(viewBean.getPhysDoc()), true));
      theXMLDoc = new XMLBuilder(viewBean.getDocXml(), "ISO-8859-1");
      viewBean.setXmlBuilder(theXMLDoc);
      viewBean.setHierPath(xwconn.getHierPath(viewBean.getPhysDoc()));
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      editingManager.setTheXML(viewBean.getXmlBuilder());
      confBean = editingManager.rewriteMultipleConf(confControl);
    } catch (Exception e) {
      e.printStackTrace();
      throw new Exception(e.toString());
    } finally {
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);
    // HttpSession httpSession = aReq.getSession(false);
    // questa lista pu� essere presa da un file di configurazione
    List<String> confControl = new ArrayList<String>();
    confControl.add("presentation");
    confControl.add("titleManager");
    confControl.add("valoriControllati");
    confControl.add("docEdit");
    confControl.add("media");
    confControl.add("managing");
    confControl.add("bar-vis");
    confControl.add("bar-managing");
    confControl.add("bar-nav");
    confControl.add("bar-edt");
    confControl.add("bar-docedit");
    try {
      UserBean userBean = (UserBean) modelMap.get("userBean");
      confBean = (ConfBean) modelMap.get("confBean");
      WorkFlowBean workFlowBean = (WorkFlowBean) modelMap.get("workFlowBean");
      viewBean = new ViewBean();
      viewBean.setPhysDoc(Integer.parseInt(physDoc));
      xwconn = connectionManager.getConnection(workFlowBean.getArchive());
      viewBean.setPageName((String) modelMap.get("pageName"));
      // String referer = aReq.getHeader("referer");
      // if (referer != null && referer.indexOf("ServletQueryParser") != -1) {
      // httpSession.setAttribute("physDoc", physDoc);
      // }

      XMLBuilder theXMLDoc = null;
      if (!selid.equals("") && !pos.equals("")) {
        // httpSession.setAttribute("posInQr", new Integer(pos));
        QueryResult queryResult = xwconn.getQRFromSelId(selid);
        String docXML = xwconn.getSingleXMLFromQr(queryResult, Integer.parseInt(pos), true);
        try {
          viewBean.setPhysDocNext(xwconn.getNumDocFromQRElement(queryResult, Integer.parseInt(pos) + 1));
        } catch (Exception e) {
          viewBean.setPhysDocNext(-1);
        }
        try {
          viewBean.setPhysDocPrev(xwconn.getNumDocFromQRElement(queryResult, Integer.parseInt(pos) - 1));
        } catch (Exception e) {
          viewBean.setPhysDocPrev(-1);
        }
        if (Integer.parseInt(pos) < queryResult.elements - 1) {
          viewBean.setPosNext(Integer.parseInt(pos) + 1);
        }
        if (queryResult.elements > 0) {
          viewBean.setPosPrev(Integer.parseInt(pos) - 1);
        }
        // System.out.println("1111111111111111111111111111111111111111");
        // System.out.println("ViewPageCommand.execute() PRIMA" + docXML);
        viewBean.setDocXml(XMLCleaner.clearXwXML(docXML, false));
        // System.out.println("ViewPageCommand.execute() viewBean.getDocXml() DOPO" + viewBean.getDocXml());
        // System.out.println("2222222222222222222222222222222");
        theXMLDoc = new XMLBuilder(viewBean.getDocXml(), "ISO-8859-1", "evid");
        // System.out.println("333333333333333333333333333333333333333333");
        // theXMLDoc = new XMLBuilder(viewBean.getDocXml(), "ISO-8859-1");
        theXMLDoc.setTheTerm("");
      } else {
        // System.out.println("4444444444444444444444444444444444444444444");
        viewBean.setDocXml(XMLCleaner.clearXwXML(xwconn.getSingleXMLFromNumDoc(viewBean.getPhysDoc()), true));
        theXMLDoc = new XMLBuilder(viewBean.getDocXml(), "ISO-8859-1");
        // System.out.println("555555555555555555555555555555555555555555");
      }
      // System.out.println("ViewPageCommand.execute() theXMLDoc "+theXMLDoc.getXML("ISO-8859-1"));
      viewBean.setXmlBuilder(theXMLDoc);
      MultiEditingManager editingManager = new MultiEditingManager(parameterMap, confBean, userBean, workFlowBean);
      // System.out.println("66666666666666666666666666666666666666666");
      editingManager.setTheXML(viewBean.getXmlBuilder());
      // System.out.println("777777777777777777777777777777777777777777");
      confBean = editingManager.rewriteMultipleConf(confControl);

      viewBean.setTitle((xwconn.getTitle(xwconn.connection, xwconn.getTheDb(), viewBean.getPhysDoc())).getTitle());
      int docFather = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getArchive().getAlias(), it.highwaytech.broker.ServerCommand.navigarel_FIGLIOPADRE, viewBean.getPhysDoc());
      // se e 0 vuol dire che non e padre di nessuno e quindi e scollegato
      viewBean.setDocFather(docFather);
      // if (docFather == 0) {
      // viewBean.setDocFather(viewBean.getPhysDoc());
      // }

      int docSon = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getArchive().getAlias(), it.highwaytech.broker.ServerCommand.navigarel_PADREFIGLIO, viewBean.getPhysDoc());
      viewBean.setDocSon(docSon);
      int docUpperBrother = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getArchive().getAlias(), it.highwaytech.broker.ServerCommand.navigarel_MAGGIOREMINORE, viewBean.getPhysDoc());
      viewBean.setDocUpperBrother(docUpperBrother);
      int docLowerBrother = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getArchive().getAlias(), it.highwaytech.broker.ServerCommand.navigarel_MINOREMAGGIORE, viewBean.getPhysDoc());
      viewBean.setDocLowerBrother(docLowerBrother);
      viewBean.setPos(MyRequest.getParameter("pos", parameterMap));

      int contatore = 0;
      int testNum = 0;
      // cerco il documento "buono" per il posizionamento sullalbero
      int treePos = viewBean.getPhysDoc();
      while (treePos > 0 && contatore < 5) {
        contatore++;
        testNum = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getArchive().getAlias(), it.highwaytech.broker.ServerCommand.navigarel_MAGGIOREMINORE, treePos);
        if (testNum > 0) {
          treePos = testNum;
        } else {
          testNum = xwconn.docRelNavigate(xwconn.connection, workFlowBean.getArchive().getAlias(), it.highwaytech.broker.ServerCommand.navigarel_FIGLIOPADRE, treePos);
          if (testNum > 0) {
            treePos = testNum;
          } else {
            treePos = viewBean.getPhysDoc();
          }
          break;
        }
      }
      viewBean.setTreePos(treePos);
      viewBean.setHierPath(xwconn.getHierPath(viewBean.getPhysDoc()));
      viewBean.setSelid(selid);
      // viewBean.setHttpServletRequest(aReq);
      // if (!confBean.getTheXMLConfPresentation().valoreNodo("/root/@jspDispatch").equals("")) {
      // setJspDispatch(confBean.getTheXMLConfPresentation().valoreNodo("/root/@jspDispatch"));
      // }
      //
View Full Code Here

TOP

Related Classes of org.xdams.page.view.bean.ViewBean

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.