if(this.digitalAssetVO != null)
this.assetFilePath = DigitalAssetController.getDigitalAssetProtectedFilePath(this.digitalAssetVO.getId());
}
else
{
ContentDeliveryController cdc = ContentDeliveryController.getContentDeliveryController();
Database db = CastorDatabaseService.getDatabase();
try
{
db.begin();
DeliveryContext deliveryContext = DeliveryContext.getDeliveryContext();
//assetUrl = cdc.getAssetUrl(db, contentId, languageId, assetKey, siteNodeId, true, deliveryContext, this.getInfoGluePrincipal());
logger.info("principal:" + this.principal);
if(this.principal == null)
{
this.principal = this.getInfoGluePrincipal();
if(this.principal == null)
this.principal = getAnonymousPrincipal();
}
//logger.info("principal:" + principal);
Integer digitalAssetId = cdc.getDigitalAssetId(db, contentId, languageId, assetKey, siteNodeId, true, deliveryContext, (InfoGluePrincipal)principal);
//logger.info("digitalAssetId:" + digitalAssetId);
if(digitalAssetId != null)
{
this.digitalAssetVO = DigitalAssetController.getSmallDigitalAssetVOWithId(digitalAssetId, db);
logger.info("digitalAssetVO:" + digitalAssetVO);