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))
{
logger.info("Creating remoteContentTypeDefinitionVO:" + remoteContentTypeDefinitionVO.getName());
ContentTypeDefinitionController.getController().create(remoteContentTypeDefinitionVO);
}
}
}
}
if(deviatingContentTypeNameArray != null)
{
Iterator deviatingContentTypeNameArrayIterator = deviatingContentTypeNameArray.iterator();
while(deviatingContentTypeNameArrayIterator.hasNext())
{
String deviatingContentTypeName = (String)deviatingContentTypeNameArrayIterator.next();
//logger.info("Updating deviatingContentTypeName:" + deviatingContentTypeName);
Map deviationArguments = (Map)arguments.get("deviationArguments_" + deviatingContentTypeName);
logger.info("deviationArguments:" + deviationArguments);
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();
//Enkelt - vid push till�ter vi bara push av hela inneh�llstypen
newSchemaValue = remoteContentTypeDefinitionVO.getSchemaValue();
/*
logger.info("deviationArguments:" + deviationArguments);
List attributes = (List)deviationArguments.get("attributes");
List categories = (List)deviationArguments.get("categories");
List assets = (List)deviationArguments.get("assets");
if(attributes != null)
{
Iterator attributesIterator = attributes.iterator();
while(attributesIterator.hasNext())
{
String attributeName = (String)attributesIterator.next();
logger.info(" * Updating attributeName:" + attributeName);
newSchemaValue = contentTypeDefinitionController.copyAttribute(remoteContentTypeDefinitionVO.getSchemaValue(), newSchemaValue, attributeName);
}
}
if(categories != null)
{
Iterator categoryIterator = categories.iterator();
while(categoryIterator.hasNext())
{
String categoryName = (String)categoryIterator.next();
logger.info(" * Updating categoryName:" + categoryName);
newSchemaValue = contentTypeDefinitionController.copyCategory(remoteContentTypeDefinitionVO.getSchemaValue(), newSchemaValue, categoryName);
}
}
if(assets != null)
{
Iterator assetsIterator = assets.iterator();
while(assetsIterator.hasNext())
{
String assetKey = (String)assetsIterator.next();
logger.info(" * Updating assetKey:" + assetKey);
newSchemaValue = contentTypeDefinitionController.copyAssetKey(remoteContentTypeDefinitionVO.getSchemaValue(), newSchemaValue, assetKey);
}
}
*/
localContentTypeDefinitionVO.setSchemaValue(newSchemaValue);
logger.info("Updating localContentTypeDefinitionVO:" + localContentTypeDefinitionVO.getName());
ContentTypeDefinitionController.getController().update(localContentTypeDefinitionVO);
}
}
}