ContentVO createdContentVO = ContentControllerProxy.getController().acCreate(this.principal, parentContentId, contentTypeDefinitionId, repositoryId, contentVO);
//Create initial content version also... in masterlanguage
String versionValue = "<?xml version='1.0' encoding='UTF-8'?><article xmlns=\"x-schema:ArticleSchema.xml\"><attributes><Name><![CDATA[" + fileName + "]]></Name></attributes></article>";
ContentVersionVO cvVO = new ContentVersionVO();
cvVO.setVersionComment("Initial version");
cvVO.setVersionModifier(this.principal.getName());
cvVO.setVersionValue(versionValue);
ContentVersionVO newContentVersion = ContentVersionController.getContentVersionController().create(contentVO.getId(), masterLanguageVO.getId(), cvVO, null);
if(newContentVersion != null)
{
AssetKeyDefinition assetKeyDefinition = ContentTypeDefinitionController.getController().getDefinedAssetKey(this.contentTypeDefinitionVO, true, digitalAssetKey);
keepOriginal = handleTransformations(newAsset, file, contentType, assetKeyDefinition, newContentVersion.getId());
if(keepOriginal)
{
List<Integer> newContentVersionIdList = new ArrayList<Integer>();
digitalAssetVO = DigitalAssetController.create(newAsset, is, newContentVersion.getId(), this.getInfoGluePrincipal(), newContentVersionIdList);
}
}
if(CmsPropertyHandler.getEnableDiskAssets().equals("true"))
{