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

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


    {
        return new MetaDataExtractor()
        {
            public PropertyInformation extract(FacesContext facesContext, Object object)
            {
                PropertyInformation result = metaDataExtractor.extract(facesContext, object);
                for(MetaDataExtractionInterceptor metaDataExtractionInterceptor :
                        ExtValContext.getContext().getMetaDataExtractionInterceptors())
                {
                    metaDataExtractionInterceptor.afterExtracting(result);
                }
View Full Code Here


    @Override
    @ToDo(Priority.MEDIUM)
    public PropertyInformation extract(FacesContext facesContext, Object object)
    {
        PropertyInformation propertyInformation = new DefaultPropertyInformation();

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

        PropertyDetails propertyDetails = (PropertyDetails)object;

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

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

        /*
         * find and add annotations
         */
 
View Full Code Here

                                            List<Class> restrictedGroupsForModelValidation,
                                            String activeViewId,
                                            boolean processModelValidation,
                                            boolean isLastProperty)
    {
        PropertyInformation propertyInformation = new DefaultGroupControllerScanningExtractor()
                .extract(FacesContext.getCurrentInstance(), new PropertyDetails(key, base, property));

        for (MetaDataEntry metaDataEntry : propertyInformation.getMetaDataEntries())
        {
            if (metaDataEntry.getValue() instanceof BeanValidation)
            {
                tryToProcessMetaData((BeanValidation) metaDataEntry.getValue(),
                        tryToCreateNewTarget(base, property, isLastProperty),
View Full Code Here

                                            List<ModelValidationEntry> modelValidationEntryList,
                                            List<Class> restrictedGroupsForModelValidation,
                                            boolean processModelValidation,
                                            boolean isLastProperty)
    {
        PropertyInformation propertyInformation = new DefaultGroupControllerScanningExtractor()
                .extract(FacesContext.getCurrentInstance(), new PropertyDetails(key, base, property));

        for (MetaDataEntry metaDataEntry : propertyInformation.getMetaDataEntries())
        {
            if (metaDataEntry.getValue() instanceof BeanValidation)
            {
                tryToProcessMetaData((BeanValidation) metaDataEntry.getValue(),
                        tryToCreateNewTarget(base, property, isLastProperty),
View Full Code Here

                                            List<Class> restrictedGroupsForModelValidation,
                                            String activeViewId,
                                            boolean processModelValidation,
                                            boolean isLastProperty)
    {
        PropertyInformation propertyInformation = new DefaultGroupControllerScanningExtractor()
                .extract(FacesContext.getCurrentInstance(), new PropertyDetails(key, base, property));

        for (MetaDataEntry metaDataEntry : propertyInformation.getMetaDataEntries())
        {
            if (metaDataEntry.getValue() instanceof BeanValidation)
            {
                tryToProcessMetaData((BeanValidation) metaDataEntry.getValue(),
                        tryToCreateNewTarget(base, property, isLastProperty),
View Full Code Here

    private void processModelValidation(ModelValidationEntry modelValidationEntry,
                                        Map<Object, List<Class>> processedValidationTargets,
                                        Map<String, ModelValidationResult> results)
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        PropertyInformation propertyInformation;
        Set<ConstraintViolation<Object>> violations;
        Class[] groupsToValidate;

        ELHelper elHelper = ExtValUtils.getELHelper();
View Full Code Here

    }

    private PropertyInformation createPropertyInformation(
            ModelValidationEntry modelValidationEntry, Object validationTarget, ELHelper elHelper)
    {
        PropertyInformation propertyInformation;
        PropertyDetails propertyDetails;
        propertyInformation = new DefaultPropertyInformation();
        if (modelValidationEntry.getComponent() != null)
        {
            propertyDetails = elHelper.getPropertyDetailsOfValueBinding(modelValidationEntry.getComponent());
        }
        else
        {
            propertyDetails = new PropertyDetails(null, validationTarget, null);
        }
        propertyInformation.setInformation(PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);
        return propertyInformation;
    }
View Full Code Here

        this.bviUtils.initComponentWithPropertyDetails(facesContext, uiComponent, propertyDetails);
    }

    protected void processValidation(FacesContext facesContext, UIComponent uiComponent, Object convertedObject)
    {
        PropertyInformation propertyInformation = getPropertyInformation(facesContext, uiComponent);

        boolean validateProperty = hasBeanValidationConstraints(propertyInformation);
        try
        {
            if (validateProperty)
View Full Code Here

    public void storeMetaDataOf(PropertyInformation propertyInformation)
    {
        invokeFilters(propertyInformation);

        PropertyInformation propertyInformationToStore = new DefaultPropertyInformation();

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

        copyMetaData(propertyInformation, propertyInformationToStore);
View Full Code Here

        }
    }

    public MetaDataEntry[] getMetaData(Class targetClass, String targetProperty)
    {
        PropertyInformation propertyInformation = getMapForClass(targetClass).get(targetProperty);

        PropertyInformation clonedPropertyInformation = new DefaultPropertyInformation();
        copyMetaData(propertyInformation, clonedPropertyInformation);

        return clonedPropertyInformation.getMetaDataEntries();
    }
View Full Code Here

TOP

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

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.