com.atlassian.crowd.migration.legacy
Class LegacyXmlVerifier
java.lang.Object
com.atlassian.crowd.migration.legacy.LegacyXmlVerifier
public class LegacyXmlVerifier
- extends java.lang.Object
Responsible for verifying the correctness of a legacy XML backup.
Currently this verifies that roles and groups within a directory have
different names (case-insensitive comparison).
NOTE: this class is stateful so do not use it in a singleton manner.
Method Summary |
java.util.List<java.lang.String> |
getErrors()
|
boolean |
hasErrors()
|
void |
verify(org.dom4j.Element root)
Verifies an XML document to ensure:
1. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LegacyXmlVerifier
public LegacyXmlVerifier()
verify
public void verify(org.dom4j.Element root)
- Verifies an XML document to ensure:
1. no group name matches any other group name in the same directory
2. no role name matches any other role name in the same directory
3. no group name matches any role name in the same directory
Errors can be obtained by called
getErrors
.
- Parameters:
root
- root of the XML document.
hasErrors
public boolean hasErrors()
getErrors
public java.util.List<java.lang.String> getErrors()
Copyright © 2010 Atlassian. All Rights Reserved.