this.digitalAssetKey = new String(this.digitalAssetKey.getBytes(fromEncoding), toEncoding);
List<Integer> newContentVersionIdList = new ArrayList<Integer>();
DigitalAssetVO digitalAssetVO = ContentVersionController.getContentVersionController().checkStateAndChangeIfNeeded(contentVersionId, digitalAssetId, getInfoGluePrincipal(), newContentVersionIdList);
if(newContentVersionIdList.size() > 0)
{
Integer newContentVersionId = newContentVersionIdList.get(0);
if(this.contentVersionId != newContentVersionId)
refreshAll = true;
setContentVersionId(newContentVersionId);
}
digitalAssetVO.setAssetKey(this.digitalAssetKey);
if(mpr != null)
{
Enumeration names = mpr.getFileNames();
while (names.hasMoreElements())
{
String name = (String)names.nextElement();
file = mpr.getFile(name);
if(file != null)
{
String contentType = mpr.getContentType(name);
String fileSystemName = mpr.getFilesystemName(name);
String fileName = fileSystemName;
fileName = formatter.replaceNiceURINonAsciiWithSpecifiedChars(fileName, CmsPropertyHandler.getNiceURIDefaultReplacementCharacter());
//fileName = new VisualFormatter().replaceNonAscii(fileName, '_');
String tempFileName = "tmp_" + System.currentTimeMillis() + "_" + fileName;
//String filePath = file.getParentFile().getPath();
String filePath = CmsPropertyHandler.getDigitalAssetPath();
fileSystemName = filePath + File.separator + tempFileName;
digitalAssetVO.setAssetContentType(contentType);
digitalAssetVO.setAssetFileName(fileName);
digitalAssetVO.setAssetFilePath(filePath);
digitalAssetVO.setAssetFileSize(new Integer(new Long(file.length()).intValue()));
is = new FileInputStream(file);
//String fileUploadMaximumSize = getPrincipalPropertyValue("fileUploadMaximumSize", false, true);
if(myFileUploadSizeLimit.intValue() > -1 && myFileUploadSizeLimit.intValue() < new Long(file.length()).intValue())