Package org.ofbiz.base.util.collections

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


    }
    public static class ConditionObject implements Condition {
        protected FlexibleMapAccessor fieldNameAcsr;
       
        public ConditionObject(Element conditionExprElement) {
            this.fieldNameAcsr = new FlexibleMapAccessor(conditionExprElement.getAttribute("field-name"));
            if (this.fieldNameAcsr.isEmpty()) {
                // no "field-name"? try "name"
                this.fieldNameAcsr = new FlexibleMapAccessor(conditionExprElement.getAttribute("name"));
            }
        }
View Full Code Here


    }
    public static class VariableElement implements StringElement {
        protected FlexibleMapAccessor fma;
       
        public VariableElement(String valueName) {
            this.fma = new FlexibleMapAccessor(valueName);
        }
View Full Code Here

                currencyCode = envName.substring(currencyPos+10, closeBracket);
                localizeCurrency = true;
                envName = envName.substring(0, currencyPos);
            }

            FlexibleMapAccessor fma = new FlexibleMapAccessor(envName);
            Object envVal = fma.get(context, locale);
            if (envVal != null) {
                if (localizeCurrency) {
                    targetBuffer.append(UtilFormatOut.formatCurrency(new Double(envVal.toString()), currencyCode, locale));
                } else {
                    try {
View Full Code Here

        protected FlexibleStringExpander globalExdr;
        protected String type;
       
        public SetField(ModelForm modelForm, Element setElement) {
            super (modelForm, setElement);
            this.field = new FlexibleMapAccessor(setElement.getAttribute("field"));
            this.fromField = UtilValidate.isNotEmpty(setElement.getAttribute("from-field")) ? new FlexibleMapAccessor(setElement.getAttribute("from-field")) : null;
            this.valueExdr = UtilValidate.isNotEmpty(setElement.getAttribute("value")) ? new FlexibleStringExpander(setElement.getAttribute("value")) : null;
            this.defaultExdr = new FlexibleStringExpander(setElement.getAttribute("default-value"));
            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
            this.type = setElement.getAttribute("type");
            if (this.fromField != null && this.valueExdr != null) {
View Full Code Here

        protected FlexibleStringExpander globalExdr;
       
        public PropertyMap(ModelForm modelForm, Element setElement) {
            super (modelForm, setElement);
            this.resourceExdr = new FlexibleStringExpander(setElement.getAttribute("resource"));
            this.mapNameAcsr = new FlexibleMapAccessor(setElement.getAttribute("map-name"));
            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
        }
View Full Code Here

        public PropertyToField(ModelForm modelForm, Element setElement) {
            super (modelForm, setElement);
            this.resourceExdr = new FlexibleStringExpander(setElement.getAttribute("resource"));
            this.propertyExdr = new FlexibleStringExpander(setElement.getAttribute("property"));
            this.fieldAcsr = new FlexibleMapAccessor(setElement.getAttribute("field"));
            this.defaultExdr = new FlexibleStringExpander(setElement.getAttribute("default"));
            noLocale = "true".equals(setElement.getAttribute("no-locale"));
            this.argListAcsr = new FlexibleMapAccessor(setElement.getAttribute("arg-list-name"));
            this.globalExdr = new FlexibleStringExpander(setElement.getAttribute("global"));
        }
View Full Code Here

        protected Map<FlexibleMapAccessor, Object> fieldMap;
       
        public Service(ModelForm modelForm, Element serviceElement) {
            super (modelForm, serviceElement);
            this.serviceNameExdr = new FlexibleStringExpander(serviceElement.getAttribute("service-name"));
            this.resultMapNameAcsr = UtilValidate.isNotEmpty(serviceElement.getAttribute("result-map-name")) ? new FlexibleMapAccessor(serviceElement.getAttribute("result-map-name")) : null;
            this.autoFieldMapExdr = new FlexibleStringExpander(serviceElement.getAttribute("auto-field-map"));
            if (UtilValidate.isEmpty(serviceElement.getAttribute("result-map-list-name"))) {
                if (UtilValidate.isEmpty(serviceElement.getAttribute("result-map-list-iterator-name"))) {
                    String lstNm = modelForm.getListName();
                    if (UtilValidate.isEmpty(lstNm)) {
View Full Code Here

    public EntityCount(Element element, SimpleMethod simpleMethod) {
        super(element, simpleMethod);
        this.entityNameExdr = new FlexibleStringExpander(element.getAttribute("entity-name"));
        this.delegatorNameExdr = new FlexibleStringExpander(element.getAttribute("delegator-name"));
        this.countAcsr = new FlexibleMapAccessor(element.getAttribute("count-name"));
       
        // process condition-expr | condition-list
        Element conditionExprElement = UtilXml.firstChildElement(element, "condition-expr");
        Element conditionListElement = UtilXml.firstChildElement(element, "condition-list");
        Element conditionObjectElement = UtilXml.firstChildElement(element, "condition-object");
View Full Code Here

        protected FlexibleStringExpander methodExdr;
        protected FlexibleStringExpander classExdr;
       
        public IfValidateMethod(ModelTree modelTree, Element condElement) {
            super (modelTree, 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(ModelTree modelTree, Element condElement) {
            super (modelTree, 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

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.