Java 类javax.el.PropertyNotWritableException 实例源码

项目:tomcat7    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:tomcat7    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:tomcat7    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:myfaces-trinidad    文件:ForEachTag.java   
@Override
public void setValue(ELContext context, Object value)
{
  Object items = _itemsExpression.getValue(context);

  if (items != null)
  {
    if (items instanceof CollectionModel)
    {
      // There is no support for setting row data on the collection model
      throw new PropertyNotWritableException();
    }

    context.setPropertyResolved(false);
    context.getELResolver().setValue(context, items, _key, value);
  }
}
项目:myfaces-trinidad    文件:MELResolver.java   
@Override
public void setValue(ELContext eLContext, Object base, Object property, 
                     Object value)
{
  if (base == null)
  {
    throw new PropertyNotWritableException();
  }
  else
  {
    if (_isIndexed(base))
      _pr.setValue(base, _getIndex(property), value);
    else
      _pr.setValue(base, property, value);
  }
}
项目:lams    文件:SpringBeanELResolver.java   
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
    if (base == null) {
        String beanName = property.toString();
        BeanFactory bf = getBeanFactory(elContext);
        if (bf.containsBean(beanName)) {
            if (value == bf.getBean(beanName)) {
                // Setting the bean reference to the same value is alright - can simply be ignored...
                elContext.setPropertyResolved(true);
            }
            else {
                throw new PropertyNotWritableException(
                        "Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
            }
        }
    }
}
项目:lams    文件:ELResolverImpl.java   
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        getDefaultResolver().setValue(context, base, property, value);
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:lazycat    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
        throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException("Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:lazycat    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
        throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context.getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:spring4-understanding    文件:SpringBeanELResolver.java   
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
    if (base == null) {
        String beanName = property.toString();
        BeanFactory bf = getBeanFactory(elContext);
        if (bf.containsBean(beanName)) {
            if (value == bf.getBean(beanName)) {
                // Setting the bean reference to the same value is alright - can simply be ignored...
                elContext.setPropertyResolved(true);
            }
            else {
                throw new PropertyNotWritableException(
                        "Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
            }
        }
    }
}
项目:spring    文件:SpringBeanELResolver.java   
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
    if (base == null) {
        String beanName = property.toString();
        BeanFactory bf = getBeanFactory(elContext);
        if (bf.containsBean(beanName)) {
            if (value == bf.getBean(beanName)) {
                // Setting the bean reference to the same value is alright - can simply be ignored...
                elContext.setPropertyResolved(true);
            }
            else {
                throw new PropertyNotWritableException(
                        "Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
            }
        }
    }
}
项目:class-guard    文件:SpringBeanELResolver.java   
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
    if (base == null) {
        String beanName = property.toString();
        BeanFactory bf = getBeanFactory(elContext);
        if (bf.containsBean(beanName)) {
            if (value == bf.getBean(beanName)) {
                // Setting the bean reference to the same value is alright - can simply be ignored...
                elContext.setPropertyResolved(true);
            }
            else {
                throw new PropertyNotWritableException(
                        "Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
            }
        }
    }
}
项目:class-guard    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:class-guard    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:class-guard    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:apache-tomcat-7.0.57    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:apache-tomcat-7.0.57    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:apache-tomcat-7.0.57    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:apache-tomcat-7.0.57    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:apache-tomcat-7.0.57    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:apache-tomcat-7.0.57    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:WBSAirback    文件:ELResolverImpl.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
项目:WBSAirback    文件:ScopedAttributeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
项目:WBSAirback    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:grails-jsf2-plugin    文件:GrailsELResolver.java   
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
    if (base == null) {
        String beanName = property.toString();

        if (beanName.equals(MESSAGESOURCE_SHORTCUT))
            beanName = "messageSource";

        BeanFactory bf = getBeanFactory(elContext);
        if (bf.containsBean(beanName)) {
            throw new PropertyNotWritableException(
                    "Variable '" + beanName + "' refers to a Spring bean which by definition is not writable");
        }
    } else if (base instanceof MessageSource && property != null) {
        throw new PropertyNotWritableException(
                "MessageSource: '" + property + "' refers to a Spring bean which by definition is not writable");
    }
}
项目:tomcat7    文件:ValueExpressionImpl.java   
@Override
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
项目:lams    文件:ValueExpressionImpl.java   
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
项目:apache-tomcat-7.0.73-with-comment    文件:ValueExpressionImpl.java   
@Override
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
项目:lazycat    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property, Object value)
        throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
项目:scipio-erp    文件:NodeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
    if (context == null) {
        throw new NullPointerException("context is null");
    }
    if (isResolvable(base)) {
        throw new PropertyNotWritableException("resolver is read-only");
    }
}
项目:beyondj    文件:ImplicitObjectELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(base, property);
            throw new PropertyNotWritableException();
        }
    }
}
项目:elpi    文件:NodeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
    if (context == null) {
        throw new NullPointerException("context is null");
    }
    if (isResolvable(base)) {
        throw new PropertyNotWritableException("resolver is read-only");
    }
}
项目:o3erp    文件:NodeELResolver.java   
@Override
public void setValue(ELContext context, Object base, Object property, Object value) {
    if (context == null) {
        throw new NullPointerException("context is null");
    }
    if (isResolvable(base)) {
        throw new PropertyNotWritableException("resolver is read-only");
    }
}
项目:class-guard    文件:ValueExpressionImpl.java   
@Override
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
项目:apache-tomcat-7.0.57    文件:ValueExpressionImpl.java   
@Override
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
项目:apache-tomcat-7.0.57    文件:ValueExpressionImpl.java   
@Override
public void setValue(ELContext context, Object value)
        throws PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    this.getNode().setValue(ctx, value);
}
项目:protobuf-el    文件:BuilderELResolver.java   
@Override
public void setValue(final ELContext context, final Object base, final Object property,
    final Object val) {
  if (context == null) {
    throw new NullPointerException();
  }

  if ((property != null) && resolveType(base)) {
    context.setPropertyResolved(base, property);

    if (isReadOnly(context, base, property)) {
      throw new PropertyNotWritableException();
    }

    if (val == null) {
      throw new IllegalArgumentException(String.format("property %s cannot be set to null",
          property));
    }

    try {
      final Message.Builder builder = (Message.Builder) base;
      final FieldDescriptor field = getPropertyFieldDescriptor(builder, property);
      builder.setField(field, verifyAndConvertField(val, field));
    } catch (final UnsupportedOperationException ex) {
      throw new PropertyNotWritableException();
    }
  }
}