public void produce(Entity anImageEntity, Entity mediaTypeEnt) throws MediaExc, MediaFailure {
try {
- String date = anImageEntity.getValue("date");
+ String date = anImageEntity.getFieldValue("date");
String datePath = StringUtil.webdbDate2path(date);
- String ext = "." + mediaTypeEnt.getValue("name");
+ String ext = "." + mediaTypeEnt.getFieldValue("name");
String fileBasePath = datePath + anImageEntity.getId();
String filePath = fileBasePath + ext;
String iconPath = getIconStoragePath() + fileBasePath + ".jpg";
}
processor.writeScaledData(iconFile, "JPEG");
- anImageEntity.setValueForProperty("img_height", new Integer(processor.getHeight()).toString());
- anImageEntity.setValueForProperty("img_width", new Integer(processor.getWidth()).toString());
+ anImageEntity.setFieldValue("img_height", new Integer(processor.getHeight()).toString());
+ anImageEntity.setFieldValue("img_width", new Integer(processor.getWidth()).toString());
- anImageEntity.setValueForProperty("icon_height", new Integer(processor.getScaledHeight()).toString());
- anImageEntity.setValueForProperty("icon_width", new Integer(processor.getScaledWidth()).toString());
+ anImageEntity.setFieldValue("icon_height", new Integer(processor.getScaledHeight()).toString());
+ anImageEntity.setFieldValue("icon_width", new Integer(processor.getScaledWidth()).toString());
- anImageEntity.setValueForProperty("icon_path", iconPath);
- anImageEntity.setValueForProperty("publish_path", filePath);
+ anImageEntity.setFieldValue("icon_path", iconPath);
+ anImageEntity.setFieldValue("publish_path", filePath);
anImageEntity.update();
public InputStream getIcon(Entity anImageEntity) throws MediaExc, MediaFailure {
try {
String filePath =
- configuration.getString("Producer.StorageRoot") + anImageEntity.getValue("icon_path");
+ configuration.getString("Producer.StorageRoot") + anImageEntity.getFieldValue("icon_path");
logger.info(filePath);