if (history != null) {
if (fullVersionable) {
if (propName.equals(NameConstants.JCR_VERSIONHISTORY)) {
// jcr:versionHistory
InternalValue value = InternalValue.create(
history.getVersionHistoryId());
newChildState.setValues(new InternalValue[] { value });
} else if (propName.equals(NameConstants.JCR_BASEVERSION)
|| propName.equals(NameConstants.JCR_PREDECESSORS)) {
// jcr:baseVersion or jcr:predecessors
InternalValue value = InternalValue.create(
history.getRootVersionId());
newChildState.setValues(new InternalValue[] { value });
} else if (propName.equals(NameConstants.JCR_ISCHECKEDOUT)) {
// jcr:isCheckedOut
newChildState.setValues(new InternalValue[]{InternalValue.create(true)});