예제 #1
0
 /**
  * ** Encodes the specified DBRecordKyes into XML and writes it to ** a specified PrintWriter
  * ** @param out The PrintWriter ** @param dbrk The list of DBRecordKeys
  */
 public static void printXML(PrintWriter out, DBRecordKey... dbrk) {
   if (out != null) {
     out.write("<" + DBFactory.TAG_RecordKeys + ">\n");
     for (int i = 0; i < dbrk.length; i++) {
       dbrk[i].printXML(out, 4);
     }
     out.write("</" + DBFactory.TAG_RecordKeys + ">\n");
     out.flush();
   }
 }
예제 #2
0
  public void handlePageBody(PageContext pc) throws ServletException, IOException {
    ServletContext context = pc.getServletContext();
    Document doc = null;
    try {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      DocumentBuilder builder = factory.newDocumentBuilder();
      doc = builder.newDocument();
    } catch (Exception e) {
      throw new ServletException(e);
    }

    Element rootElem = doc.createElement("xaf");
    doc.appendChild(rootElem);

    try {
      DatabaseContextFactory.createCatalog(pc, rootElem);
      transform(pc, doc, ACE_CONFIG_ITEM_PROPBROWSERXSL);
    } catch (NamingException e) {
      PrintWriter out = pc.getResponse().getWriter();
      out.write(e.toString());
      e.printStackTrace(out);
    }
  }
예제 #3
0
 /**
  * ** Encodes this DBRecordKey into XML and writes it to a specified PrintWriter ** @param out The
  * PrintWriter ** @param indent The number of spaces to indent ** @param sequence Optional
  * sequence value ** @param soapXML True for SOAP XML
  */
 public void printXML(PrintWriter out, int indent, int sequence, boolean soapXML) {
   if (out != null) {
     out.write(this.toXML(null, indent, sequence, soapXML).toString());
     out.flush();
   }
 }