Ensure a property doesn't occur in the specified list.
@param propertyName the name of a property
@param properties a list of properties
@throws ValidationException thrown when the specified property
is found in the list of properties
323895
public void assertNone(final String propertyName, final PropertyList properties) throws ValidationException {
        if (properties.getProperty(propertyName) != null) {
            throw new ValidationException(ASSERT_NONE_MESSAGE, new Object[] {propertyName});
        }
    }
16552
public PropertyConstraint all(String propertyName, Constraint[] constraints) {
        return value(propertyName, all(constraints));
    }
978774
public void setProperty(final String propertyName, final String value) {
        Preconditions.checkNotNull(propertyName);
        if (value == null) {
            properties.put(propertyName, null);
            return;
        }
        List<String> values = new ArrayList<>();
        values.add(value);
        properties.put(propertyName, values);
    }
492612
function validatePropertyConfig(property) {  
  /** If name is missing or not a string, throw error */
  if ( typeof property.name !== `string` )
    throw new Error(`ezobjects.validatePropertyConfig(): Property configured with missing or invalid 'name'.`);

  /** If name is not a valid MySQL column name, throw error */
  if ( !property.name.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' not valid MySQL column name, must start with 'a-zA-Z_' and contain only 'a-zA-Z0-9_'.`);
    
  /** If both type and instanceOf are missing or both are not strings, throw error */
  if ( typeof property.type !== `string` && typeof property.instanceOf !== `string` )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' configured with missing or invalid 'type' and/or 'instanceOf', one of them is required.`);

  /** If the original type has not yet been recorded */
  if ( property.type && typeof property.originalType !== `string` ) {
    /** Store original type with preserved case */
    property.originalType = property.type;
    
    /** Convert type to lower-case for comparison to ezobjectsTypes */
    property.type = property.type.toLowerCase();
  }
  
  /** Attach arrayOf `ezobjectType` if property type is `array` */
  if ( property.type == `array` ) {
    /** If type is `ARRAY` with no `arrayOf`, throw error */
    if ( typeof property.arrayOf !== `object` || property.arrayOf.constructor.name != `Object` )
      throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} with missing or invalid 'arrayOf'.`);

    /** If type is `ARRAY` with `arrayOf` containing bad or missing type, throw error */
    if ( typeof property.arrayOf.type != `string` && typeof property.arrayOf.instanceOf != `string` )
      throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} with missing or invalid 'arrayOf.type' and/or 'arrayOf.instanceOf', one of them is required.`);

    /** If it's a standard EZ Object type, attach 'ezobjectType' to property for later use */
    property.ezobjectType = ezobjectTypes.find(x => x.type == property.type && x.arrayOfType == property.arrayOf.type );

    /** If no standard type was found, use 'other' type for other objects */
    if ( !property.ezobjectType )
      property.ezobjectType = ezobjectTypes.find(x => x.type == `array` && x.arrayOfType == `other` );
    
    /** If it's a standard EZ Object type, attach 'ezobjectType' to property arrayOf type for later use */
    property.arrayOf.ezobjectType = ezobjectTypes.find(x => x.type == property.arrayOf.type);

    /** If no standard type was found, use 'other' type for other objects */
    if ( !property.arrayOf.ezobjectType )
      property.arrayOf.ezobjectType = ezobjectTypes.find(x => x.type == `other`);
    
    /** Fully determine whether to allow nulls for this property */
    if ( typeof property.arrayOf.allowNull !== `boolean` && property.arrayOf.ezobjectType.type != `other` )
      property.arrayOf.allowNull = false;
    else if ( typeof property.arrayOf.allowNull !== `boolean` )
      property.arrayOf.allowNull = true;
  } else {
    /** If it's a standard EZ Object type, attach 'ezobjectType' to property for later use */
    property.ezobjectType = ezobjectTypes.find(x => x.type == property.type);

    /** If no standard type was found, use 'other' type for other objects */
    if ( !property.ezobjectType )
      property.ezobjectType = ezobjectTypes.find(x => x.type == `other`);
  }
  
  /** If 'length' is provided, make sure it's an integer or NaN */
  if ( !isNaN(property.length) )
    property.length = parseInt(property.length);
  
  /** If 'decimals' is provided, make sure it's an integer or NaN */
  if ( !isNaN(property.decimals) )
    property.decimals = parseInt(property.decimals);
  
  /** Set 'hasDecimals' to false if not defined */
  if ( typeof property.ezobjectType.hasDecimals !== `boolean` )
    property.ezobjectType.hasDecimals = false;
  
  /** Set 'hasLength' to false if not defined */
  if ( typeof property.ezobjectType.hasLength !== `boolean` )
    property.ezobjectType.hasDecimals = false;
  
  /** Set 'lengthRequired' to false if not defined */
  if ( typeof property.ezobjectType.lengthRequired !== `boolean` )
    property.ezobjectType.lengthRequired = false;
  
  /** Set 'hasUnsignedAndZeroFill' to false if not defined */
  if ( typeof property.ezobjectType.hasUnsignedAndZeroFill !== `boolean` )
    property.ezobjectType.hasUnsignedAndZeroFill = false;
  
  /** Set 'hasCharacterSetAndCollate' to false if not defined */
  if ( typeof property.ezobjectType.hasCharacterSetAndCollate !== `boolean` )
    property.ezobjectType.hasCharacterSetAndCollate = false;
  
  /** Set 'lengthRequiresDecimals' to false if not defined */
  if ( typeof property.ezobjectType.lengthRequiresDecimals !== `boolean` )
    property.ezobjectType.lengthRequiresDecimals = false;

  /** Types where length is required, throw error if missing */
  if ( property.ezobjectType.lengthRequired && isNaN(property.length) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} missing required length configuration.`);

  /** Types where decimals are provided, but length is missing */
  if ( property.ezobjectType.hasDecimals && !isNaN(property.decimals) && isNaN(property.length) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} provided decimals without length configuration.`);

  /* If type is VARCHAR or VARBINARY, both of which require length, throw error if length out of bounds */
  if ( ( property.type == `varchar` || property.type == `varbinary` ) && ( property.length <= 0 || property.length > 65535 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 65535.`);

  /* If type is BIT and length is provided, throw error if length out of bounds */
  if ( property.type == `bit` && !isNaN(property.length) && ( property.length <= 0 || property.length > 64 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 64.`);

  /* If type is TINYINT and length is provided, throw error if length out of bounds */
  if ( property.type == `tinyint` && !isNaN(property.length) && ( property.length <= 0 || property.length > 4 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 4.`);

  /* If type is SMALLINT and length is provided, throw error if length out of bounds */
  if ( property.type == `smallint` && !isNaN(property.length) && ( property.length <= 0 || property.length > 6 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 6.`);

  /* If type is MEDIUMINT and length is provided, throw error if length out of bounds */
  if ( property.type == `mediumint` && !isNaN(property.length) && ( property.length <= 0 || property.length > 8 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 8.`);

  /* If type is INT or INTEGER and length is provided, throw error if length out of bounds */
  if ( ( property.type == `int` || property.type == `integer` ) && !isNaN(property.length) && ( property.length <= 0 || property.length > 11 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 11.`);

  /* If type is BIGINT and length is provided, throw error if length out of bounds */
  if ( property.type == `bigint` && !isNaN(property.length) && ( property.length <= 0 || property.length > 20 ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has length out of bounds, must be between 1 and 20.`);

  /* If type can use decimals and decimals are provided, throw error if decimals out of bounds */
  if ( property.ezobjectType.hasDecimals && !isNaN(property.decimals) && ( property.decimals < 0 || property.decimals > property.length ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} has decimals out of bounds, must be between 0 and the configured 'length'.`);

  /** Types where length is provided and so decimals are required, throw error if missing */
  if ( property.ezobjectType.lengthRequiresDecimals && !isNaN(property.length) && isNaN(property.decimals) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} used with length, but without decimals.`);

  /** If type is ENUM and values missing or invalid, throw error */
  if ( property.ezobjectType.mysqlType == `enum` && ( typeof property.values !== `object` || property.values.constructor.name != `Array` ) )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} used with missing or invalid values array.`);
  
  /** If type is ENUM and values exists but is empty, throw error */
  if ( property.ezobjectType.mysqlType == `enum` && property.values.length == 0 )
    throw new Error(`ezobjects.validatePropertyConfig(): Property '${property.name}' of type ${property.type} used with empty values array, there must be at least one value.`);
  
  /** Create default transform function that doesn't change the input */
  const defaultTransform = x => x;
  
  /** If there is no setter transform, set to default */
  if ( typeof property.setTransform !== `function` )
    property.setTransform = typeof property.ezobjectType == `object` && typeof property.ezobjectType.setTransform == `function` ? property.ezobjectType.setTransform : defaultTransform;

  /** If there is no save transform, set to default */
  if ( typeof property.saveTransform !== `function` )
    property.saveTransform = typeof property.ezobjectType == `object` && typeof property.ezobjectType.saveTransform == `function` ? property.ezobjectType.saveTransform : defaultTransform;

  /** If there is no load transform, set to default */
  if ( typeof property.loadTransform !== `function` )
    property.loadTransform = typeof property.ezobjectType == `object` && typeof property.ezobjectType.loadTransform == `function` ? property.ezobjectType.loadTransform : defaultTransform;
      
  /** Fully determine whether to store properties in database */
  if ( typeof property.store !== `boolean` )
    property.store = true;
  
  /** Fully determine whether to allow nulls for this property */
  if ( typeof property.allowNull !== `boolean` && property.ezobjectType.type != `other` )
    property.allowNull = false;
  else if ( typeof property.allowNull !== `boolean` )
    property.allowNull = true;
}
87563
public void assertOneOrLess(final String paramName,
            final ParameterList parameters) throws ValidationException {

        if (parameters.getParameters(paramName).size() > 1) {
            throw new ValidationException(ASSERT_ONE_OR_LESS_MESSAGE, new Object[] {paramName});
        }
    }
1247687
@com.fasterxml.jackson.annotation.JsonProperty("validationErrors")
    public void setValidationErrors(java.util.Collection<ValidationError> validationErrors) {
        if (validationErrors == null) {
            this.validationErrors = null;
            return;
        }

        this.validationErrors = new java.util.ArrayList<ValidationError>(validationErrors);
    }
1094343
function(propertyName) {
            // could check for DOM component, but this event should only be fired by such an entity!
            // Rather than triggering Invalidate on each of these, we rely on css() triggering that event
            switch (propertyName) {
                case "textAlign":
                    this._textAlign = this._element.style.textAlign;
                    break;
                case "color":
                    // Need to set individual color components, so use method
                    this.textColor(this._element.style.color);
                    break;
                case "fontType":
                    this._textFont.type = this._element.style.fontType;
                    break;
                case "fontWeight":
                    this._textFont.weight = this._element.style.fontWeight;
                    break;
                case "fontSize":
                    this._textFont.size = this._element.style.fontSize;
                    break;
                case "fontFamily":
                    this._textFont.family = this._element.style.fontFamily;
                    break;
                case "fontVariant":
                    this._textFont.variant = this._element.style.fontVariant;
                    break;
                case "lineHeight":
                    this._textFont.lineHeight = this._element.style.lineHeight;
                    break;
            }
        }
454937
public void setValidationEmails(java.util.Collection<String> validationEmails) {
        if (validationEmails == null) {
            this.validationEmails = null;
            return;
        }

        this.validationEmails = new java.util.ArrayList<String>(validationEmails);
    }
1335423
public void validateFname(final String fname) {
        Validate.validState(
                TENANT_FNAME_VALIDATOR_PATTERN.matcher(fname).matches(),
                "Invalid tenant fname '%s'  -- fnames must match %s .",
                fname,
                TENANT_FNAME_VALIDATOR_REGEX);
    }
923618
public void validate(String propertyName) {
        if (whitelist != null && whitelist.contains(propertyName)) {
            lastValid = true;
            return;
        }
        if (blacklist != null && blacklist.contains(propertyName)) {
            lastValid = false;
            getUnknownProperties().add(propertyName);
            return;
        }

        lastValid = desc.isValidExpression(propertyName);
        super.validate(propertyName);
    }
998539
public void addProperty(final String propertyName, final String value) {
        Preconditions.checkNotNull(propertyName);
        Preconditions.checkNotNull(value);
        List<String> values = properties.get(propertyName);
        if (values == null) {
            values = new ArrayList<>();
            values.add(value);
            properties.put(propertyName, values);
        } else {
            values.add(value);
        }
    }
667283
public void assertIsValidReferencePath(String path, String propertyName) {
        if (path == null) {
            return;
        }
        if (path.isEmpty()) {
            problemReporter.report(new Problem(this, String.format("%s cannot be empty", propertyName)));
            return;
        }
    }
290255
@Override
	public final boolean propertyExists(String name)
    {
        if (name == null || name.length() == 0)
            throw new IllegalArgumentException("Empty property name");
        
        assertDeserializationLevel(MessageSerializationLevel.ALL_HEADERS);
        return propertyMap != null ? propertyMap.containsKey(name) : false;
    }
835586
private void validateInput(String resourceName, Collection<String> requiredRoles) {
        if (requiredRoles == null) {
            throw new NullPointerException("requiredRoles cannot be null.");
        } else if (resourceName == null) {
            throw new NullPointerException("resourceName cannot be null.");
        }
    }
572903
@Override
    public void validate() throws InvalidPropertyException {

        final String methodName = "validate";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        final List<String> failedPropsMessages = new ArrayList<String>();

        try {
            final List<PropertyDescriptor> invalidProperties = new ArrayList<PropertyDescriptor>();

            // Busname is required
            if ((null == _busName) || ("".equals(_busName))) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE, "Invalid BusName - BusName was "
                                             + _busName);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_BUSNAME_CWSJR1187"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor("busName",
                                JmsJcaActivationSpec.class));
            }

            // Destination required
            if (null == _destination) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid Destination - Destination was null");
                }
                failedPropsMessages.add(NLS.getFormattedMessage("INVALID_PROPERTY_DESTINATION_CWSJR1188", null, null));
                invalidProperties.add(new PropertyDescriptor("destination",
                                JmsJcaActivationSpec.class));
            }

            // Check destination type valid
            if (!(QUEUE.equals(_destinationType) || TOPIC
                            .equals(_destinationType))) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid Destination Type - We expected a destination type of "
                                                + QUEUE + " or " + TOPIC + " but we got "
                                                + _destinationType);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_DESTINATION_TYPE_CWSJR1189"),
                                                                new Object[] { QUEUE, TOPIC, _destinationType }, null));
                invalidProperties.add(new PropertyDescriptor("destinationType",
                                JmsJcaActivationSpec.class));
            }

            // Check acknowledge mode valid
            if (!(AUTO_ACKNOWLEDGE.equals(_acknowledgeMode) || DUPS_OK_ACKNOWLEDGE
                            .equals(_acknowledgeMode))) {
                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid Acknowledge Mode - We expected an acknowledge mode of "
                                                + AUTO_ACKNOWLEDGE + " or "
                                                + DUPS_OK_ACKNOWLEDGE + " but we got "
                                                + _acknowledgeMode);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_ACKNOWLEDGE_MODE_CWSJR1190"),
                                                                new Object[] { AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, _acknowledgeMode },
                                                                null));
                invalidProperties.add(new PropertyDescriptor("acknowledgeMode",
                                JmsJcaActivationSpec.class));
            }

            // Check read ahead valid
            if (!(ApiJmsConstants.READ_AHEAD_DEFAULT.equals(_readAhead)
                  || ApiJmsConstants.READ_AHEAD_ON.equals(_readAhead) || ApiJmsConstants.READ_AHEAD_OFF
                            .equals(_readAhead))) {

                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE,
                                "Invalid ReadAhead - We expected a read ahead of "
                                                + ApiJmsConstants.READ_AHEAD_DEFAULT + ", "
                                                + ApiJmsConstants.READ_AHEAD_ON + " or "
                                                + ApiJmsConstants.READ_AHEAD_OFF
                                                + " but we got " + _readAhead);
                }
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_READ_AHEAD_CWSJR1191"),
                                                                new Object[] { ApiJmsConstants.READ_AHEAD_DEFAULT,
                                                                              ApiJmsConstants.READ_AHEAD_ON,
                                                                              ApiJmsConstants.READ_AHEAD_OFF,
                                                                              _acknowledgeMode },
                                                                null));
                invalidProperties.add(new PropertyDescriptor("readAhead",
                                JmsJcaActivationSpec.class));
            }

            // For queues ...
            if (QUEUE.equals(_destinationType)) {
                if (!(_destination instanceof JmsQueue)) {
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                        SibTr.debug(this, TRACE,
                                    "Invalid Destination - We expect a destination object to be a "
                                                    + JmsQueue.class.getName()
                                                    + " but we got "
                                                    + _destination == null ? "null" : _destination.getClass().getName());
                    }
                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_QUEUE_CWSJR1192"),
                                                                    new Object[] { JmsQueue.class.getName(), _destination == null ? "null" : _destination.getClass().getName() },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor("destination",
                                    JmsJcaActivationSpec.class));
                }
            }

            // For topics ...
            if (TOPIC.equals(_destinationType)) {

                if (!(_destination instanceof JmsTopic)) {
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                        SibTr.debug(this, TRACE,
                                    "Invalid Destination - We expect a destination object to be a "
                                                    + JmsTopic.class.getName()
                                                    + " but we got "
                                                    + _destination == null ? "null" : _destination.getClass().getName());
                    }
                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_TOPIC_CWSJR1193"),
                                                                    new Object[] { JmsTopic.class.getName(), _destination == null ? "null" : _destination.getClass().getName() },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor("destination",
                                    JmsJcaActivationSpec.class));
                }

                // ... check subscription durability valid
                if (!(DURABLE.equals(_subscriptionDurability) || DURABLE_SHARED.equals(_subscriptionDurability) ||
                      NON_DURABLE.equals(_subscriptionDurability) || NON_DURABLE_SHARED.equals(_subscriptionDurability))) {
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                        SibTr.debug(this, TRACE,
                                    "Invalid subscriptionDurability - We expect a value of "
                                                    + DURABLE + " or " + DURABLE_SHARED + " or " + NON_DURABLE + " or " + NON_DURABLE_SHARED
                                                    + " but we got "
                                                    + _subscriptionDurability);
                    }
                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_SUBDUR_CWSJR1194"),
                                                                    new Object[] { DURABLE, DURABLE_SHARED, NON_DURABLE, NON_DURABLE_SHARED, _subscriptionDurability },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor(
                                    "subscriptionDurability",
                                    JmsJcaActivationSpec.class));
                }

                if (DURABLE.equals(_subscriptionDurability)) {
                    // ... check client ID set
                    if ((null == _clientId) || ("".equals(_clientId))) {
                        failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_CLIENTID_CWSJR1183"),
                                                                        null, null));
                        invalidProperties.add(new PropertyDescriptor(
                                        "clientId", JmsJcaActivationSpec.class));
                    }

                }
                // For durable(and shared non durable) topic subscriptions ...
                if (DURABLE.equals(_subscriptionDurability) ||
                    DURABLE_SHARED.equals(_subscriptionDurability) ||
                    NON_DURABLE_SHARED.equals(_subscriptionDurability)) {
                    // ... check client ID set
                    if ((null == _clientId) || ("".equals(_clientId))) {
                        failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_CLIENTID_CWSJR1183"),
                                                                        null, null));
                        invalidProperties.add(new PropertyDescriptor(
                                        "clientId", JmsJcaActivationSpec.class));
                    }

                    // durableSubscriptionHome is populated at the connectionImpl 
                    // or the ConnectionProxy for liberty.Hence the check is removed

                    // ... check subscription name set
                    if ((null == _subscriptionName)
                        || ("".equals(_subscriptionName))) {

                        failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_SUBNAME_CWSJR1196"),
                                                                        null, null));
                        invalidProperties
                                        .add(new PropertyDescriptor("subscriptionName",
                                                        JmsJcaActivationSpec.class));

                    }

                }
            }

            // Check maximum concurrency greater than zero
            if ((null == _maxConcurrency) || (_maxConcurrency.intValue() < 1)) {
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_MAXCONC_CWSJR1198"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor("maxConcurrency",
                                JmsJcaActivationSpec.class));
            }

            // Check maximum batch size greater than zero
            if ((null == _maxBatchSize) || (_maxBatchSize.intValue() < 1)) {
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_MAXBATCH_CWSJR1199"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor("maxBatchSize",
                                JmsJcaActivationSpec.class));
            }

            // Check share data source with CMP is set - since this defaults to a value at
            // initialisation time this should never be encountered
            if (null == _shareDataSourceWithCMP) {
                failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_SHARECMP_CWSJR1200"),
                                                                null, null));
                invalidProperties.add(new PropertyDescriptor(
                                "shareDataSourceWithCMP", JmsJcaActivationSpec.class));
            }

            /**
             * For the target set of properties, use the defaults if none specified
             */
            if ("".equals(_target)) {

                _target = JmsraConstants.DEFAULT_TARGET;

            }

            // Target type must be one of the predefined values
            if ((null == _targetType) || ("".equals(_targetType))) {

                _targetType = JmsraConstants.DEFAULT_TARGET_TYPE;

            } else {

                if (!((ApiJmsConstants.TARGET_TYPE_BUSMEMBER.equals(_targetType)) ||
                      (ApiJmsConstants.TARGET_TYPE_ME.equals(_targetType)) || (ApiJmsConstants.TARGET_TYPE_CUSTOM.equals(_targetType)))) {

                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_TARGET_TYPE_CWSJR1180"),
                                                                    new Object[] { ApiJmsConstants.TARGET_TYPE_BUSMEMBER,
                                                                                  ApiJmsConstants.TARGET_TYPE_ME,
                                                                                  ApiJmsConstants.TARGET_TYPE_CUSTOM,
                                                                                  _targetType },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor(
                                    "targetType",
                                    JmsJcaActivationSpec.class));

                }

            }

            // Target significance must be one of the predefined values
            if ((null == _targetSignificance) || ("".equals(_targetSignificance))) {

                _targetSignificance = JmsraConstants.DEFAULT_TARGET_SIGNIFICANCE;

            } else {

                if (!((ApiJmsConstants.TARGET_SIGNIFICANCE_PREFERRED.equals(_targetSignificance)) || (ApiJmsConstants.TARGET_SIGNIFICANCE_REQUIRED.equals(_targetSignificance)))) {

                    failedPropsMessages.add(NLS.getFormattedMessage(("INVALID_PROPERTY_TARGET_SIGNIFICANCE_CWSJR1179"),
                                                                    new Object[] { ApiJmsConstants.TARGET_SIGNIFICANCE_PREFERRED,
                                                                                  ApiJmsConstants.TARGET_SIGNIFICANCE_REQUIRED,
                                                                                  _targetSignificance },
                                                                    null));
                    invalidProperties.add(new PropertyDescriptor(
                                    "targetSignificance",
                                    JmsJcaActivationSpec.class));

                }

            }

            // If we have any invalid properties, throw an
            // InvalidPropertyException
            if (!invalidProperties.isEmpty()) {

                final PropertyDescriptor[] invalidPropertyArray = invalidProperties
                                .toArray(new PropertyDescriptor[invalidProperties
                                                .size()]);
                // Commented out in 284561 since we are now using failedPropsMessages instead
/*
 * final List propertyNames = new ArrayList();
 * 
 * for (int i = 0; i < invalidPropertyArray.length; i++) {
 * propertyNames.add(invalidPropertyArray[i].getDisplayName());
 * }
 */

                if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                    SibTr.debug(this, TRACE, "Invalid properties found:",
                                failedPropsMessages);
                }

                final InvalidPropertyException exc = new InvalidPropertyException(
                                NLS.getFormattedMessage(
                                                        ("INVALID_PROPERTIES_CWSJR1181"),
                                                        new Object[] { failedPropsMessages }, null));
                exc.setInvalidPropertyDescriptors(invalidPropertyArray);
                throw exc;
            }

        } catch (final IntrospectionException exception) {

            FFDCFilter.processException(exception, CLASS_NAME + "."
                                                   + methodName, FFDC_PROBE_1, this);

            SibTr.exception(this, TRACE, exception);

            throw new RuntimeException(NLS.getFormattedMessage(
                                                               ("EXCEPTION_RECEIVED_CWSJR1185"),
                                                               new Object[] { exception }, null), exception);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
620848
public void assertOneOrMore(final String propertyName,
            final PropertyList properties) throws ValidationException {

        if (properties.getProperties(propertyName).size() < 1) {
            throw new ValidationException(ASSERT_ONE_OR_MORE_MESSAGE, new Object[] {propertyName});
        }
    }
577471
protected void verifyPropertyPresence(String propertyName) {
        if (!commandResult.containsKey(propertyName)) {
            throw new IllegalStateException(
                    String.format("There is no '%s' attribute in the resulting command output %s. "
                            + "Did you set the options properly?", propertyName, commandResult));
        }
    }