//logger.info("Updating missingContentTypeName:" + missingContentTypeName);
Iterator remoteContentTypeDefinitionVOListIterator = remoteContentTypeDefinitionVOList.iterator();
while(remoteContentTypeDefinitionVOListIterator.hasNext())
{
ContentTypeDefinitionVO remoteContentTypeDefinitionVO = (ContentTypeDefinitionVO)remoteContentTypeDefinitionVOListIterator.next();
//logger.info("remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
if(remoteContentTypeDefinitionVO.getName().equals(missingContentTypeName))
{
ContentTypeDefinitionController.getController().create(remoteContentTypeDefinitionVO);
}
}
}
}
String[] deviatingContentTypeNameArray = this.getRequest().getParameterValues("deviatedContentTypeName");
//logger.info("deviatingContentTypeNameArray:" + deviatingContentTypeNameArray);
if(deviatingContentTypeNameArray != null)
{
for(int i=0; i<deviatingContentTypeNameArray.length; i++)
{
String deviatingContentTypeName = deviatingContentTypeNameArray[i];
//logger.info("Updating deviatingContentTypeName:" + deviatingContentTypeName);
Iterator remoteContentTypeDefinitionVOListIterator = remoteContentTypeDefinitionVOList.iterator();
while(remoteContentTypeDefinitionVOListIterator.hasNext())
{
ContentTypeDefinitionVO remoteContentTypeDefinitionVO = (ContentTypeDefinitionVO)remoteContentTypeDefinitionVOListIterator.next();
//logger.info("remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
if(remoteContentTypeDefinitionVO.getName().equals(deviatingContentTypeName))
{
ContentTypeDefinitionVO localContentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(remoteContentTypeDefinitionVO.getName());
String newSchemaValue = localContentTypeDefinitionVO.getSchemaValue();
String[] attributeNameArray = this.getRequest().getParameterValues(deviatingContentTypeName + "_attributeName");
//logger.info("attributeNameArray:" + attributeNameArray);
if(attributeNameArray != null)
{
for(int j=0; j<attributeNameArray.length; j++)
{
String attributeName = attributeNameArray[j];
//logger.info(" * Updating attributeName:" + attributeName);
newSchemaValue = contentTypeDefinitionController.copyAttribute(remoteContentTypeDefinitionVO.getSchemaValue(), newSchemaValue, attributeName);
}
}
String[] categoryNameArray = this.getRequest().getParameterValues(deviatingContentTypeName + "_categoryName");
//logger.info("categoryNameArray:" + categoryNameArray);
if(categoryNameArray != null)
{
for(int j=0; j<categoryNameArray.length; j++)
{
String categoryName = categoryNameArray[j];
//logger.info(" * Updating categoryName:" + categoryName);
newSchemaValue = contentTypeDefinitionController.copyCategory(remoteContentTypeDefinitionVO.getSchemaValue(), newSchemaValue, categoryName);
}
}
String[] assetKeyArray = this.getRequest().getParameterValues(deviatingContentTypeName + "_assetKey");
//logger.info("assetKeyArray:" + assetKeyArray);
if(assetKeyArray != null)
{
for(int j=0; j<assetKeyArray.length; j++)
{
String assetKey = assetKeyArray[j];
//logger.info(" * Updating assetKey:" + assetKey);
newSchemaValue = contentTypeDefinitionController.copyAssetKey(remoteContentTypeDefinitionVO.getSchemaValue(), newSchemaValue, assetKey);
}
}
localContentTypeDefinitionVO.setSchemaValue(newSchemaValue);
ContentTypeDefinitionController.getController().update(localContentTypeDefinitionVO);
}
}
}
}
}
else
{
Map input = new HashMap();
List contentTypeDefinitionVOList = new ArrayList();
String[] missingContentTypeNameArray = this.getRequest().getParameterValues("missingContentTypeName");
//logger.info("missingContentTypeNameArray:" + missingContentTypeNameArray);
if(missingContentTypeNameArray != null)
{
for(int i=0; i<missingContentTypeNameArray.length; i++)
{
String missingContentTypeName = missingContentTypeNameArray[i];
logger.info("Updating missingContentTypeName:" + missingContentTypeName);
ContentTypeDefinitionVO localContentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(missingContentTypeName);
logger.info("Updating localContentTypeDefinitionVO:" + localContentTypeDefinitionVO);
contentTypeDefinitionVOList.add(localContentTypeDefinitionVO);
}
}
String[] deviatingContentTypeNameArray = this.getRequest().getParameterValues("deviatedContentTypeName");
//logger.info("deviatingContentTypeNameArray:" + deviatingContentTypeNameArray);
if(deviatingContentTypeNameArray != null)
{
for(int i=0; i<deviatingContentTypeNameArray.length; i++)
{
String deviatingContentTypeName = deviatingContentTypeNameArray[i];
logger.info("Updating deviatingContentTypeName:" + deviatingContentTypeName);
ContentTypeDefinitionVO localContentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(deviatingContentTypeName);
logger.info("Updating localContentTypeDefinitionVO as it was different:" + localContentTypeDefinitionVO);
contentTypeDefinitionVOList.add(localContentTypeDefinitionVO);
Map deviationArguments = new HashMap();