List initialDigitalAssets = new ArrayList();
Iterator digitalAssetsIterator = digitalAssets.iterator();
while(digitalAssetsIterator.hasNext())
{
DigitalAsset digitalAsset = (DigitalAsset)digitalAssetsIterator.next();
List initialContentVersions = new ArrayList();
initialContentVersions.add(contentVersion);
digitalAsset.setContentVersions(initialContentVersions);
if(digitalAsset.getAssetFileSize() == -1)
{
logger.info("digitalAsset:" + digitalAsset.getId() + "-" + digitalAsset.getAssetKey() + " was archived - let's fake it..");
digitalAsset.setAssetBytes("archived".getBytes());
}
db.create(digitalAsset);
initialDigitalAssets.add(digitalAsset);