private void compareCategoryLists(List remoteCategoryVOList, List<CategoryVO> allLocalCategories)
{
Iterator remoteCategoryVOListIterator = remoteCategoryVOList.iterator();
while(remoteCategoryVOListIterator.hasNext())
{
CategoryVO remoteCategoryVO = (CategoryVO)remoteCategoryVOListIterator.next();
//logger.info("remoteCategoryVO:" + remoteCategoryVO.getName());
boolean categoryExists = false;
CategoryVO localCategoryVO = null;
Iterator allLocalCategoriesIterator = allLocalCategories.iterator();
while(allLocalCategoriesIterator.hasNext())
{
localCategoryVO = (CategoryVO)allLocalCategoriesIterator.next();
//logger.info("remoteCategoryVO:" + remoteCategoryVO.getName());
if(localCategoryVO.getName().equals(remoteCategoryVO.getName()))
{
categoryExists = true;
break;
}
}
if(!categoryExists)
{
DeploymentCompareBean bean = new DeploymentCompareBean();
bean.setRemoteVersion(remoteCategoryVO);
deviatingCategoryVOList.add(bean);
}
if(remoteCategoryVO.getChildren() != null && remoteCategoryVO.getChildren().size() > 0)
{
if(localCategoryVO != null)
compareCategoryLists(remoteCategoryVO.getChildren(), localCategoryVO.getChildren());
else
compareCategoryLists(remoteCategoryVO.getChildren(), new ArrayList());
}
}
}