Class KmeliaXmlFormUpdateContext
java.lang.Object
org.silverpeas.components.kmelia.service.KmeliaXmlFormUpdateContext
Handles the context of an Xml Form update.
It permits to manage some useful caches.
- Author:
- silveryocha
-
Constructor Summary
ConstructorsConstructorDescriptionKmeliaXmlFormUpdateContext(List<org.silverpeas.core.util.file.FileItem> items, boolean forceUpdatePublication) -
Method Summary
Modifier and TypeMethodDescriptionList<org.silverpeas.core.util.file.FileItem>getItems()org.silverpeas.kernel.util.Pair<org.silverpeas.core.contribution.template.publication.PublicationTemplate,org.silverpeas.core.contribution.content.form.DataRecord> getOrInitializePublicationDataRecordOf(org.silverpeas.core.contribution.publication.model.PublicationDetail pub, String language) Gets aPairofFormand existingDataRecordof the given publication if any or initializes a newDataRecordotherwise.List<org.silverpeas.kernel.util.Pair<org.silverpeas.core.util.file.FileItem,org.silverpeas.core.contribution.content.form.field.FileField>> getPublicationFileFields(org.silverpeas.core.contribution.publication.model.PublicationDetail pub, String language) Gets the list of couples ofFileItemandFileFieldabout the given publication and language.Gets from the context the shot name of the Xml Form.booleanboolean
-
Constructor Details
-
KmeliaXmlFormUpdateContext
public KmeliaXmlFormUpdateContext(List<org.silverpeas.core.util.file.FileItem> items, boolean forceUpdatePublication)
-
-
Method Details
-
batchProcessing
-
getItems
-
isForceUpdatePublication
public boolean isForceUpdatePublication() -
isBatchProcessing
public boolean isBatchProcessing() -
getXmlFormShortNameFromItems
Gets from the context the shot name of the Xml Form.- Returns:
- a name as string.
-
getPublicationFileFields
public List<org.silverpeas.kernel.util.Pair<org.silverpeas.core.util.file.FileItem,org.silverpeas.core.contribution.content.form.field.FileField>> getPublicationFileFields(org.silverpeas.core.contribution.publication.model.PublicationDetail pub, String language) Gets the list of couples ofFileItemandFileFieldabout the given publication and language.- Parameters:
pub- a publication.language- a language.- Returns:
- a list of couple of
FileItemandFileField.
-
getOrInitializePublicationDataRecordOf
public org.silverpeas.kernel.util.Pair<org.silverpeas.core.contribution.template.publication.PublicationTemplate,org.silverpeas.core.contribution.content.form.DataRecord> getOrInitializePublicationDataRecordOf(org.silverpeas.core.contribution.publication.model.PublicationDetail pub, String language) Gets aPairofFormand existingDataRecordof the given publication if any or initializes a newDataRecordotherwise.Searched elements are cached in order to improve the treatment processing.
- Parameters:
pub- the aimed publication.language- the current managed language.- Returns:
- a
PairofFormandDataRecord. - Throws:
KmeliaRuntimeException- in case of publication template service error or in case of form management error.
-