@Override
   public void writeXmlBody(Definition def, Writer out) throws IOException
   {
      writeConnectorVersion(out);

      int indent = 1;
      writeIndent(out, indent);
      out.write("<vendor-name>Red Hat Inc</vendor-name>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("<eis-type>Test RA</eis-type>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("<resourceadapter-version>0.1</resourceadapter-version>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("<resourceadapter>");
      writeEol(out);

      if (def.isUseRa())
      {
         writeIndent(out, indent + 1);
         out.write("<resourceadapter-class>" + def.getRaPackage() + "." +
               def.getRaClass() + "</resourceadapter-class>");
         writeEol(out);
         writeConfigPropsXml(def.getRaConfigProps(), out, indent + 1);
      }

      if (def.isSupportOutbound())
      {
         writeOutbound(def, out, indent + 1);
      }
      if (def.isSupportInbound())
      {
         writeInbound(def, out, indent + 1);
      }

      if (def.isGenAdminObject() && def.getAdminObjects().size() > 0)
      {
         for (int i = 0; i < def.getAdminObjects().size(); i++)
         {
            writeIndent(out, indent + 1);
            out.write("<adminobject>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<adminobject-interface>" + def.getRaPackage() + "." +
                  def.getAdminObjects().get(i).getAdminObjectInterface() + "</adminobject-interface>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<adminobject-class>" + def.getRaPackage() + "." +
                  def.getAdminObjects().get(i).getAdminObjectClass() + "</adminobject-class>");
            writeEol(out);
            writeConfigPropsXml(def.getAdminObjects().get(i).getAoConfigProps(), out, indent + 2);
            writeIndent(out, indent + 1);
            out.write("</adminobject>");
            writeEol(out);
         }
      }

      if (def.getSecurityPermissions() != null && def.getSecurityPermissions().size() > 0)
      {
         for (int i = 0; i < def.getSecurityPermissions().size(); i++)
         {
            writeIndent(out, indent + 1);
            out.write("<security-permission>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<security-permission-spec>" + def.getSecurityPermissions().get(i).getPermissionSpec() +
                  "</security-permission-spec>");
            writeEol(out);
            writeIndent(out, indent + 1);
            out.write("</security-permission>");
            writeEol(out);
         }
      }

      writeIndent(out, indent);
      out.write("</resourceadapter>");
      writeEol(out);
      out.write("</connector>");
      writeEol(out);
   }
@ Override public void writeXmlBody ( Definition def , Writer out ) throws IOException { writeConnectorVersion ( out ) ; int indent = 1 ; writeIndent ( out , indent ) ; out . write ( "<vendor-name>Red Hat Inc</vendor-name>" ) ; writeEol ( out ) ; writeIndent ( out , indent ) ; out . write ( "<eis-type>Test RA</eis-type>" ) ; writeEol ( out ) ; writeIndent ( out , indent ) ; out . write ( "<resourceadapter-version>0.1</resourceadapter-version>" ) ; writeEol ( out ) ; writeIndent ( out , indent ) ; out . write ( "<resourceadapter>" ) ; writeEol ( out ) ; if ( def . isUseRa ( ) ) { writeIndent ( out , indent + 1 ) ; out . write ( "<resourceadapter-class>" + def . getRaPackage ( ) + "." + def . getRaClass ( ) + "</resourceadapter-class>" ) ; writeEol ( out ) ; writeConfigPropsXml ( def . getRaConfigProps ( ) , out , indent + 1 ) ; } if ( def . isSupportOutbound ( ) ) { writeOutbound ( def , out , indent + 1 ) ; } if ( def . isSupportInbound ( ) ) { writeInbound ( def , out , indent + 1 ) ; } if ( def . isGenAdminObject ( ) && def . getAdminObjects ( ) . size ( ) > 0 ) { for ( int i = 0 ; i < def . getAdminObjects ( ) . size ( ) ; i ++ ) { writeIndent ( out , indent + 1 ) ; out . write ( "<adminobject>" ) ; writeEol ( out ) ; writeIndent ( out , indent + 2 ) ; out . write ( "<adminobject-interface>" + def . getRaPackage ( ) + "." + def . getAdminObjects ( ) . get ( i ) . getAdminObjectInterface ( ) + "</adminobject-interface>" ) ; writeEol ( out ) ; writeIndent ( out , indent + 2 ) ; out . write ( "<adminobject-class>" + def . getRaPackage ( ) + "." + def . getAdminObjects ( ) . get ( i ) . getAdminObjectClass ( ) + "</adminobject-class>" ) ; writeEol ( out ) ; writeConfigPropsXml ( def . getAdminObjects ( ) . get ( i ) . getAoConfigProps ( ) , out , indent + 2 ) ; writeIndent ( out , indent + 1 ) ; out . write ( "</adminobject>" ) ; writeEol ( out ) ; } } if ( def . getSecurityPermissions ( ) != null && def . getSecurityPermissions ( ) . size ( ) > 0 ) { for ( int i = 0 ; i < def . getSecurityPermissions ( ) . size ( ) ; i ++ ) { writeIndent ( out , indent + 1 ) ; out . write ( "<security-permission>" ) ; writeEol ( out ) ; writeIndent ( out , indent + 2 ) ; out . write ( "<security-permission-spec>" + def . getSecurityPermissions ( ) . get ( i ) . getPermissionSpec ( ) + "</security-permission-spec>" ) ; writeEol ( out ) ; writeIndent ( out , indent + 1 ) ; out . write ( "</security-permission>" ) ; writeEol ( out ) ; } } writeIndent ( out , indent ) ; out . write ( "</resourceadapter>" ) ; writeEol ( out ) ; out . write ( "</connector>" ) ; writeEol ( out ) ; }
Output xml

@param def definition
@param out Writer
@throws IOException ioException