QPropertyDefinition definition,
QValue[] values, int propertyType)
throws ItemExistsException, ConstraintViolationException, RepositoryException {
// NOTE: callers must make sure, the property type is not 'undefined'
NodeEntry nodeEntry = (NodeEntry) parent.getHierarchyEntry();
PropertyEntry pe = nodeEntry.addNewPropertyEntry(propName, definition, values, propertyType);
try {
parent.markModified();
} catch (RepositoryException e) {
pe.remove();
throw e;
}
return pe.getPropertyState();
}