Examples of UnknownPropertyException


Examples of com.dragome.forms.bindings.client.bean.UnknownPropertyException

    {
      return getGetter(path).invoke(bean);
    }
    catch (IllegalAccessException e)
    {
      throw new UnknownPropertyException(path);
    }
    catch (InvocationTargetException e)
    {
      throw new UnknownPropertyException(path);
    }
  }
View Full Code Here

Examples of com.hp.hpl.jena.shared.UnknownPropertyException

        }
    }

    public Object setProperty(String propName, Object propValue)
         {
        errorHandler.error(new UnknownPropertyException( propName ));
        return null;
    }
View Full Code Here

Examples of com.hp.hpl.jena.shared.UnknownPropertyException

                try {
                    old = arpf.getSAXParser().getProperty(str);
                } catch (SAXNotSupportedException ns) {
                    old = null;
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                }
                try {
                    arpf.getSAXParser().setProperty(str, obj);
                } catch (SAXNotSupportedException ns) {
                    errorHandler.error(new JenaException(ns));
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                }
                return old;
            }

            if (str.startsWith(saxFeaturesURL)
                    || str.startsWith(apacheFeaturesURL)) {
                Boolean old;
                try {
                    old = new Boolean(arpf.getSAXParser().getFeature(str));
                } catch (SAXNotSupportedException ns) {
                    old = null;
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                }
                try {
                    arpf.getSAXParser().setFeature(str,
                            ((Boolean) obj).booleanValue());
                } catch (SAXNotSupportedException ns) {
                    errorHandler.error(new JenaException(ns));
                } catch (SAXNotRecognizedException nr) {
                    errorHandler.error(new UnknownPropertyException(str));
                    return null;
                } catch (ClassCastException cc) {
                    errorHandler.error(new JenaException(
                            new SAXNotSupportedException("Feature: '" + str
                                    + "' can only have a boolean value.")));
View Full Code Here

Examples of com.hp.hpl.jena.shared.UnknownPropertyException

                eh.error(new IllegalArgumentException(
                "Property \"IRI-RULES\" requires one of 'STRICT', 'IRI' or 'LAX'"));
            return old ;
        }
       
        eh.error(new UnknownPropertyException(str));
        return null;
    }
View Full Code Here

Examples of com.sun.star.beans.UnknownPropertyException

    {
        for (int i = 0; i < props.length; ++i) {
            if (props[i].Handle != -1
                && !props[i].Name.equals(translateHandle(props[i].Handle)))
            {
                throw new UnknownPropertyException(
                    ("name " + props[i].Name + " does not match handle "
                     + props[i].Handle),
                    object);
            }
            setProperty(
View Full Code Here

Examples of com.sun.star.beans.UnknownPropertyException

        }
    }

    private String translateHandle(int handle) throws UnknownPropertyException {
        if (handle < 0 || handle >= handleMap.length) {
            throw new UnknownPropertyException("bad handle " + handle, object);
        }
        return handleMap[handle];
    }
View Full Code Here

Examples of com.sun.star.beans.UnknownPropertyException

        throws UnknownPropertyException, PropertyVetoException,
        com.sun.star.lang.IllegalArgumentException, WrappedTargetException
    {
        PropertyData p = (PropertyData) properties.get(name);
        if (p == null) {
            throw new UnknownPropertyException(name, object);
        }
        if ((isAmbiguous
             && (p.property.Attributes & PropertyAttribute.MAYBEAMBIGUOUS) == 0)
            || (isDefaulted
                && ((p.property.Attributes & PropertyAttribute.MAYBEDEFAULT)
                    == 0)))
        {
            throw new com.sun.star.lang.IllegalArgumentException(
                ("flagging as ambiguous/defaulted non-ambiguous/defaulted"
                 + " property " + name),
                object, illegalArgumentPosition);

        }
        XIdlField2 f = (XIdlField2) UnoRuntime.queryInterface(
            XIdlField2.class, idlClass.getField(name));
        Object[] o = new Object[] {
                new Any(type, UnoRuntime.queryInterface(type, object)) };
        Object v = wrapValue(
            value,
            ((XIdlField2) UnoRuntime.queryInterface(
                XIdlField2.class, idlClass.getField(name))).getType(),
            (p.property.Attributes & PropertyAttribute.MAYBEAMBIGUOUS) != 0,
            isAmbiguous,
            (p.property.Attributes & PropertyAttribute.MAYBEDEFAULT) != 0,
            isDefaulted,
            (p.property.Attributes & PropertyAttribute.MAYBEVOID) != 0);
        try {
            f.set(o, v);
        } catch (com.sun.star.lang.IllegalArgumentException e) {
            if (e.ArgumentPosition == 1) {
                throw new com.sun.star.lang.IllegalArgumentException(
                    e.getMessage(), object, illegalArgumentPosition);
            } else {
                throw new RuntimeException(
                    "unexpected com.sun.star.lang.IllegalArgumentException: "
                    + e.getMessage());
            }
        } catch (com.sun.star.lang.IllegalAccessException e) {
            //TODO  Clarify whether PropertyVetoException is the correct
            // exception to throw when trying to set a read-only property:
            throw new PropertyVetoException(
                "cannot set read-only property " + name, object);
        } catch (WrappedTargetRuntimeException e) {
            //FIXME  A WrappedTargetRuntimeException from XIdlField2.get is not
            // guaranteed to originate directly within XIdlField2.get (and thus
            // have the expected semantics); it might also be passed through
            // from lower layers.
            if (new Type(UnknownPropertyException.class).isSupertypeOf(
                    AnyConverter.getType(e.TargetException))
                && (p.property.Attributes & PropertyAttribute.OPTIONAL) != 0)
            {
                throw new UnknownPropertyException(name, object);
            } else if (new Type(PropertyVetoException.class).isSupertypeOf(
                           AnyConverter.getType(e.TargetException))
                       && ((p.property.Attributes
                            & PropertyAttribute.CONSTRAINED)
                           != 0))
View Full Code Here

Examples of com.sun.star.beans.UnknownPropertyException

    Object getProperty(String name, PropertyState[] state)
        throws UnknownPropertyException, WrappedTargetException
    {
        PropertyData p = (PropertyData) properties.get(name);
        if (p == null) {
            throw new UnknownPropertyException(name, object);
        }
        XIdlField2 field = (XIdlField2) UnoRuntime.queryInterface(
            XIdlField2.class, idlClass.getField(name));
        Object value;
        try {
            value = field.get(
                new Any(type, UnoRuntime.queryInterface(type, object)));
        } catch (com.sun.star.lang.IllegalArgumentException e) {
            throw new RuntimeException(
                "unexpected com.sun.star.lang.IllegalArgumentException: "
                + e.getMessage());
        } catch (WrappedTargetRuntimeException e) {
            //FIXME  A WrappedTargetRuntimeException from XIdlField2.get is not
            // guaranteed to originate directly within XIdlField2.get (and thus
            // have the expected semantics); it might also be passed through
            // from lower layers.
            if (new Type(UnknownPropertyException.class).isSupertypeOf(
                    AnyConverter.getType(e.TargetException))
                && (p.property.Attributes & PropertyAttribute.OPTIONAL) != 0)
            {
                throw new UnknownPropertyException(name, object);
            } else {
                throw new WrappedTargetException(
                    e.getMessage(), object, e.TargetException);
            }
        }
View Full Code Here

Examples of com.sun.star.beans.UnknownPropertyException

    private PropertyData get(Object object, String propertyName)
        throws UnknownPropertyException
    {
        PropertyData p = (PropertyData) properties.get(propertyName);
        if (p == null || !p.present) {
            throw new UnknownPropertyException(propertyName, object);
        }
        return p;
    }
View Full Code Here

Examples of com.sun.star.beans.UnknownPropertyException

        {
            if (str.length() > 0)
            {
                Property prop= getProperty(str);
                if (prop == null)
                    throw new UnknownPropertyException("Property " + str + " is unknown");

                // Add listener for a certain property
                if ((prop.Attributes & PropertyAttribute.BOUND) > 0)
                    aBoundLC.addInterface(str, xPropertyChangeListener);
                else
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.