TransientPropertyData.createPropertyData(currentNode(), Constants.JCR_FROZENMIXINTYPES, PropertyType.NAME,
mv, values);
}
else
{
NodeData parent = (NodeData)dataManager.getItemData(property.getParentIdentifier());
PropertyDefinitionData pdef =
ntManager.getPropertyDefinitions(qname, parent.getPrimaryTypeName(), parent.getMixinTypeNames())
.getAnyDefinition();
int action = pdef.getOnParentVersion();
if (action == OnParentVersionAction.IGNORE)
{
return;
}
else if (action == OnParentVersionAction.ABORT)
{
throw new VersionException("Property is aborted " + property.getQPath().getAsString());
}
else if (action == OnParentVersionAction.COPY || action == OnParentVersionAction.VERSION
|| action == OnParentVersionAction.COMPUTE)
{
frozenProperty =
TransientPropertyData.createPropertyData(currentNode(), qname, property.getType(), mv, values);
}
else if (action == OnParentVersionAction.INITIALIZE)
{
// 8.2.11.3 INITIALIZE
// On checkin of N, a new P will be created and placed in version
// storage as a child of VN. The new P will be initialized just as it
// would
// be if created normally in a workspace
if (pdef.isAutoCreated())
{
if (pdef.getDefaultValues() != null && pdef.getDefaultValues().length > 0)
{
// to use default values
values.clear();
for (String defValue : pdef.getDefaultValues())
{
ValueData defData;
if (PropertyType.UNDEFINED == pdef.getRequiredType())
{
defData = ((BaseValue)valueFactory.createValue(defValue)).getInternalData();
}
else
{
defData =
((BaseValue)valueFactory.createValue(defValue, pdef.getRequiredType())).getInternalData();
}
// TransientValueData defData = ((BaseValue)
// defValue).getInternalData();
// values.add(defData.createTransientCopy());
values.add(defData);
}
}
else if (ntManager.isNodeType(Constants.NT_HIERARCHYNODE, parent.getPrimaryTypeName(), parent
.getMixinTypeNames())
&& qname.equals(Constants.JCR_CREATED))
{
// custom logic for nt:hierarchyNode jcr:created
values.clear();