Examples of PropertyVetoException


Examples of com.googlecode.openbeans.PropertyVetoException

      this.rejectedSetBCOnce = true;
      // Validate the new BeanContext value and throw
      // PropertyVetoException if it was not successful
      if (!validatePendingSetBeanContext(bc))
      {
        throw new PropertyVetoException(Messages.getString("beans.0F"), //$NON-NLS-1$
            new PropertyChangeEvent(this.beanContextChildPeer, BEAN_CONTEXT, this.beanContext, bc));
      }
      fireVetoableChange(BEAN_CONTEXT, this.beanContext, bc);
    }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

                    + 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))
            {
                throw new PropertyVetoException(name, object);
            } else {
                throw new WrappedTargetException(
                    e.getMessage(), object, e.TargetException);
            }
        }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

    public void vetoableChange(PropertyChangeEvent evt ) throws PropertyVetoException
    {
        nVetoCalled++;
         this.evt= evt;
         if (bVeto)
             throw new PropertyVetoException();
    }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

                    + 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))
            {
                throw new PropertyVetoException(name, object);
            } else {
                throw new WrappedTargetException(
                    e.getMessage(), object, e.TargetException);
            }
        }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

    public void vetoableChange(PropertyChangeEvent evt ) throws PropertyVetoException
    {
        nVetoCalled++;
         this.evt= evt;
         if (bVeto)
             throw new PropertyVetoException();
    }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

                    + 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))
            {
                throw new PropertyVetoException(name, object);
            } else {
                throw new WrappedTargetException(
                    e.getMessage(), object, e.TargetException);
            }
        }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

                    + 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))
            {
                throw new PropertyVetoException(name, object);
            } else {
                throw new WrappedTargetException(
                    e.getMessage(), object, e.TargetException);
            }
        }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

    public void vetoableChange(PropertyChangeEvent evt ) throws PropertyVetoException
    {
        nVetoCalled++;
         this.evt= evt;
         if (bVeto)
             throw new PropertyVetoException();
    }
View Full Code Here

Examples of com.sun.star.beans.PropertyVetoException

    public void vetoableChange(PropertyChangeEvent evt ) throws PropertyVetoException
    {
        nVetoCalled++;
         this.evt= evt;
         if (bVeto)
             throw new PropertyVetoException();
    }
View Full Code Here

Examples of java.beans.PropertyVetoException

            } else {
              propertiesFile.createNewFile();
            }

          } catch (IOException ioe) {
            PropertyVetoException e = new PropertyVetoException(
                "Error property file=" + fn + ", " + ioe.toString(),
                event);

            e.initCause(ioe);

            throw e;

          }
        }
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.