本文整理汇总了Java中org.apache.myfaces.custom.fileupload.UploadedFile类的典型用法代码示例。如果您正苦于以下问题:Java UploadedFile类的具体用法?Java UploadedFile怎么用?Java UploadedFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UploadedFile类属于org.apache.myfaces.custom.fileupload包,在下文中一共展示了UploadedFile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: upload
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
/**
* Upload.
*
* @param file the file
* @return the file
*/
private File upload(UploadedFile file) {
if (file == null)
return null;
String name = FilenameUtils.getName(file.getName());
File tempFile = new File(privateFolder, name);
try {
InputStream is = file.getInputStream();
try {
copyTo(is, tempFile);
} finally {
is.close();
}
} catch (IOException e) {
tempFile = null;
}
return tempFile;
}
开发者ID:Orange-OpenSource,项目名称:matos-tool,代码行数:24,代码来源:MatosCampaign.java
示例2: testSave
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
@Test
public void testSave() throws Exception {
TemplateBean bean = getTestBean();
UploadedFile uf = Mockito.mock(UploadedFile.class);
Mockito.when(uf.getName()).thenReturn("test.txt");
bean.setUploadedFile(uf);
assertNull(bean.getStatus());
bean.save();
assertNotNull(bean.getStatus());
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:15,代码来源:TemplateBeanTest.java
示例3: setUploadedFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedFile(UploadedFile uploadedFile)
{
// note: only replace the previously uploaded file, if user specified a
// new file (since multiple page reloads may occur before the
// transformation operation is invoked)
if (uploadedFile != null) {
log.info("uploaded new file " + uploadedFile);
_uploadedFile = uploadedFile;
}
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:11,代码来源:PlateReaderRawDataTransformer.java
示例4: getUploadedFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedFile() {
return uploadedFile;
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:TemplateBean.java
示例5: setUploadedFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedFile(UploadedFile uploadedFile) {
this.uploadedFile = uploadedFile;
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:TemplateBean.java
示例6: getOrganizationProperties
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getOrganizationProperties() {
return organizationProperties;
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:OperatorOrgBean.java
示例7: setOrganizationProperties
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setOrganizationProperties(UploadedFile organizationProperties) {
this.organizationProperties = organizationProperties;
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:4,代码来源:OperatorOrgBean.java
示例8: getFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getFile() {
return file;
}
开发者ID:aureliano,项目名称:verbum-domini,代码行数:4,代码来源:BookEditMB.java
示例9: setFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setFile(UploadedFile file) {
this.file = file;
}
开发者ID:aureliano,项目名称:verbum-domini,代码行数:4,代码来源:BookEditMB.java
示例10: getUpFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUpFile() {
return upFile;
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:SpreadsheetUploadBean.java
示例11: setUpFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUpFile(UploadedFile upFile) {
if(log.isDebugEnabled()) log.debug("upload file name " + upFile.getName());
this.upFile = upFile;
}
开发者ID:sakaiproject,项目名称:sakai,代码行数:5,代码来源:SpreadsheetUploadBean.java
示例12: getTemporaryFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getTemporaryFile() {
return temporaryFile;
}
开发者ID:faramir,项目名称:ZawodyWeb,代码行数:4,代码来源:RequestBean.java
示例13: setTemporaryFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setTemporaryFile(UploadedFile temporaryFile) {
this.temporaryFile = temporaryFile;
}
开发者ID:faramir,项目名称:ZawodyWeb,代码行数:4,代码来源:RequestBean.java
示例14: setUploadedFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedFile(UploadedFile uploadedFile)
{
_uploadedFile = uploadedFile;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:LibraryContentsImporter.java
示例15: getUploadedFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedFile()
{
return _uploadedFile;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:LibraryContentsImporter.java
示例16: setUploadedPublicationAttachedFileContents
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedPublicationAttachedFileContents(UploadedFile uploadedFile)
{
_uploadedPublicationAttachedFileContents = uploadedFile;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:ScreenDetailViewer.java
示例17: getUploadedPublicationAttachedFileContents
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedPublicationAttachedFileContents()
{
return _uploadedPublicationAttachedFileContents;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:ScreenDetailViewer.java
示例18: setUploadedAttachedFileContents
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUploadedAttachedFileContents(UploadedFile uploadedFile)
{
_uploadedAttachedFileContents = uploadedFile;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:AttachedFiles.java
示例19: getUploadedAttachedFileContents
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public UploadedFile getUploadedAttachedFileContents()
{
return _uploadedAttachedFileContents;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:AttachedFiles.java
示例20: setUserAgreementUploadedFile
import org.apache.myfaces.custom.fileupload.UploadedFile; //导入依赖的package包/类
public void setUserAgreementUploadedFile(UploadedFile uploadedFile)
{
_userAgreementUploadedFile = uploadedFile;
}
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:5,代码来源:UserAgreementUpdater.java
注:本文中的org.apache.myfaces.custom.fileupload.UploadedFile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论