net.anotheria.asg.util.helper.cmsview.CMSViewHelperUtil Maven / Gradle / Ivy
package net.anotheria.asg.util.helper.cmsview;
import java.util.List;
import net.anotheria.asg.data.DataObject;
public class CMSViewHelperUtil {
private CMSViewHelperUtil() {
}
public static String getFieldExplanation(String documentPath, DataObject object, String property){
List helpers = CMSViewHelperRegistry.getCMSViewHelpers(documentPath);
boolean moreThanOne = false;
String explanation = "";
for (CMSViewHelper h : helpers){
String message = h.getFieldExplanation(documentPath, object, property);
if (message!=null){
if (explanation.length()>0){
moreThanOne = true;
explanation+=", ";
}
explanation += message;
}
}
if (moreThanOne)
explanation = "CONFLICT: "+explanation;
return explanation.length()>0 ?
explanation : null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy