uploadedData);
//were done with the data, dereference.
uploadedData=null;
-
+
ent.setValueForProperty("publish_path",datePath+"/"+mediaFname);
ent.setValueForProperty("size", size.toString());
ent.update();
} catch (Exception e) {
- theLog.printError(e.toString());
+ theLog.printError(e.toString());
throw new MirMediaException(e.toString());
}
public void produce (Entity ent, Entity mediaTypeEnt )
throws MirMediaException {
-
+
//check first if the media file exist since produced
//location is also the storage location
String date = ent.getValue("date");
String fname = getStoragePath()+relPath;
if(! new File(fname).exists())
throw new MirMediaException("error in MirMedia.produce(): "+relPath+
- "does not exist!");
+ " does not exist!");
}
-
+
//a method that will probably never get used..
private byte[] getFile (String fileName)
if (size < 0) return null;
byte[] container = new byte[(int)size];
-
+
try {
FileUtil.read(fileName, container);
} catch (Exception e) {
- theLog.printError(e.toString());
+ theLog.printError(e.toString());
throw new MirMediaException(e.toString());
}
public String getIconAlt()
{
- return "Generic media";
+ return "Generic media";
}
public SimpleList getURL(Entity ent, Entity mediaTypeEnt)
}
}
-
-
+
+