Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.ClientProperty.toXml()


     
      Iterator iter = this.attributeKeys.iterator();
      while (iter.hasNext()) {
         Object key = iter.next();
         ClientProperty prop = (ClientProperty)this.attributes.get(key);
         sb.append(prop.toXml(extraOffset + "  ", SqlInfoParser.ATTR_TAG));
         if (doTruncate && sb.length() > SqlInfo.MAX_BUF_SIZE) {
            sb.append(" ...");
            return sb.toString();
         }
      }
View Full Code Here


      else {
         Iterator iter = this.columnKeys.iterator();
         while (iter.hasNext()) {
            Object key = iter.next();
            ClientProperty prop = (ClientProperty)this.columns.get(key);
            sb.append(prop.toXml(extraOffset + "  ", COL_TAG, forceReadable));
            if (doTruncate && sb.length() > SqlInfo.MAX_BUF_SIZE) {
               sb.append(" ...");
               return sb.toString();
            }
         }
View Full Code Here

     
      Iterator iter = this.attributeKeys.iterator();
      while (iter.hasNext()) {
         Object key = iter.next();
         ClientProperty prop = (ClientProperty)this.attributes.get(key);
         sb.append(prop.toXml(extraOffset + "  ", SqlInfoParser.ATTR_TAG));
         if (doTruncate && sb.length() > SqlInfo.MAX_BUF_SIZE) {
            sb.append(" ...");
            return sb.toString();
         }
      }
View Full Code Here

      assertEquals("", false, clientProperty.isBase64());
      assertEquals("", null, clientProperty.getValueRaw());
      assertEquals("", null, clientProperty.getStringValue());
      assertEquals("", null, clientProperty.getValueRaw());

      String xml = clientProperty.toXml();
      assertXpathExists("/clientProperty[@name='StringKey']", xml);
      System.out.println(xml);
   }

   public void testClientPropertyEncoding() throws Exception {
View Full Code Here

         assertEquals("", Constants.ENCODING_BASE64, clientProperty.getEncoding());
         assertEquals("", true, clientProperty.isBase64());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getValueRaw());

         String xml = clientProperty.toXml();
         assertXpathExists("/clientProperty[@name='StringKey']", xml);
         assertXpathExists("/clientProperty[@type='String']", xml);
         assertXpathExists("/clientProperty[@encoding='"+Constants.ENCODING_BASE64+"']", xml);
         System.out.println(xml);
         assertXMLEqual("comparing test xml to control xml",
View Full Code Here

         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='StringKey' type='String' encoding='base64'/>",
                        xml);

         clientProperty.setValue("BlaBlaBla");
         xml = clientProperty.toXml();
         assertEquals("Base64?", "QmxhQmxhQmxh", clientProperty.getValueRaw());
         assertEquals("", "BlaBlaBla", clientProperty.getStringValue());
         System.out.println(xml);
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='StringKey' type='String' encoding='base64'>QmxhQmxhQmxh</clientProperty>",
View Full Code Here

         assertEquals("", Constants.ENCODING_BASE64, clientProperty.getEncoding());
         assertEquals("", true, clientProperty.isBase64());
         assertEquals("", value, clientProperty.getStringValue());
         //assertEquals("", null, clientProperty.getValueRaw());

         String xml = clientProperty.toXml();
         assertXpathExists("/clientProperty[@name='StringKey']", xml);
         assertXpathExists("/clientProperty[@encoding='"+Constants.ENCODING_BASE64+"']", xml);
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='StringKey' encoding='base64'>QmxhPDw=</clientProperty>",
                        xml);
View Full Code Here

      assertEquals("", null, clientProperty.getStringValue());
      assertEquals("", null, clientProperty.getValueRaw());

      clientProperty.setValue("Bla<BlaBla");
      assertEquals("", Constants.ENCODING_BASE64, clientProperty.getEncoding());
      String xml = clientProperty.toXml();
      System.out.println(xml);
      assertEquals("Base64?", "QmxhPEJsYUJsYQ==", clientProperty.getValueRaw());
      assertEquals("", "Bla<BlaBla", clientProperty.getStringValue());
      System.out.println(xml);
View Full Code Here

      assertEquals("", "Bla<BlaBla", clientProperty.getStringValue());
      System.out.println(xml);

      clientProperty.setValue("Bla]]>BlaBla");
      assertEquals("", Constants.ENCODING_BASE64, clientProperty.getEncoding());
      xml = clientProperty.toXml();
      //assertEquals("Base64?", "QmxhPD5CbGFCbGE=", clientProperty.getValueRaw());
      assertEquals("", "Bla]]>BlaBla", clientProperty.getStringValue());
      System.out.println(xml);
   }
View Full Code Here

         assertEquals("", null, clientProperty.getValueRaw());
         assertEquals("", null, clientProperty.getStringValue());
         assertEquals("", null, clientProperty.getObjectValue());

         clientProperty.setValue("9988");
         String xml = clientProperty.toXml();
         assertEquals("", "9988", clientProperty.getValueRaw());
         assertXMLEqual("comparing test xml to control xml",
                        "<clientProperty name='key' type='int'>9988</clientProperty>",
                        xml);
         assertEquals("", 9988, clientProperty.getIntValue());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.