*
* @see mir.media.MirMediaHandler
* @author mh
- * @version $Id: MediaHandlerImages.java,v 1.23.2.3 2003/12/14 16:37:07 zapata Exp $
+ * @version $Id: MediaHandlerImages.java,v 1.23.2.4 2004/01/18 17:30:58 zapata Exp $
*/
}
public void produce(Entity ent, Entity mediaTypeEnt) throws MediaExc, MediaFailure {
- String date = ent.getValue("date");
+ String date = ent.getFieldValue("date");
String datePath = StringUtil.webdbDate2path(date);
- String ext = "."+mediaTypeEnt.getValue("name");
+ String ext = "."+mediaTypeEnt.getFieldValue("name");
String filepath = datePath+ent.getId()+ext;
String iconFilePath = configuration.getString("Producer.StorageRoot")
+getIconStoragePath() + filepath;
String productionFilePath = getStoragePath() + File.separator + filepath;
- if (ent.getValue("icon_data")!= null &&
- ent.getValue("image_data")!= null) {
+ if (ent.getFieldValue("icon_data")!= null &&
+ ent.getFieldValue("image_data")!= null) {
// make icon
try {
InputStream in = ((EntityImages)ent).getIcon();
FileUtil.write(iconFilePath, in);
in = ((EntityImages)ent).getImage();
FileUtil.write(productionFilePath, in);
- ent.setValueForProperty("icon_path",getIconStoragePath()+filepath);
- ent.setValueForProperty("publish_path",filepath);
+ ent.setFieldValue("icon_path",getIconStoragePath()+filepath);
+ ent.setFieldValue("publish_path",filepath);
ent.update();
}
catch (Throwable e) {