本文整理汇总了Java中org.richfaces.model.UploadedFile.delete方法的典型用法代码示例。如果您正苦于以下问题:Java UploadedFile.delete方法的具体用法?Java UploadedFile.delete怎么用?Java UploadedFile.delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.richfaces.model.UploadedFile
的用法示例。
在下文中一共展示了UploadedFile.delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: uploadImage
import org.richfaces.model.UploadedFile; //导入方法依赖的package包/类
public void uploadImage(FileUploadEvent event) {
UploadedFile uploadedFile = event.getUploadedFile();
this.uploadedImage = null;
try {
GluuImage image = imageService.constructImage((GluuCustomPerson) Component.getInstance("currentPerson"), uploadedFile);
image.setStoreTemporary(true);
if (imageService.createImageFiles(image)) {
this.uploadedImage = image;
}
} finally {
try {
uploadedFile.delete();
} catch (IOException ex) {
log.error("Failed to remove temporary image", ex);
}
}
}
示例2: uploadImage
import org.richfaces.model.UploadedFile; //导入方法依赖的package包/类
public void uploadImage(FileUploadEvent event) {
UploadedFile uploadedFile = event.getUploadedFile();
this.uploadedImage = null;
try {
GluuImage image = imageService.constructImage(identity.getUser(), uploadedFile);
image.setStoreTemporary(true);
if (imageService.createImageFiles(image)) {
this.uploadedImage = image;
}
} finally {
try {
uploadedFile.delete();
} catch (IOException ex) {
log.error("Failed to remove temporary image", ex);
}
}
}
示例3: setCustLogoImage
import org.richfaces.model.UploadedFile; //导入方法依赖的package包/类
public void setCustLogoImage(FileUploadEvent event) {
UploadedFile uploadedFile = event.getUploadedFile();
try {
setCustLogoImageImpl(uploadedFile);
} finally {
try {
uploadedFile.delete();
} catch (IOException ex) {
log.error("Failed to remove temporary image", ex);
}
}
}
示例4: setFaviconImage
import org.richfaces.model.UploadedFile; //导入方法依赖的package包/类
public void setFaviconImage(FileUploadEvent event) {
UploadedFile uploadedFile = event.getUploadedFile();
try {
setFaviconImageImpl(uploadedFile);
} finally {
try {
uploadedFile.delete();
} catch (IOException ex) {
log.error("Failed to remove temporary image", ex);
}
}
}
示例5: setIconImage
import org.richfaces.model.UploadedFile; //导入方法依赖的package包/类
@Restrict("#{s:hasPermission('uma', 'access')}")
public void setIconImage(FileUploadEvent event) {
UploadedFile uploadedFile = event.getUploadedFile();
try {
setIconImageImpl(uploadedFile);
} finally {
try {
uploadedFile.delete();
} catch (IOException ex) {
log.error("Failed to remove temporary image", ex);
}
}
}
示例6: setIconImage
import org.richfaces.model.UploadedFile; //导入方法依赖的package包/类
public void setIconImage(FileUploadEvent event) {
UploadedFile uploadedFile = event.getUploadedFile();
try {
setIconImageImpl(uploadedFile);
} finally {
try {
uploadedFile.delete();
} catch (IOException ex) {
log.error("Failed to remove temporary image", ex);
}
}
}