Package org.ofbiz.base.util.collections

Examples of org.ofbiz.base.util.collections.FlexibleMapAccessor


        protected FlexibleStringExpander methodExdr;
        protected FlexibleStringExpander classExdr;
       
        public IfValidateMethod(ModelScreen modelScreen, Element condElement) {
            super (modelScreen, condElement);
            this.fieldAcsr = new FlexibleMapAccessor(condElement.getAttribute("field-name"));
            this.methodExdr = new FlexibleStringExpander(condElement.getAttribute("method"));
            this.classExdr = new FlexibleStringExpander(condElement.getAttribute("class"));
        }
View Full Code Here


        protected String type;
        protected FlexibleStringExpander formatExdr;
       
        public IfCompare(ModelScreen modelScreen, Element condElement) {
            super (modelScreen, condElement);
            this.fieldAcsr = new FlexibleMapAccessor(condElement.getAttribute("field-name"));
            this.valueExdr = new FlexibleStringExpander(condElement.getAttribute("value"));
           
            this.operator = condElement.getAttribute("operator");
            this.type = condElement.getAttribute("type");
View Full Code Here

        protected String type;
        protected FlexibleStringExpander formatExdr;
       
        public IfCompareField(ModelScreen modelScreen, Element condElement) {
            super (modelScreen, condElement);
            this.fieldAcsr = new FlexibleMapAccessor(condElement.getAttribute("field-name"));
            this.toFieldAcsr = new FlexibleMapAccessor(condElement.getAttribute("to-field-name"));
           
            this.operator = condElement.getAttribute("operator");
            this.type = condElement.getAttribute("type");

            this.formatExdr = new FlexibleStringExpander(condElement.getAttribute("format"));
View Full Code Here

        protected FlexibleMapAccessor fieldAcsr;
        protected FlexibleStringExpander exprExdr;
       
        public IfRegexp(ModelScreen modelScreen, Element condElement) {
            super (modelScreen, condElement);
            this.fieldAcsr = new FlexibleMapAccessor(condElement.getAttribute("field-name"));
            this.exprExdr = new FlexibleStringExpander(condElement.getAttribute("expr"));
        }
View Full Code Here

    public static class IfEmpty extends ScreenCondition {
        protected FlexibleMapAccessor fieldAcsr;
       
        public IfEmpty(ModelScreen modelScreen, Element condElement) {
            super (modelScreen, condElement);
            this.fieldAcsr = new FlexibleMapAccessor(condElement.getAttribute("field-name"));
        }
View Full Code Here

    protected List<FlexibleStringExpander> selectFieldExpanderList;

    public PrimaryKeyFinder(Element entityOneElement) {
        super(entityOneElement);
        if (UtilValidate.isNotEmpty(entityOneElement.getAttribute("value-name")))
            this.valueNameAcsr = new FlexibleMapAccessor(entityOneElement.getAttribute("value-name"));
        this.autoFieldMapExdr = new FlexibleStringExpander(entityOneElement.getAttribute("auto-field-map"));

        // process field-map
        this.fieldMap = EntityFinderUtil.makeFieldMap(entityOneElement);
View Full Code Here

        this.label = label;

        this.filterByDateStrExdr = new FlexibleStringExpander(element.getAttribute("filter-by-date"));
        this.distinctStrExdr = new FlexibleStringExpander(element.getAttribute("distinct"));
        this.delegatorNameExdr = new FlexibleStringExpander(element.getAttribute("delegator-name"));
        this.listAcsr = new FlexibleMapAccessor(element.getAttribute("list-name"));
        this.resultSetTypeExdr = new FlexibleStringExpander(element.getAttribute("result-set-type"));

        // process select-field
        selectFieldExpanderList = EntityFinderUtil.makeSelectFieldExpanderList(element);
       
View Full Code Here

                String fieldName = fieldMapElement.getAttribute("field-name");
                String envName = fieldMapElement.getAttribute("env-name");
                String value = fieldMapElement.getAttribute("value");
                if (UtilValidate.isEmpty(fieldName)) {
                    // no fieldName, use envName for both
                    fieldMap.put(new FlexibleMapAccessor(envName), new FlexibleMapAccessor(envName));
                } else {
                    if (UtilValidate.isNotEmpty(value)) {
                        fieldMap.put(new FlexibleMapAccessor(fieldName), new FlexibleStringExpander(value));
                    } else {
                        // at this point we have a fieldName and no value, do we have a envName?
                        if (UtilValidate.isNotEmpty(envName)) {
                            fieldMap.put(new FlexibleMapAccessor(fieldName), new FlexibleMapAccessor(envName));
                        } else {
                            // no envName, use fieldName for both
                            fieldMap.put(new FlexibleMapAccessor(fieldName), new FlexibleMapAccessor(fieldName));
                        }
                    }
                }
            }
        }
View Full Code Here

    public static void expandFieldMapToContext(Map<FlexibleMapAccessor, Object> fieldMap, Map<String, Object> context, Map<String, Object> outContext) {
        //Debug.logInfo("fieldMap: " + fieldMap, module);
        if (fieldMap != null) {
            for (Map.Entry<FlexibleMapAccessor, Object> entry: fieldMap.entrySet()) {
                FlexibleMapAccessor serviceContextFieldAcsr = entry.getKey();
                Object valueSrc = entry.getValue();
                if (valueSrc instanceof FlexibleMapAccessor) {
                    FlexibleMapAccessor contextEnvAcsr = (FlexibleMapAccessor) valueSrc;
                    serviceContextFieldAcsr.put(outContext, contextEnvAcsr.get(context));
                } else if (valueSrc instanceof FlexibleStringExpander) {
                    FlexibleStringExpander valueExdr = (FlexibleStringExpander) valueSrc;
                    serviceContextFieldAcsr.put(outContext, valueExdr.expandString(context));
                } else {
                    // hmmmm...
View Full Code Here

                // no "field-name"? try "name"
                this.fieldNameExdr = new FlexibleStringExpander(conditionExprElement.getAttribute("name"));
            }

            this.operatorExdr = new FlexibleStringExpander(UtilFormatOut.checkEmpty(conditionExprElement.getAttribute("operator"), "equals"));
            this.envNameAcsr = new FlexibleMapAccessor(conditionExprElement.getAttribute("env-name"));
            this.valueExdr = new FlexibleStringExpander(conditionExprElement.getAttribute("value"));
            this.ignoreIfNull = "true".equals(conditionExprElement.getAttribute("ignore-if-null"));
            this.ignoreIfEmpty = "true".equals(conditionExprElement.getAttribute("ignore-if-empty"));
            this.ignoreCase = "true".equals(conditionExprElement.getAttribute("ignore-case"));
        }
View Full Code Here

TOP

Related Classes of org.ofbiz.base.util.collections.FlexibleMapAccessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.