Package lumis.doui.source.field.type
Class FileDataType.Data
- java.lang.Object
-
- lumis.doui.source.field.type.FileDataType.Data
-
- All Implemented Interfaces:
IRenderable
,ISearchable
- Direct Known Subclasses:
DocumentDataType.Data
,MediaDataType.Data
- Enclosing class:
- FileDataType
public static class FileDataType.Data extends Object implements IRenderable, ISearchable
Data object for a field with derived file.- Since:
- 6.1.0
-
-
Constructor Summary
Constructors Constructor Description Data()
Data(FileConfig fileConfig)
Deprecated.Since 4.0.8 replaced by#Data(FileConfig, String)
so icon value is also set.Data(FileConfig fileConfig, FileMimeTypeConfig mimeTypeConfig)
Creates a new Data for the given fileConfig with the given mimeType.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getContentType()
String
getDisplayString(IRenderer renderer)
Returns the string to be displayed for representing this instance, when a short display is required.String
getFileId()
long
getFileSize()
String
getFullPath()
String
getIcon()
protected Map<String,Object>
getJSONData()
IFileMetadata
getMetadata()
String
getName()
String
getRenderData(IRenderer renderer)
Returns the data of this object in a standard xml format.Collection<SearchContentAttachment>
getSearchContentAttachments()
Deprecated.List<SearchContentField>
getSearchContentFields()
Deprecated.protected String
getXMLFragmentData(IRenderer renderer)
Generates the XML with the file informations.void
setContentType(String contentType)
void
setFileId(String fileId)
void
setFileSize(long fileSize)
void
setFullPath(String fullPath)
void
setIcon(String icon)
void
setMetadata(IFileMetadata metadata)
void
setName(String name)
-
-
-
Constructor Detail
-
Data
public Data()
-
Data
@Deprecated public Data(FileConfig fileConfig)
Deprecated.Since 4.0.8 replaced by#Data(FileConfig, String)
so icon value is also set.
-
Data
public Data(FileConfig fileConfig, FileMimeTypeConfig mimeTypeConfig)
Creates a new Data for the given fileConfig with the given mimeType.- Parameters:
fileConfig
- the fileConfig.mimeTypeConfig
- the mimeType information.- Since:
- 4.0.8
-
-
Method Detail
-
getContentType
public String getContentType()
-
setContentType
public void setContentType(String contentType)
-
getFileId
public String getFileId()
-
setFileId
public void setFileId(String fileId)
-
getFileSize
public long getFileSize()
-
setFileSize
public void setFileSize(long fileSize)
-
getFullPath
public String getFullPath()
-
setFullPath
public void setFullPath(String fullPath)
-
getIcon
public String getIcon()
-
setIcon
public void setIcon(String icon)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getMetadata
public IFileMetadata getMetadata()
-
setMetadata
public void setMetadata(IFileMetadata metadata)
-
getRenderData
public String getRenderData(IRenderer renderer) throws PortalException
Description copied from interface:IRenderable
Returns the data of this object in a standard xml format.- Specified by:
getRenderData
in interfaceIRenderable
- Parameters:
renderer
- the renderer object that will use the returned render data.- Returns:
- the xml data for this object.
- Throws:
PortalException
-
getXMLFragmentData
protected String getXMLFragmentData(IRenderer renderer) throws PortalException
Generates the XML with the file informations.- Parameters:
renderer
- the DOUI renderer of this data, ornull
if outside DOUI context.- Returns:
- the xml data
- Throws:
PortalException
- Since:
- 7.0.1
-
getJSONData
protected Map<String,Object> getJSONData() throws PortalException
- Returns:
- Throws:
PortalException
-
getDisplayString
public String getDisplayString(IRenderer renderer) throws PortalException
Description copied from interface:IRenderable
Returns the string to be displayed for representing this instance, when a short display is required.- Specified by:
getDisplayString
in interfaceIRenderable
- Parameters:
renderer
- the renderer object that will use the returned render data.- Returns:
- the string to be used to friendly display this instance.
- Throws:
PortalException
-
getSearchContentAttachments
@Deprecated public Collection<SearchContentAttachment> getSearchContentAttachments()
Deprecated.Description copied from interface:ISearchable
Returns the search content attachments to be used for indexing this object.Must never return
null
. May return an empty collection if no attachment is to be used for indexing this object.- Specified by:
getSearchContentAttachments
in interfaceISearchable
- Returns:
- the search content attachments.
-
getSearchContentFields
@Deprecated public List<SearchContentField> getSearchContentFields()
Deprecated.Description copied from interface:ISearchable
Returns the search content fields to be used for indexing this object.Note that the actual search content fields used are decided by the
ISourceSearchContentFiller
implementation used in the source. It may or may not use the fields returned by this method. This method provides only the default recommended search fields for this data.- Specified by:
getSearchContentFields
in interfaceISearchable
- Returns:
- the search content fields. Never returns
null
. May return an empty collection if no field is to be used for indexing this object.
-
-