Package org.opencms.ugc
Class CmsUgcDataItem
- java.lang.Object
-
- org.opencms.ugc.CmsUgcDataItem
-
- All Implemented Interfaces:
I_CmsFormDataItem
public class CmsUgcDataItem extends java.lang.Object implements I_CmsFormDataItem
Implementation of the I_CmsFormDataItem which delegates its methods to a FileItem from Apache Commons Upload.
-
-
Constructor Summary
Constructors Constructor Description CmsUgcDataItem(org.apache.commons.fileupload.FileItem item)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
Gets the data from the field as a byte array.java.lang.String
getFieldName()
Gets the field name.java.lang.String
getFileName()
Gets the file name, if this is a file upload field.
-
-
-
Constructor Detail
-
CmsUgcDataItem
public CmsUgcDataItem(org.apache.commons.fileupload.FileItem item)
Creates a new instance.- Parameters:
item
- the file item to wrap
-
-
Method Detail
-
getData
public byte[] getData()
Description copied from interface:I_CmsFormDataItem
Gets the data from the field as a byte array.- Specified by:
getData
in interfaceI_CmsFormDataItem
- Returns:
- the field data
- See Also:
I_CmsFormDataItem.getData()
-
getFieldName
public java.lang.String getFieldName()
Description copied from interface:I_CmsFormDataItem
Gets the field name.- Specified by:
getFieldName
in interfaceI_CmsFormDataItem
- Returns:
- the field name
- See Also:
I_CmsFormDataItem.getFieldName()
-
getFileName
public java.lang.String getFileName()
Description copied from interface:I_CmsFormDataItem
Gets the file name, if this is a file upload field.- Specified by:
getFileName
in interfaceI_CmsFormDataItem
- Returns:
- the file name
- See Also:
I_CmsFormDataItem.getFileName()
-
-