Examples of PropertyInfo


Examples of org.apache.jackrabbit.spi.PropertyInfo

     */
    public PropertyState createPropertyState(PropertyId propertyId,
                                             PropertyEntry entry)
            throws ItemNotFoundException, RepositoryException {
        try {
            PropertyInfo info = service.getPropertyInfo(sessionInfo, propertyId);
            assertMatchingPath(info, entry);
            return createPropertyState(info, entry);
        } catch (PathNotFoundException e) {
            throw new ItemNotFoundException(e.getMessage());
        }
View Full Code Here

Examples of org.apache.jackrabbit.spi.PropertyInfo

     * @inheritDoc
     * @see ItemStateFactory#createDeepPropertyState(PropertyId,NodeEntry)
     */
    public PropertyState createDeepPropertyState(PropertyId propertyId, NodeEntry anyParent) throws ItemNotFoundException, RepositoryException {
        try {
            PropertyInfo info = service.getPropertyInfo(sessionInfo, propertyId);
            PropertyState propState = createDeepPropertyState(info, anyParent, null);
            assertValidState(propState, info);
            return propState;
        } catch (PathNotFoundException e) {
            throw new ItemNotFoundException(e.getMessage());
View Full Code Here

Examples of org.apache.jackrabbit.spi.PropertyInfo

        if (nid.getPath() == null) {
            PropertyId id = getIdFactory().createPropertyId(nid, NameConstants.JCR_UUID);
            QValue[] vs = new QValue[] {getQValueFactory().create(nid.getUniqueID(), PropertyType.STRING)};
            Path p = getPathFactory().create(nPath, NameConstants.JCR_UUID, true);
            PropertyInfo pi = new PropertyInfoImpl(id, p, PropertyType.STRING, false, vs);
            l.add(pi);
        }

        Name pName = NameConstants.JCR_PRIMARYTYPE;
        QValue[] vs = new QValue[] {getQValueFactory().create(nInfo.getNodetype())};
        PropertyInfo pi = new PropertyInfoImpl(getIdFactory().createPropertyId(nid, pName),
                getPathFactory().create(nPath, pName, true), PropertyType.NAME, false, vs);
        l.add(pi);

        Name[] mixins = nInfo.getMixins();
        if (mixins.length > 0) {
View Full Code Here

Examples of org.apache.log.output.jms.PropertyInfo

            {
                final String name = propertyConf[ i ].getValue();
                final int type = PropertyType.getTypeIdFor( propertyConf[ i ].getName() );
                final String aux = propertyConf[ i ].getAttribute( "aux", null );

                properties[ i ] = new PropertyInfo( name, type, aux );
            }

            final Formatter formatter = getFormatter( formatterConf );

            return new TextMessageBuilder( properties, formatter );
View Full Code Here

Examples of org.apache.myfaces.tobago.apt.generate.PropertyInfo

      if (simpleName.startsWith("set") || simpleName.startsWith("get")) {
        String name = simpleName.substring(3, 4).toLowerCase(Locale.ENGLISH) + simpleName.substring(4);
        if (ignoredProperties.contains(name)) {
          return;
        }
        PropertyInfo propertyInfo = new PropertyInfo(name);
        propertyInfo.setAllowedValues(uiComponentTagAttribute.allowedValues());
        if (tagAttribute != null) {
          propertyInfo.setBodyContent(tagAttribute.bodyContent());
          propertyInfo.setTagAttribute(true);
        }
        final String type;
        if (uiComponentTagAttribute.expression().isMethodExpression()) {
          propertyInfo.setMethodExpressionRequired(true);
          type = "javax.el.MethodExpression";
        } else {
          if (uiComponentTagAttribute.expression() == DynamicExpression.VALUE_EXPRESSION_REQUIRED) {
            propertyInfo.setValueExpressionRequired(true);
          } else if (uiComponentTagAttribute.expression() == DynamicExpression.PROHIBITED) {
            propertyInfo.setLiteralOnly(true);
          }

          if (uiComponentTagAttribute.type().length > 1) {
            type = "java.lang.Object";
          } else {
            type = uiComponentTagAttribute.type()[0];
          }
        }
        propertyInfo.setType(type);
        propertyInfo.setDefaultValue(
            uiComponentTagAttribute.defaultValue().length() > 0 ? uiComponentTagAttribute.defaultValue() : null);
        propertyInfo.setDefaultCode(
            uiComponentTagAttribute.defaultCode().length() > 0 ? uiComponentTagAttribute.defaultCode() : null);
        propertyInfo.setMethodSignature(uiComponentTagAttribute.methodSignature());
        propertyInfo.setDeprecated(declaration.getAnnotation(Deprecated.class) != null);
        propertyInfo.setDescription(getDescription(declaration));
        propertyInfo.setTransient(uiComponentTagAttribute.isTransient());
        propertyInfo.setGenerate(uiComponentTagAttribute.generate());
        if (properties.containsKey(name)) {
          warn("Redefinition of attribute '" + name + "'.");
        }
        properties.put(name, propertyInfo);
      }
View Full Code Here

Examples of org.apache.tapestry.util.prop.PropertyInfo

   **/

  public IBinding getBinding(String name)
  {
    String bindingPropertyName = name + Tapestry.PARAMETER_PROPERTY_NAME_SUFFIX;
    PropertyInfo info = PropertyFinder.getPropertyInfo(getClass(), bindingPropertyName);

    if (info != null && info.isReadWrite() && info.getType().equals(IBinding.class))
    {
      IResourceResolver resolver = getPage().getEngine().getResourceResolver();

      return (IBinding) OgnlUtils.get(bindingPropertyName, resolver, this);
    }
View Full Code Here

Examples of org.apache.tapestry.util.prop.PropertyInfo

  public void setBinding(String name, IBinding binding)
  {
    String bindingPropertyName = name + Tapestry.PARAMETER_PROPERTY_NAME_SUFFIX;

    PropertyInfo info = PropertyFinder.getPropertyInfo(getClass(), bindingPropertyName);

    if (info != null && info.isReadWrite() && info.getType().equals(IBinding.class))
    {
      IResourceResolver resolver = getPage().getEngine().getResourceResolver();
      OgnlUtils.set(bindingPropertyName, resolver, this, binding);
      return;
    }
View Full Code Here

Examples of org.apache.tapestry.util.prop.PropertyInfo

                LOG.debug("Connecting to property " + propertyName + ".");

            // Next,verify that there is a writable property with the same
            // name as the parameter.

            PropertyInfo propertyInfo =
                PropertyFinder.getPropertyInfo(_component.getClass(), propertyName);

            if (propertyInfo == null)
            {
                throw new ConnectedParameterException(
                    Tapestry.format(
                        "ParameterManager.no-accessor",
                        _component.getExtendedId(),
                        propertyName),
                    _component,
                    name,
                    propertyName,
                    binding.getLocation(),
                    null);
            }

            if (!propertyInfo.isReadWrite())
            {
                throw new ConnectedParameterException(
                    Tapestry.format(
                        "ParameterManager.property-not-read-write",
                        _component.getExtendedId(),
                        propertyName),
                    _component,
                    name,
                    propertyName,
                    binding.getLocation(),
                    null);
            }

            // Check if the parameter type matches the property type

            Class propertyType = propertyInfo.getType();
            Class parameterType = getType(pspec.getType(), resolver);

            if (parameterType == null)
            {
                throw new ConnectedParameterException(
View Full Code Here

Examples of org.chromattic.core.bean.PropertyInfo

    Instrumentor instrumentor) {

    // Build the dispatcher map
    Map<Method, MethodInvoker> dispatchers = new HashMap<Method, MethodInvoker>();
    for (PropertyMapper propertyMapper : propertyMappers) {
      PropertyInfo info = propertyMapper.getInfo();
      MethodInfo getter = info.getGetter();
      if (getter != null) {
        dispatchers.put((Method)getter.getMethod(), propertyMapper);
      }
      MethodInfo setter = info.getSetter();
      if (setter != null) {
        dispatchers.put((Method)setter.getMethod(), propertyMapper);
      }
    }
    for (MethodMapper methodMapper : methodMappers) {
View Full Code Here

Examples of org.cruxframework.crux.core.utils.JClassUtils.PropertyInfo

      PropertyInfo[] fromPropertiesInfo = JClassUtils.extractBeanPropertiesInfo(fromType);
      PropertyInfo[] toPropertiesInfo = JClassUtils.extractBeanPropertiesInfo(toType);

      for (PropertyInfo fromPropertyInfo : fromPropertiesInfo)
      {
        PropertyInfo toPropertyInfo = getEquivalentPropertyInfo(fromPropertyInfo, toPropertiesInfo);
        if (toPropertyInfo != null)
        {
          if (JClassUtils.isSimpleType(fromPropertyInfo.getType()))
          {
            if (fromPropertyInfo.getType().equals(toPropertyInfo.getType()))
            {
              srcWriter.println(toVariable+"."+toPropertyInfo.getWriteMethod().getName()+"("+fromVariable+"."+fromPropertyInfo.getReadMethod().getName()+"());");
            }
            else
            {
              throw new CruxGeneratorException("Can not create a BeanCopier. Incopatibles type for property ["+fromPropertyInfo.getName()+"].");
            }
          }
          else
          {
            JClassType fromPropClass = fromPropertyInfo.getType().isClassOrInterface();
            JClassType toPropClass = toPropertyInfo.getType().isClassOrInterface();
            if (fromPropClass.isAssignableTo(toPropClass))
            {
              srcWriter.println(toVariable+"."+toPropertyInfo.getWriteMethod().getName()+"("+fromVariable+"."+fromPropertyInfo.getReadMethod().getName()+"());");
            }
            else
            {
              srcWriter.println("if ("+fromVariable+"."+fromPropertyInfo.getReadMethod().getName()+"() != null){");
              srcWriter.println(toVariable+"."+toPropertyInfo.getWriteMethod().getName()+"(GWT.create("+toPropClass.getQualifiedSourceName()+".class));");
              generateCopyBeanCode(srcWriter, fromVariable+"."+fromPropertyInfo.getReadMethod().getName()+"()",
                  toVariable+"."+toPropertyInfo.getReadMethod().getName()+"()",
                  fromPropertyInfo.getType().isClassOrInterface(),
                  toPropertyInfo.getType().isClassOrInterface());
              srcWriter.println("}else{");
              srcWriter.println(toVariable+"."+toPropertyInfo.getWriteMethod().getName()+"(null);");
              srcWriter.println("}");
            }
          }
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.