/** * Copy constructor. */ public PropertyImpl(Property<T> property) { if (property == null) { throw new IllegalArgumentException("Source must be set!"); } propertyDefinition = property.getDefinition(); initialize(property.getDefinition()); setValues(new ArrayList<T>(property.getValues())); }
/** * Copy constructor. */ public PropertyImpl(Property<T> property) { if (property == null) { throw new IllegalArgumentException("Source must be set!"); } propertyDefinition = property.getDefinition(); initialize(property.getDefinition()); setValues(new ArrayList<T>(property.getValues())); }
throw new IllegalArgumentException("Property id mismatch: '" + id + "' != '" + p.getId() + "'!"); value = (p.getDefinition().getCardinality() == Cardinality.SINGLE ? p.getFirstValue() : p.getValues());
throw new IllegalArgumentException("Property id mismatch: '" + id + "' != '" + p.getId() + "'!"); value = (p.getDefinition().getCardinality() == Cardinality.SINGLE ? p.getFirstValue() : p.getValues());
if (prop.getDefinition().getUpdatability() == Updatability.READWRITE || prop.getDefinition().getUpdatability() == Updatability.ONCREATE) { newProperties.put(prop.getId(), prop.getValue());
if (prop.getDefinition().getUpdatability() == Updatability.READWRITE || prop.getDefinition().getUpdatability() == Updatability.ONCREATE) { newProperties.put(prop.getId(), prop.getValue());
addResult(results, assertEquals(expected.getDefinition(), actual.getDefinition(), null, f));
boolean isString = ((property.getDefinition().getPropertyType() == PropertyType.STRING) || (property.getDefinition().getPropertyType() == PropertyType.ID) || (property.getDefinition().getPropertyType() == PropertyType.URI) || (property.getDefinition().getPropertyType() == PropertyType.HTML)); for (Object value : property.getValues()) { if (value == null) { if (property.getDefinition().getCardinality() == Cardinality.SINGLE) { f = createResult(FAILURE, "Property cardinality is SINGLE but property has more than one value!"); addResult(results, assertIsTrue(property.getValues().size() <= 1, null, f)); if (property.getDefinition().isRequired() == null) { addResult(results, createResult(FAILURE, "Property definition doesn't contain the required flag!")); } else { if (property.getDefinition().isRequired().booleanValue()) { f = createResult(FAILURE, "Property is required but has no value!"); addResult(results, assertListNotEmpty(property.getValues(), null, f));
if (!properties.contains(prop.getDefinition().getQueryName())) { addResult(createResult(CmisTestResultStatus.WARNING, "getObject() delivered the property '" + prop.getId() if (!properties.contains(prop.getDefinition().getQueryName())) { addResult(createResult(CmisTestResultStatus.WARNING, "getChildren() delivered the property '" + prop.getId() + "', although it has not been requested."));
if (property.getDefinition().getUpdatability() == Updatability.READWRITE) { writableProperties.put(property.getId(), property.getValue());