|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.sdsc.inca.util.XmlWrapper
We provide a set of Wrapper classes which provide convenience methods for dealing with XML Bean classes generated from our Inca XML schemas. This class serves as the base class for these Wrapper classes
Field Summary | |
protected static java.util.regex.Pattern |
PASSWORD_MACRO_VALUE_PATTERN
|
Constructor Summary | |
XmlWrapper()
|
Method Summary | |
static boolean |
configEqual(edu.sdsc.inca.dataModel.util.SeriesConfig config1,
edu.sdsc.inca.dataModel.util.SeriesConfig config2)
Return true if the given report series configs are equivalent. |
static java.lang.String |
cryptSensitive(java.lang.String sensitiveText,
java.lang.String passphrase,
boolean decrypt)
Decrypt/encrypt the values of name/value pairs where the name is a password/passphrase in the provided string. |
static java.lang.String |
escape(java.lang.String unescaped)
Escape illegal XML characters in a string. |
static void |
main(java.lang.String[] args)
Provides a command line client to encrypt/decrypt Inca XML files |
static java.lang.String |
read(java.lang.String filePath,
java.lang.String passphrase)
Read in a XML file from disk and decrypt any passwords/passphrases contained in it. |
static void |
save(java.lang.String xmlText,
java.lang.String filePath,
java.lang.String passphrase)
|
static java.lang.String |
unescape(java.lang.String escaped)
Unescape escaped XML characters in a string. |
protected static void |
validate(org.apache.xmlbeans.XmlObject xml)
Validate the XML document and throw and XmlException if parsing fails. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.util.regex.Pattern PASSWORD_MACRO_VALUE_PATTERN
Constructor Detail |
public XmlWrapper()
Method Detail |
public static boolean configEqual(edu.sdsc.inca.dataModel.util.SeriesConfig config1, edu.sdsc.inca.dataModel.util.SeriesConfig config2)
config1
- A series config describing how to run a reporter on
a set of resources.config2
- A series config describing how to run a reporter on
a set of resources.
public static java.lang.String cryptSensitive(java.lang.String sensitiveText, java.lang.String passphrase, boolean decrypt) throws CrypterException
sensitiveText
- A string possibly containing
name/value password/passphrase pairs that needed to be encrypted/decryptedpassphrase
- A string that can be used to decrypt/encrypt
passwords/passphrasesdecrypt
- A value of true will attempt to decrypt the sensitive text
while a value of false will attempt to encrypt the sensitive text.
CrypterException
public static java.lang.String escape(java.lang.String unescaped)
unescaped
- A string possibly containing illegal XML characters
public static java.lang.String read(java.lang.String filePath, java.lang.String passphrase) throws java.io.FileNotFoundException, java.io.IOException, CrypterException
filePath
- A string containing a path to the xml file.passphrase
- A string containing the passphrase to use to decrypt
the passwords.
java.io.FileNotFoundException
java.io.IOException
CrypterException
public static void save(java.lang.String xmlText, java.lang.String filePath, java.lang.String passphrase) throws CrypterException, java.io.IOException
CrypterException
java.io.IOException
public static java.lang.String unescape(java.lang.String escaped)
escaped
- A string possibly containing escaped XML characters
protected static void validate(org.apache.xmlbeans.XmlObject xml) throws org.apache.xmlbeans.XmlException
org.apache.xmlbeans.XmlException
public static void main(java.lang.String[] args)
args
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |