com.atlassian.crowd.migration.legacy
Class LegacyXmlVerifier

java.lang.Object
  extended by com.atlassian.crowd.migration.legacy.LegacyXmlVerifier

public class LegacyXmlVerifier
extends 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.


Constructor Summary
LegacyXmlVerifier()
           
 
Method Summary
 List<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
 

Constructor Detail

LegacyXmlVerifier

public LegacyXmlVerifier()
Method Detail

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 List<String> getErrors()


Copyright © 2012 Atlassian. All Rights Reserved.