int cversion, int cnordernumb, Map<String, SortedSet<TempPropertyData>> properties, AccessControlList parentACL)
throws RepositoryException, SQLException, IOException
{
try
{
InternalQName qname = InternalQName.parse(cname);
QPath qpath;
String parentCid;
if (parentPath != null)
{
// get by parent and name
qpath = QPath.makeChildPath(parentPath, qname, cindex, cid);
parentCid = cpid;
}
else
{
// get by id
if (cpid.equals(Constants.ROOT_PARENT_UUID))
{
// root node
qpath = Constants.ROOT_PATH;
parentCid = null;
}
else
{
qpath = QPath.makeChildPath(traverseQPath(cpid), qname, cindex, cid);
parentCid = cpid;
}
}
// PRIMARY
SortedSet<TempPropertyData> primaryType = properties.get(Constants.JCR_PRIMARYTYPE.getAsString());
if (primaryType == null || primaryType.isEmpty())
{
throw new PrimaryTypeNotFoundException("FATAL ERROR primary type record not found. Node "
+ qpath.getAsString() + ", id " + cid + ", container " + this.containerName, null);
}
byte[] data = primaryType.first().getValueData().getAsByteArray();
InternalQName ptName = InternalQName.parse(new String((data != null ? data : new byte[]{})));
// MIXIN
InternalQName[] mts;
boolean owneable = false;
boolean privilegeable = false;
Set<TempPropertyData> mixTypes = properties.get(Constants.JCR_MIXINTYPES.getAsString());
if (mixTypes != null)
{
List<InternalQName> mNames = new ArrayList<InternalQName>();
for (TempPropertyData mxnb : mixTypes)
{
InternalQName mxn = InternalQName.parse(new String(mxnb.getValueData().getAsByteArray()));
mNames.add(mxn);
if (!privilegeable && Constants.EXO_PRIVILEGEABLE.equals(mxn))
{
privilegeable = true;