Class AbstractMediaDataDelegate
java.lang.Object
org.silverpeas.components.gallery.delegate.AbstractMediaDataDelegate
- Direct Known Subclasses:
MediaDataCreateDelegate,MediaDataUpdateDelegate
- Author:
- Yohann Chastagnier
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMediaDataDelegate(MediaType mediaType, String language, String albumId, List<org.silverpeas.core.util.file.FileItem> parameters) AbstractMediaDataDelegate(MediaType mediaType, String language, String albumId, List<org.silverpeas.core.util.file.FileItem> parameters, boolean skipEmptyValues) -
Method Summary
Modifier and TypeMethodDescriptionorg.silverpeas.core.util.file.FileItemGets the file from parametersGet the photo header dataprotected MediaTypebooleanisForm()Checks if a form existsbooleanChecks if header data existsbooleanvoidsetForm(org.silverpeas.core.contribution.content.form.RecordSet recordSet, org.silverpeas.core.contribution.content.form.Form form) Set a form.voidupdateForm(String mediaId, org.silverpeas.core.contribution.content.form.PagesContext pagesContext) Perform a form updatevoidupdateHeader(Media media) Perform a header data update
-
Constructor Details
-
AbstractMediaDataDelegate
-
AbstractMediaDataDelegate
-
-
Method Details
-
getMediaType
-
isHeaderData
public boolean isHeaderData()Checks if header data exists- Returns:
- true if the header data is set. False otherwise.
-
getHeaderData
Get the photo header data- Returns:
- a
AbstractMediaDataDelegate.HeaderDatainstance.
-
isForm
public boolean isForm()Checks if a form exists- Returns:
- true if there is both a form set and the corresponding parameters to that form. False otherwise.
-
setForm
public void setForm(org.silverpeas.core.contribution.content.form.RecordSet recordSet, org.silverpeas.core.contribution.content.form.Form form) Set a form.- Parameters:
recordSet- the set of form's recordsform- the form definition.
-
updateHeader
Perform a header data update- Parameters:
media- the media to update with the header data.
-
updateForm
public void updateForm(String mediaId, org.silverpeas.core.contribution.content.form.PagesContext pagesContext) throws org.silverpeas.core.contribution.content.form.FormException Perform a form update- Parameters:
mediaId- the unique identifier of the media for which the form has to be updatedpagesContext- pages context of an updated form- Throws:
org.silverpeas.core.contribution.content.form.FormException
-
getLanguage
- Returns:
- the language
-
getAlbumId
- Returns:
- the albumId
-
getFileItem
public org.silverpeas.core.util.file.FileItem getFileItem()Gets the file from parameters- Returns:
- a
FileItemobject
-
isSkipEmptyValues
public boolean isSkipEmptyValues()- Returns:
- the skipEmptyValues
-