Package org.apache.myfaces.extensions.validator.core.property

Examples of org.apache.myfaces.extensions.validator.core.property.PropertyDetails


        if(elResolver.getPath() == null || elResolver.getBaseObject() == null || elResolver.getProperty() == null)
        {
            return null;
        }

        return new PropertyDetails(elResolver.getPath(), elResolver.getBaseObject(), elResolver.getProperty());
    }
View Full Code Here


        Object baseObject = getValueOfExpression(facesContext, valueBindingExpression.getBaseExpression());

        //in case of e.g.: #{bean[bean.passwordRepeatedPropertyName]}
        //-> bean.passwordRepeatedPropertyName is not the final property name
        return new PropertyDetails(path, baseObject, getPropertyName(valueBindingExpression));
    }
View Full Code Here

    {
        invokeFilters(propertyInformation);

        PropertyInformation propertyInformationToStore = new DefaultPropertyInformation();

        PropertyDetails propertyDetails = propertyInformation
                .getInformation(PropertyInformationKeys.PROPERTY_DETAILS, PropertyDetails.class);

        copyMetaData(propertyInformation, propertyInformationToStore);

        getMapForClass(ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass()))
                .put(propertyDetails.getProperty(), propertyInformationToStore);
    }
View Full Code Here

    }

    private String resolveSourceKey(CrossValidationStorageEntry crossValidationStorageEntry)
    {
        PropertyDetails propertyDetails = crossValidationStorageEntry.getMetaDataEntry()
                .getProperty(PropertyInformationKeys.PROPERTY_DETAILS, PropertyDetails.class);

        String sourceKey = propertyDetails.getKey();

        if(!sourceKey.contains("."))
        {
            throw new IllegalStateException("source path: " + sourceKey + " invalid");
        }
View Full Code Here

        UIComponent uiComponent = (UIComponent) object;

        logger.finest("start extracting meta-data of " + uiComponent.getClass().getName());

        PropertyDetails propertyDetails = ExtValUtils.getELHelper().getPropertyDetailsOfValueBinding(uiComponent);

        if (propertyDetails == null)
        {
            return new DefaultPropertyInformation();
        }

        /*
         * get bean class and property name
         */
        Class entityClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());

        PropertyInformation propertyInformation = getPropertyInformation(entityClass, propertyDetails);

        logger.finest("extract finished");

View Full Code Here

            Map<String, PropertyDetails> classMap = getMapForClass(originalClass);
            classMap.put(originalProperty, null);
            return;
        }

        PropertyDetails propertyDetails = new PropertyDetails(targetPropertyDetails.getKey(),
                targetPropertyDetails.getBaseObject(), targetPropertyDetails.getProperty());

        getMapForClass(originalClass).put(originalProperty, propertyDetails);
    }
View Full Code Here

        if(isFilteredClass(originalClass))
        {
            return null;
        }

        PropertyDetails foundEntry = getMapForClass(originalClass).get(originalProperty);

        if(foundEntry == null)
        {
            return null;
        }

        return new PropertyDetails(foundEntry.getKey(), foundEntry.getBaseObject(), foundEntry.getProperty());
    }
View Full Code Here

        return this.propertyDetailsMap.get(key);
    }

    private PropertyDetails createDefaultValue()
    {
        return new PropertyDetails(null, null, null);
    }
View Full Code Here

        String[] targetExpressions = metaDataEntry.getValue(JoinValidation.class).value();

        ValidationStrategy validationStrategy;

        PropertyDetails propertyDetails;
        for (String targetExpression : targetExpressions)
        {
            propertyDetails = ExtValUtils
                .createPropertyDetailsForNewTarget(metaDataEntry, targetExpression);
View Full Code Here

        if (!(object instanceof PropertyDetails))
        {
            throw new IllegalStateException(object.getClass() + " is not a " + PropertyDetails.class.getName());
        }

        PropertyDetails propertyDetails = (PropertyDetails)object;

        Class entityClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());

        //TODO test with complex components
        propertyInformation.setInformation(
            PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);

        /*
         * find and add annotations
         */
        PropertyStorage storage = ReflectionUtils.getPropertyStorage();

        addPropertyAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
        addFieldAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);

        return propertyInformation;
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.validator.core.property.PropertyDetails

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.