return assetFolderFile;
}
public String getAssetFileName(DigitalAssetVO digitalAssetVO, Integer contentId, Integer languageId, Database db) throws Exception
{
VisualFormatter formatter = new VisualFormatter();
String fileName = digitalAssetVO.getDigitalAssetId() + "_" + formatter.replaceNiceURINonAsciiWithSpecifiedChars(digitalAssetVO.getAssetFileName(), CmsPropertyHandler.getNiceURIDefaultReplacementCharacter());
if(CmsPropertyHandler.getAssetFileNameForm().equals("contentId_languageId_assetKey"))
{
if(contentId == null || languageId == null)
{
DigitalAsset asset = DigitalAssetController.getMediumDigitalAssetWithIdReadOnly(digitalAssetVO.getId(), db);
if(asset.getContentVersions() != null && asset.getContentVersions().size() > 0)
{
ContentVersion cv = (ContentVersion)asset.getContentVersions().iterator().next();
contentId = cv.getValueObject().getContentId();
languageId = cv.getValueObject().getLanguageId();
}
}
String assetFileName = digitalAssetVO.getAssetFileName();
String suffix = "";
int endingStartIndex = assetFileName.lastIndexOf(".");
if(endingStartIndex > -1)
suffix = assetFileName.substring(endingStartIndex);
fileName = "" + contentId + "_" + languageId + formatter.replaceNiceURINonAsciiWithSpecifiedChars(digitalAssetVO.getAssetKey(), CmsPropertyHandler.getNiceURIDefaultReplacementCharacter()) + suffix;
}
return fileName;
}