Search in sources :

Example 16 with LogicExpressionResult

use of org.adempiere.ad.expression.api.LogicExpressionResult in project metasfresh-webui-api by metasfresh.

the class DocumentChangesCollector method collectDisplayedIfChanged.

@Override
public void collectDisplayedIfChanged(final IDocumentFieldView documentField, final LogicExpressionResult valueOld, final ReasonSupplier reason) {
    // If there is no change, don't collect the value
    final LogicExpressionResult value = documentField.getDisplayed();
    if (value.equalsByNameAndValue(valueOld)) {
        return;
    }
    final ReasonSupplier reasonNew = reason.add("displayed", value);
    documentChanges(documentField).collectDisplayedChanged(documentField, reasonNew);
}
Also used : LogicExpressionResult(org.adempiere.ad.expression.api.LogicExpressionResult)

Example 17 with LogicExpressionResult

use of org.adempiere.ad.expression.api.LogicExpressionResult in project metasfresh-webui-api by metasfresh.

the class DocumentChangesCollector method collectMandatoryIfChanged.

@Override
public void collectMandatoryIfChanged(final IDocumentFieldView documentField, final LogicExpressionResult valueOld, final ReasonSupplier reason) {
    // If there is no change, don't collect the value
    final LogicExpressionResult value = documentField.getMandatory();
    if (value.equalsByNameAndValue(valueOld)) {
        return;
    }
    final ReasonSupplier reasonNew = reason.add("mandatory", value);
    documentChanges(documentField).collectMandatoryChanged(documentField, reasonNew);
}
Also used : LogicExpressionResult(org.adempiere.ad.expression.api.LogicExpressionResult)

Aggregations

LogicExpressionResult (org.adempiere.ad.expression.api.LogicExpressionResult)17 ILogicExpression (org.adempiere.ad.expression.api.ILogicExpression)6 AdempiereException (org.adempiere.exceptions.AdempiereException)6 DocumentProcessingException (de.metas.document.exceptions.DocumentProcessingException)4 DocumentFieldNotFoundException (de.metas.ui.web.window.exceptions.DocumentFieldNotFoundException)4 DocumentFieldReadonlyException (de.metas.ui.web.window.exceptions.DocumentFieldReadonlyException)4 DocumentNotFoundException (de.metas.ui.web.window.exceptions.DocumentNotFoundException)4 InvalidDocumentStateException (de.metas.ui.web.window.exceptions.InvalidDocumentStateException)4 ReasonSupplier (de.metas.ui.web.window.model.IDocumentChangesCollector.ReasonSupplier)2 DocumentValidStatus (de.metas.ui.web.window.model.DocumentValidStatus)1 Evaluatee (org.compiere.util.Evaluatee)1