Examples of InvalidPropertyException


Examples of com.codiform.moo.InvalidPropertyException

    if ( explicit || mode == AccessMode.FIELD ) {
      String errorMessage = validateField( field );
      if ( errorMessage == null ) {
        return new CollectionFieldProperty( field, propertyAnnotation, name, expression, explicit, ignore );
      } else if ( explicit ) {
        throw new InvalidPropertyException( name, declaringClass, errorMessage );
      }
    }
    return null;
  }
View Full Code Here

Examples of com.codiform.moo.InvalidPropertyException

    if ( explicit || mode == AccessMode.FIELD ) {
      String errorMessage = validateField( field );
      if ( errorMessage == null ) {
        return new MapFieldProperty( field, propertyAnnotation, name, expression, explicit, ignore );
      } else if ( explicit ) {
        throw new InvalidPropertyException( name, declaringClass, errorMessage );
      }
    }
    return null;
  }
View Full Code Here

Examples of com.codiform.moo.InvalidPropertyException

    if ( explicit || mode == AccessMode.FIELD ) {
      String errorMessage = validateField( field );
      if ( errorMessage == null ) {
        return new FieldProperty( field, propertyAnnotation, name, expression, explicit, ignore );
      } else if ( explicit ) {
        throw new InvalidPropertyException( name, declaringClass, errorMessage );
      }
    }
    return null;
  }
View Full Code Here

Examples of com.codiform.moo.InvalidPropertyException

          validateNoCollectionPropertyAnnotation( collectionAnnotation, propertyName, declaringClass );
          validateNoMapPropertyAnnotation( mapAnnotation, propertyName, declaringClass );
          return createMethodProperty( method, propertyAnnotation, propertyName, explicit, ignore );
        }
      } else if ( explicit ) {
        throw new InvalidPropertyException( propertyName == null ? methodName : propertyName, method.getDeclaringClass(), errorMessage );
      }
    }
    return null;
  }
View Full Code Here

Examples of com.codiform.moo.InvalidPropertyException

      Property property = PropertyFactory.createProperty( item, mode );
      if ( property != null ) {
        if ( properties.containsKey( property.getName() ) ) {
          Property current = properties.get( property.getName() );
          if ( current.isExplicit() && property.isExplicit() ) {
            throw new InvalidPropertyException(
                property.getName(),
                property.getDeclaringClass(),
                "Property %s (in %s) is explicitly defined with @Property as both field and method properties; Moo expects no more than one annotation per property name per class." );
          } else if ( !current.isExplicit() && property.isExplicit() ) {
            properties.put( property.getName(), property );
View Full Code Here

Examples of com.google.walkaround.util.server.appengine.DatastoreUtil.InvalidPropertyException

    @Override
    protected ConvUdwMapping parse(Entity e) throws InvalidPropertyException {
      String key = e.getKey().getName();
      int space = key.indexOf(' ');
      if (space == -1 || space != key.lastIndexOf(' ')) {
        throw new InvalidPropertyException(e, "key");
      }
      SlobId convObjectId = parseObjectId(e, "key", key.substring(0, space));
      StableUserId userId = new StableUserId(key.substring(space + 1));
      SlobId udwId = parseObjectId(e, UDW_ID_PROPERTY,
          DatastoreUtil.getExistingProperty(e, UDW_ID_PROPERTY, String.class));
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

  private String parentDirectory;
 
  @Override
  public BasicConnectionFactory createConnectionFactory() throws ResourceException {
    if (this.parentDirectory == null) {
      throw new InvalidPropertyException(UTIL.getString("parentdirectory_not_set")); //$NON-NLS-1$
    }
    return new BasicConnectionFactory() {
     
      @Override
      public BasicConnection getConnection() throws ResourceException {
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

  public void validate() throws InvalidPropertyException
  {
    if (destinationType != null
        && ! destinationType.equals("javax.jms.Queue")
        && ! destinationType.equals("javax.jms.Topic"))
      throw new InvalidPropertyException("Invalid destination type: "
                                         + destinationType);

    if (destination == null)
      throw new InvalidPropertyException("Missing destination property.");

    if (acknowledgeMode != null
        && ! acknowledgeMode.equals(AUTO_ACKNOWLEDGE)
        && ! acknowledgeMode.equals(DUPS_OK_ACKNOWLEDGE))
      throw new InvalidPropertyException("Invalid acknowledge mode: "
                                         + acknowledgeMode);

    if (subscriptionDurability != null) {

      if (subscriptionDurability.equals("Durable")
          && destinationType.equals("javax.jms.Queue"))
        throw new InvalidPropertyException("Can't set a durable subscription "
                                           + "on a JMS queue.");

      if (subscriptionDurability.equals("Durable")
          && subscriptionName == null)
        throw new InvalidPropertyException("Missing durable subscription name.");
    }
  }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

         HornetQActivationSpec.log.trace("validate()");
      }

      if (destination == null || destination.trim().equals(""))
      {
         throw new InvalidPropertyException("Destination is mandatory");
      }
   }
View Full Code Here

Examples of javax.resource.spi.InvalidPropertyException

        this.asStringProperty = asStringProperty;
    }
   
    public void validate() throws InvalidPropertyException {
        if ("FAIL".equals(asStringProperty)) {
            throw new InvalidPropertyException("FAIL");
        }
    }
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.