Interface EditableElementParser
public interface EditableElementParser
Provides a utility to replace an editable element value.
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.liferay.portal.kernel.json.JSONObjectgetAttributes(org.jsoup.nodes.Element element) default com.liferay.portal.kernel.json.JSONObjectgetFieldTemplateConfigJSONObject(String fieldName, Locale locale, Object fieldValue) getValue(org.jsoup.nodes.Element element) default StringparseFieldValue(Object fieldValue) voidReplaces the editable element value with a new one.default voidreplace(org.jsoup.nodes.Element element, String value, com.liferay.portal.kernel.json.JSONObject configJSONObject) Replaces the editable element value with a new one and applies the configuration values.default voidvalidate(org.jsoup.nodes.Element element) Validates the editable element.
-
Method Details
-
getAttributes
default com.liferay.portal.kernel.json.JSONObject getAttributes(org.jsoup.nodes.Element element) -
getFieldTemplateConfigJSONObject
-
getValue
-
parseFieldValue
-
replace
Replaces the editable element value with a new one.- Parameters:
element- the editable element to replacevalue- the new element value
-
replace
default void replace(org.jsoup.nodes.Element element, String value, com.liferay.portal.kernel.json.JSONObject configJSONObject) Replaces the editable element value with a new one and applies the configuration values.- Parameters:
element- the editable element to replacevalue- the new element valueconfigJSONObject- the configuration values
-
validate
default void validate(org.jsoup.nodes.Element element) throws com.liferay.fragment.exception.FragmentEntryContentException Validates the editable element.- Parameters:
element- the editable element to validate- Throws:
com.liferay.fragment.exception.FragmentEntryContentException- if an invalid editable element is detected
-