Author: anil.saldhana(a)jboss.com
Date: 2010-11-04 01:48:13 -0400 (Thu, 04 Nov 2010)
New Revision: 522
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java
Log:
add new methods
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java 2010-11-03
21:35:31 UTC (rev 521)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java 2010-11-04
05:48:13 UTC (rev 522)
@@ -91,6 +91,25 @@
throw new ProcessingException( e );
}
}
+
+ /**
+ * Set a prefix
+ * @param writer
+ * @param prefix
+ * @param nsURI
+ * @throws ProcessingException
+ */
+ public static void setPrefix( XMLStreamWriter writer, String prefix, String nsURI )
throws ProcessingException
+ {
+ try
+ {
+ writer.setPrefix(prefix, nsURI );
+ }
+ catch (XMLStreamException e)
+ {
+ throw new ProcessingException( e );
+ }
+ }
/**
* Write an xml attribute
@@ -112,6 +131,26 @@
}
/**
+ * Write an xml attribute
+ * @param writer
+ * @param localName localpart
+ * @param type typically xsi:type
+ * @param value value of the attribute
+ * @throws ProcessingException
+ */
+ public static void writeAttribute( XMLStreamWriter writer, String localName, String
type, String value ) throws ProcessingException
+ {
+ try
+ {
+ writer.writeAttribute( localName, type, value );
+ }
+ catch (XMLStreamException e)
+ {
+ throw new ProcessingException( e );
+ }
+ }
+
+ /**
* Write a string as text node
* @param writer
* @param value