if(synchronizeContentTypeDefinitions)
{
Object[] contentTypeDefinitionVOArray = (Object[])invokeOperation(targetEndpointAddress, "getContentTypeDefinitions", "contentTypeDefinition", null, new Class[]{ContentTypeDefinitionVO.class}, "infoglue", deploymentServerBean.getUser());
List remoteContentTypeDefinitionVOList = Arrays.asList(contentTypeDefinitionVOArray);
Collections.sort(remoteContentTypeDefinitionVOList, new ReflectionComparator("name"));
//logger.info("remoteContentTypeDefinitionVOList:" + remoteContentTypeDefinitionVOList.size());
if(this.synchronizationMethod.equalsIgnoreCase("pull"))
{
Iterator remoteContentTypeDefinitionVOListIterator = remoteContentTypeDefinitionVOList.iterator();
while(remoteContentTypeDefinitionVOListIterator.hasNext())
{
ContentTypeDefinitionVO remoteContentTypeDefinitionVO = (ContentTypeDefinitionVO)remoteContentTypeDefinitionVOListIterator.next();
//logger.info("remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
ContentTypeDefinitionVO localContentTypeDefinitionVO = (ContentTypeDefinitionVO)ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(remoteContentTypeDefinitionVO.getName());
DeploymentCompareBean bean = new DeploymentCompareBean();
bean.setRemoteVersion(remoteContentTypeDefinitionVO);
if(localContentTypeDefinitionVO != null)
{
//logger.info("localContentTypeDefinitionVO:" + localContentTypeDefinitionVO.getName());
bean.setLocalVersion(localContentTypeDefinitionVO);
}
deviatingContentTypes.add(bean);
}
}
else
{
logger.info("Getting what content types are not the same from a push perspective...");
List localContentTypeDefinitionVOList = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOList();
Iterator localContentTypeDefinitionVOListIterator = localContentTypeDefinitionVOList.iterator();
while(localContentTypeDefinitionVOListIterator.hasNext())
{
ContentTypeDefinitionVO localContentTypeDefinitionVO = (ContentTypeDefinitionVO)localContentTypeDefinitionVOListIterator.next();
Iterator remoteContentTypeDefinitionVOListIterator = remoteContentTypeDefinitionVOList.iterator();
ContentTypeDefinitionVO remoteContentTypeDefinitionVO = null;
while(remoteContentTypeDefinitionVOListIterator.hasNext())
{
ContentTypeDefinitionVO remoteContentTypeDefinitionVOCandidate = (ContentTypeDefinitionVO)remoteContentTypeDefinitionVOListIterator.next();
//logger.info("remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
if(remoteContentTypeDefinitionVOCandidate.getName().equals(localContentTypeDefinitionVO.getName()))
remoteContentTypeDefinitionVO = remoteContentTypeDefinitionVOCandidate;
}
DeploymentCompareBean bean = new DeploymentCompareBean();
bean.setLocalVersion(localContentTypeDefinitionVO);
if(remoteContentTypeDefinitionVO != null)
{
//logger.info("localContentTypeDefinitionVO:" + localContentTypeDefinitionVO.getName());
bean.setRemoteVersion(remoteContentTypeDefinitionVO);
}
deviatingContentTypes.add(bean);
}
}
}
if(synchronizeCategories)
{
//Getting deviatingCategories
Object[] categoryVOArray = (Object[])invokeOperation(targetEndpointAddress, "getAllActiveCategories", "category", null, new Class[]{CategoryVO.class}, "infoglue", deploymentServerBean.getUser());
List remoteCategoryVOList = Arrays.asList(categoryVOArray);
Collections.sort(remoteCategoryVOList, new ReflectionComparator("name"));
//logger.info("remoteCategoryVOList:" + remoteCategoryVOList.size());
List<CategoryVO> allLocalCategories = CategoryController.getController().findAllActiveCategories(true);
//logger.info("allLocalCategories:" + allLocalCategories.size());
if(this.synchronizationMethod.equalsIgnoreCase("push"))
compareCategoryLists(remoteCategoryVOList, allLocalCategories);
else
compareCategoryLists(allLocalCategories, remoteCategoryVOList);
//logger.info("deviatingCategoryVOList:" + deviatingCategoryVOList.size());
}
if(synchronizeWorkflows)
{
//Getting deviatingWorkflows
Object[] workflowVOArray = (Object[])invokeOperation(targetEndpointAddress, "getWorkflowDefinitions", "workflowDefinition", null, new Class[]{WorkflowDefinitionVO.class}, "infoglue", deploymentServerBean.getUser());
List remoteWorkflowDefinitionVOList = Arrays.asList(workflowVOArray);
Collections.sort(remoteWorkflowDefinitionVOList, new ReflectionComparator("name"));
//logger.info("remoteWorkflowDefinitionVOList:" + remoteWorkflowDefinitionVOList.size());
if(this.synchronizationMethod.equalsIgnoreCase("pull"))
{