+ locationFactory.createJCRPath(qpath).getAsString(false));
}
if (multiValue && (def == null || (prevProp != null && !prevProp.isMultiValued())))
{
throw new ValueFormatException("Can not assign multiple-values Value to a single-valued property "
+ locationFactory.createJCRPath(qpath).getAsString(false));
}
if (!multiValue && (def == null || (prevProp != null && prevProp.isMultiValued())))
{
throw new ValueFormatException("Can not assign single-value Value to a multiple-valued property "
+ locationFactory.createJCRPath(qpath).getAsString(false));
}
List<ValueData> valueDataList = new ArrayList<ValueData>();
// cast to required type if neccessary
int requiredType = def.getRequiredType();
int propType = requiredType;
// if list of values not null
if (propertyValues != null)
{
// All Value objects in the array must be of the same type, otherwise a
// ValueFormatException is thrown.
if (propertyValues.length > 1)
{
if (propertyValues[0] != null)
{
int vType = propertyValues[0].getType();
for (Value val : propertyValues)
{
if (val != null && vType != val.getType())
{
throw new ValueFormatException("All Value objects in the array must be of the same type");
}
}
}
}